briar issueshttps://code.briarproject.org/briar/briar/-/issues2021-11-11T16:04:24Zhttps://code.briarproject.org/briar/briar/-/issues/2217ArrayIndexOutOfBoundsException when reading a record2021-11-11T16:04:24ZakwizgranArrayIndexOutOfBoundsException when reading a record* Android version: 4.2.2
* Phone model: TCT One Touch 4033D (Yaris_M)
* Briar version: 1.3.8 (8076775)
Stacktrace:
```
java.lang.ArrayIndexOutOfBoundsException: src.length=1 srcPos=0 dst.length=4 dstPos=0 length=4
at java.lang.S...* Android version: 4.2.2
* Phone model: TCT One Touch 4033D (Yaris_M)
* Briar version: 1.3.8 (8076775)
Stacktrace:
```
java.lang.ArrayIndexOutOfBoundsException: src.length=1 srcPos=0 dst.length=4 dstPos=0 length=4
at java.lang.System.arraycopy(Native Method)
at java.io.BufferedInputStream.read(BufferedInputStream.java:286)
at libcore.io.Streams.readFully(Streams.java:81)
at java.io.DataInputStream.readFully(DataInputStream.java:120)
at java.io.DataInputStream.readFully(DataInputStream.java:116)
at org.briarproject.bramble.record.RecordReaderImpl.readRecord(RecordReaderImpl.java:35)
at org.briarproject.bramble.record.RecordReaderImpl.readRecord(RecordReaderImpl.java:52)
at org.briarproject.bramble.keyagreement.KeyAgreementTransport.readRecord(KeyAgreementTransport.java:114)
at org.briarproject.bramble.keyagreement.KeyAgreementTransport.receiveKey(KeyAgreementTransport.java:77)
at org.briarproject.bramble.keyagreement.KeyAgreementProtocol.receiveKey(KeyAgreementProtocol.java:130)
at org.briarproject.bramble.keyagreement.KeyAgreementProtocol.perform(KeyAgreementProtocol.java:107)
at org.briarproject.bramble.keyagreement.KeyAgreementTaskImpl.run(KeyAgreementTaskImpl.java:117)
```
Last lines of log
```
11-01 11:59:10.121 I/AddNearbyContactViewModel: Got result from decoder
11-01 11:59:10.121 I/AddNearbyContactViewModel: Remote payload is 48 bytes
11-01 11:59:10.123 I/KeyAgreementConnector: Starting outgoing BQP connections as Bob
11-01 11:59:10.124 I/CameraView: Stopping preview
11-01 11:59:10.125 I/KeyAgreementConnector: Connecting via org.briarproject.bramble.bluetooth
11-01 11:59:10.125 I/KeyAgreementConnector: Connecting via org.briarproject.bramble.lan
11-01 11:59:10.126 I/AbstractBluetoothPlugin: Connecting to key agreement UUID a2271b04-3c3a-3dea-a45c-e8d6bfa9aa62
11-01 11:59:10.126 I/AbstractBluetoothPlugin: Connecting to 1C:[scrubbed]:49
11-01 11:59:10.355 I/CameraView: Releasing camera
11-01 11:59:10.423 I/CameraView: Surface destroyed
11-01 11:59:12.841 I/AbstractBluetoothPlugin: Connected to 1C:[scrubbed]:49
11-01 11:59:12.841 I/BluetoothConnectionLimiterImpl: Connection opened, 1 open
11-01 11:59:12.842 I/KeyAgreementConnector: org.briarproject.bramble.bluetooth: Outgoing connection
11-01 11:59:17.975 I/RenewableWakeLock: Renewing wake lock org.briarproject.briar.android
11-01 11:59:22.841 I/AndroidTaskScheduler: Running 1 due tasks
11-01 11:59:22.841 I/AndroidTaskScheduler: Task is 0 ms overdue
11-01 11:59:32.842 I/AndroidTaskScheduler: Running 1 due tasks
11-01 11:59:32.843 I/AndroidTaskScheduler: Task is 0 ms overdue
11-01 11:59:42.106 I/AndroidTaskScheduler: Running 1 due tasks
11-01 11:59:42.106 I/AndroidTaskScheduler: Task is 2 ms overdue
11-01 11:59:42.107 I/PollerImpl: Polling plugin org.briarproject.bramble.lan
11-01 11:59:42.108 I/ConnectionRegistryImpl: 0 contacts connected or better: org.briarproject.bramble.lan
11-01 11:59:42.844 I/AndroidTaskScheduler: Running 1 due tasks
11-01 11:59:42.844 I/AndroidTaskScheduler: Task is 1 ms overdue
11-01 11:59:45.146 I/AndroidTaskScheduler: Running 1 due tasks
11-01 11:59:45.146 I/AndroidTaskScheduler: Task is 1 ms overdue
11-01 11:59:45.147 I/PollerImpl: Polling plugin org.briarproject.bramble.tor
11-01 11:59:45.148 I/ConnectionRegistryImpl: 0 contacts connected or better: org.briarproject.bramble.tor
11-01 11:59:52.849 I/AndroidTaskScheduler: Running 1 due tasks
11-01 11:59:52.849 I/AndroidTaskScheduler: Task is 1 ms overdue
11-01 11:59:58.011 I/KeyAgreementConnector: org.briarproject.bramble.bluetooth: Data available
11-01 11:59:58.011 I/ConnectionChooserImpl: Got connection for org.briarproject.bramble.bluetooth
11-01 11:59:58.022 I/KeyAgreementConnector: Stopping BQP listeners
11-01 11:59:58.026 I/ConnectionChooserImpl: java.io.IOException: [JSR82] accept: Connection is not created (failed or aborted).
11-01 11:59:58.034 I/ConnectionChooserImpl: Closing 0 unused connections
11-01 11:59:58.034 I/KeyAgreementTaskImpl: Starting BQP protocol
11-01 11:59:58.042 I/ConnectionChooserImpl: java.net.SocketException: Socket closed
```
I'm marking this issue as confidential in case it's remotely triggerable by sending a malformed record.Android 1.4https://code.briarproject.org/briar/briar/-/issues/1776NPE in exit transition2021-11-04T11:03:23ZakwizgranNPE in exit transition* Android version: 10
* Phone model: Huawei ELE-L29
* Briar version: 1.2.9 (9d96ce6)
Stacktrace:
```
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.app.Activity.isTopOfTask()' on a null object referenc...* Android version: 10
* Phone model: Huawei ELE-L29
* Briar version: 1.2.9 (9d96ce6)
Stacktrace:
```
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.app.Activity.isTopOfTask()' on a null object reference
at android.app.ExitTransitionCoordinator.notifyComplete(ExitTransitionCoordinator.java:437)
at android.app.ExitTransitionCoordinator.onReceiveResult(ExitTransitionCoordinator.java:91)
at android.os.ResultReceiver$MyRunnable.run(ResultReceiver.java:50)
at android.os.Handler.handleCallback(Handler.java:900)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8347)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
```Android 1.4https://code.briarproject.org/briar/briar/-/issues/1637Wrong orientation of (exotic) rotated images2022-04-26T10:45:03ZTorsten GroteWrong orientation of (exotic) rotated imagesWhen sending a photo with an EXIF orientation of 90, it is shown rotated 90 degrees to the left in the preview of the sender, the conversation and image view of the receiver. However, it is shown correctly in Android's Gallery app.When sending a photo with an EXIF orientation of 90, it is shown rotated 90 degrees to the left in the preview of the sender, the conversation and image view of the receiver. However, it is shown correctly in Android's Gallery app.Android 1.4https://code.briarproject.org/briar/briar/-/issues/1486UI lifecycle callbacks may be called when not signed in2022-04-19T15:48:27ZakwizgranUI lifecycle callbacks may be called when not signed inIf the user relaunches Briar from the recent apps list, activities may be recreated, started and resumed before `BriarActivity#onResume()` checks whether the user's signed in and launches PasswordActivity.
Usually this only applies to N...If the user relaunches Briar from the recent apps list, activities may be recreated, started and resumed before `BriarActivity#onResume()` checks whether the user's signed in and launches PasswordActivity.
Usually this only applies to NavDrawerActivity, because it's on the top of the stack when the user signs out. But if Briar's killed without signing out, other activities may be on the top of the stack when the user relaunches Briar.
Some of our lifecycle callbacks start operations that could throw exceptions if the user isn't signed in, as in #1482.Android 1.4https://code.briarproject.org/briar/briar/-/issues/1366Segmentation fault while signing out2021-11-04T11:03:42ZakwizgranSegmentation fault while signing out* Android version: 8.1.0
* Phone model: Nexus 5X
* Briar version: 1.0.13 debug build (21f95ed)
The device showed "Briar Debug has stopped" while signing out of the app.
Log:
```
08-16 16:41:38.445 24298-28941/? I/BriarControllerImpl: S...* Android version: 8.1.0
* Phone model: Nexus 5X
* Briar version: 1.0.13 debug build (21f95ed)
The device showed "Briar Debug has stopped" while signing out of the app.
Log:
```
08-16 16:41:38.445 24298-28941/? I/BriarControllerImpl: Shutting down service
08-16 16:41:38.529 24298-24298/? I/BriarService: Destroyed
08-16 16:41:38.540 24298-28944/? I/LifecycleManagerImpl: Stopping services
08-16 16:41:38.542 24298-24591/? I/DuplexOutgoingSession: Closed
08-16 16:41:38.542 24298-25132/? I/DuplexOutgoingSession: Closed
08-16 16:41:38.543 24298-25136/? I/DuplexOutgoingSession: Closed
08-16 16:41:38.543 24298-25134/? I/DuplexOutgoingSession: Closed
08-16 16:41:38.543 24298-25148/? I/DuplexOutgoingSession: Closed
08-16 16:41:38.554 24298-28944/? I/PluginManagerImpl: Stopping simplex plugins
Stopping duplex plugins
08-16 16:41:38.556 24298-28944/? I/PluginManagerImpl: Waiting for all the plugins to stop
08-16 16:41:38.556 24298-25132/? I/PluginManagerImpl: Trying to stop plugin org.briarproject.bramble.bluetooth
08-16 16:41:38.556 24298-25136/? I/PluginManagerImpl: Trying to stop plugin org.briarproject.bramble.tor
08-16 16:41:38.557 24298-25134/? I/PluginManagerImpl: Trying to stop plugin org.briarproject.bramble.lan
08-16 16:41:38.558 24298-25132/? I/NavDrawerControllerImpl: TransportDisabledEvent: org.briarproject.bramble.bluetooth
08-16 16:41:38.559 24298-25136/? I/NavDrawerControllerImpl: TransportDisabledEvent: org.briarproject.bramble.tor
08-16 16:41:38.559 24298-25134/? I/NavDrawerControllerImpl: TransportDisabledEvent: org.briarproject.bramble.lan
08-16 16:41:38.560 24298-24392/? I/TorPlugin: java.net.SocketException: Socket closed
08-16 16:41:38.560 24298-24391/? I/TcpPlugin: java.net.SocketException: Socket closed
--------- beginning of crash
08-16 16:41:38.564 24298-25136/? A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x18 in tid 25136 (pool-3-thread-2), pid 24298 (r.android.debug)
08-16 16:41:38.632 28948-28948/? W/crash_dump64: type=1400 audit(0.0:112): avc: denied { search } for name="org.briarproject.briar.android.debug" dev="dm-2" ino=262990 scontext=u:r:crash_dump:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
08-16 16:41:38.700 28948-28948/? I/crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
08-16 16:41:38.702 28948-28948/? W/crash_dump64: type=1400 audit(0.0:113): avc: denied { search } for name="org.briarproject.briar.android.debug" dev="dm-2" ino=262990 scontext=u:r:crash_dump:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
08-16 16:41:38.703 590-590/? I//system/bin/tombstoned: received crash request for pid 24298
08-16 16:41:38.705 28948-28948/? I/crash_dump64: performing dump of process 24298 (target tid = 25136)
08-16 16:41:38.705 28948-28948/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/bullhead/bullhead:8.1.0/OPM6.171019.030.E1/4805388:user/release-keys'
Revision: 'rev_1.0'
ABI: 'arm64'
pid: 24298, tid: 25136, name: pool-3-thread-2 >>> org.briarproject.briar.android.debug <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x18
Cause: null pointer dereference
x0 00000076a216c300 x1 0000000000000000 x2 4e0dc4b73a8d37a4 x3 0000000000000061
x4 00000000ffffffff x5 c6a4a7935bd1e995 x6 c6a4a7935bd1e995 x7 f8e1bfbf4251583c
x8 c5e8c0e242c67c71 x9 c5e8c0e242c67c71 x10 0000000000000008 x11 00000000ffffffff
x12 00000076a461c000 x13 ffffffffa48aa59c x14 00029088e2000000 x15 003b9aca00000000
x16 000000773ee1bca8 x17 000000773edb84b8 x18 0000000000000008 x19 0000000000000015
x20 00000076a215aa40 x21 00000076b0844fa0 x22 0000000000000018 x23 0000000000000000
x24 00000076a216c300 x25 000000769fe88c40 x26 000000769fe81000 x27 00000000000808de
x28 00000076a472b1d0 x29 00000076a1be8ab0 x30 000000769fc1b600
sp 00000076a1be8a00 pc 000000769fc1b60c pstate 0000000060000000
08-16 16:41:38.716 28948-28948/? A/DEBUG: backtrace:
#00 pc 000000000005160c /data/data/org.briarproject.briar.android.debug/libperfa_arm64.so
#01 pc 00000000000163fc /system/lib64/libopenjdkjvmti.so (openjdkjvmti::JvmtiAllocationListener::ObjectAllocated(art::Thread*, art::ObjPtr<art::mirror::Object>*, unsigned long)+320)
#02 pc 000000000014df4c /system/lib64/libart.so (_ZN3art2gc4Heap24AllocObjectWithAllocatorILb1ELb0ENS_11VoidFunctorEEEPNS_6mirror6ObjectEPNS_6ThreadENS_6ObjPtrINS4_5ClassEEEmNS0_13AllocatorTypeERKT1_+1172)
#03 pc 0000000000536aa4 /system/lib64/libart.so (MterpNewInstance+832)
#04 pc 000000000053a310 /system/lib64/libart.so (ExecuteMterpImpl+4496)
#05 pc 0000000000275c00 /system/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+444)
#06 pc 000000000027b7cc /system/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame*, art::JValue*)+216)
#07 pc 0000000000295a70 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+668)
#08 pc 0000000000533d68 /system/lib64/libart.so (MterpInvokeDirect+356)
#09 pc 000000000053ca14 /system/lib64/libart.so (ExecuteMterpImpl+14484)
#10 pc 0000000000275c00 /system/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::DexFile::CodeItem const*, art::ShadowFrame&, art::JValue, bool)+444)
#11 pc 0000000000525450 /system/lib64/libart.so (artQuickToInterpreterBridge+1052)
#12 pc 0000000000553d0c /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
#13 pc 00000000001e2b08 /dev/ashmem/dalvik-jit-code-cache (deleted)
08-16 16:41:41.108 766-782/? W/zygote64: kill(-24298, 9) failed: No such process
08-16 16:41:41.110 766-5198/? I/ActivityManager: Process org.briarproject.briar.android.debug (pid 24298) has died: cch CEM
08-16 16:41:41.129 766-789/? W/ActivityManager: setHasOverlayUi called on unknown pid: 24298
08-16 16:41:41.129 561-561/? I/Zygote: Process 24298 exited due to signal (11)
08-16 16:41:41.152 766-782/? W/zygote64: kill(-24298, 9) failed: No such process
08-16 16:41:41.152 766-782/? I/zygote64: Successfully killed process cgroup uid 10101 pid 24298 in 44ms
```
Looks like a crash within ART. Not our bug, but possibly related to @ski's [problems with the same phone model](https://code.briarproject.org/briar/briar/issues/992#note_29767)?Android 1.4https://code.briarproject.org/briar/briar/-/issues/1235User testing for adding contacts remotely2022-11-18T17:24:07ZakwizgranUser testing for adding contacts remotely### Workflow Prototype Testing
Briar wants to add support for adding contacts remotely without them having to meet face to face. Before implementing this feature entirely, Briar wants to test an early design prototype to see if users wo...### Workflow Prototype Testing
Briar wants to add support for adding contacts remotely without them having to meet face to face. Before implementing this feature entirely, Briar wants to test an early design prototype to see if users would understand the workflow.
An APKs for testing (which can be installed along-side the official Briar) is available here:
* https://grobox.de/tmp/briar-add-contacts-remotely-user-test.apk
Test Setup: Two testers both install the same test APK on their Android phone. Without being in the same room, they try to add each other as contacts in Briar. The test finishes and succeeds when a new contact was added on both phones. Note that the contact that will be added is fake and purely for testing. While it will appear to be online, you will never be able to exchange messages until the feature is fully implemented.
Please finish the test **before** reading and answering the questions below!
---
### Questions (for after the test!)
1. Did you understand the difference between the two options for adding a contact and which one to choose?
1. When seeing the 'Add a Contact' screen, did you know what to do?
1. How did you exchange the links?
1. Were there any issues when exchanging the links?
1. After entering your contact's link, did you understand what happened?
1. When testing the full version, did you understand the QR code button? Did it confuse? Did you use it?
1. Were you confused about the delay before the contact was added?
1. Is there anything that would have helped you to understand the process better?
Subtask of #1230.Android 1.4Renata GegajRenata Gegajhttps://code.briarproject.org/briar/briar/-/issues/837NPE when opening private group new message notification2021-11-04T11:04:01ZErnir ErlingssonNPE when opening private group new message notificationBriar had been alive for ~20 hours in the background when I got a notification of three new private group messages. I clicked the notification which lead straight to this NPE:
ava.lang.NullPointerException: Attempt to invoke interface m...Briar had been alive for ~20 hours in the background when I got a notification of three new private group messages. I clicked the notification which lead straight to this NPE:
ava.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.List.add(java.lang.Object)' on a null object reference
at org.briarproject.briar.client.MessageTreeImpl.parseNode(MessageTreeImpl.java:70)
at org.briarproject.briar.client.MessageTreeImpl.add(MessageTreeImpl.java:48)
at org.briarproject.briar.client.MessageTreeImpl.add(MessageTreeImpl.java:55)
at org.briarproject.briar.android.threaded.NestedTreeList.add(NestedTreeList.java:28)
at org.briarproject.briar.android.threaded.ThreadItemAdapter.add(ThreadItemAdapter.java:86)
at org.briarproject.briar.android.threaded.ThreadListActivity.addItem(ThreadListActivity.java:339)
at org.briarproject.briar.android.threaded.ThreadListActivity$5.onResultUi(ThreadListActivity.java:321)
at org.briarproject.briar.android.threaded.ThreadListActivity$5.onResultUi(ThreadListActivity.java:318)
at org.briarproject.briar.android.controller.handler.UiResultExceptionHandler$1.run(UiResultExceptionHandler.java:24)
at org.briarproject.briar.android.activity.BaseActivity$1.run(BaseActivity.java:104)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)Android 1.4