briar issueshttps://code.briarproject.org/briar/briar/-/issues2019-03-29T13:58:45Zhttps://code.briarproject.org/briar/briar/-/issues/1517NPE when rotating screen2019-03-29T13:58:45ZakwizgranNPE when rotating screenI got this crash on the API 28 emulator while running current master modified to target API 28. With a private group open, I rotated the screen to landscape, pressed the screen rotation button in the navigation bar to allow the app to ro...I got this crash on the API 28 emulator while running current master modified to target API 28. With a private group open, I rotated the screen to landscape, pressed the screen rotation button in the navigation bar to allow the app to rotate, then rotated the screen to portrait again without pressing the screen rotation button again.
I'll try to reproduce this on master with the normal API target.
```
ACRA caught a NullPointerException for org.briarproject.briar.android.debug
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
at org.briarproject.briar.android.view.BriarRecyclerViewScrollListener.onItemVisible(BriarRecyclerViewScrollListener.java:55)
at org.briarproject.briar.android.view.BriarRecyclerViewScrollListener.onItemsVisible(BriarRecyclerViewScrollListener.java:50)
at org.briarproject.briar.android.threaded.ThreadScrollListener.onItemsVisible(ThreadScrollListener.java:39)
at org.briarproject.briar.android.view.BriarRecyclerViewScrollListener.onScrolled(BriarRecyclerViewScrollListener.java:39)
at android.support.v7.widget.RecyclerView.dispatchOnScrolled(RecyclerView.java:4961)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep3(RecyclerView.java:4021)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3652)
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:4194)
at android.view.View.layout(View.java:20672)
at android.view.ViewGroup.layout(ViewGroup.java:6194)
at android.support.constraint.ConstraintLayout.onLayout(ConstraintLayout.java:1915)
at android.view.View.layout(View.java:20672)
at android.view.ViewGroup.layout(ViewGroup.java:6194)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:20672)
at android.view.ViewGroup.layout(ViewGroup.java:6194)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:20672)
at android.view.ViewGroup.layout(ViewGroup.java:6194)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:20672)
at android.view.ViewGroup.layout(ViewGroup.java:6194)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:20672)
at android.view.ViewGroup.layout(ViewGroup.java:6194)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:20672)
at android.view.ViewGroup.layout(ViewGroup.java:6194)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:20672)
at android.view.ViewGroup.layout(ViewGroup.java:6194)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:20672)
at android.view.ViewGroup.layout(ViewGroup.java:6194)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1812)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1656)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1565)
at android.view.View.layout(View.java:20672)
at android.view.ViewGroup.layout(ViewGroup.java:6194)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at com.android.internal.policy.DecorView.onLayout(DecorView.java:753)
at android.view.View.layout(View.java:20672)
at android.view.ViewGroup.layout(ViewGroup.java:6194)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2792)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2319)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1460)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7183)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
at android.view.Choreographer.doCallbacks(Choreographer.java:761)
at android.view.Choreographer.doFrame(Choreographer.java:696)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
```Android 1.1akwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/1516Introducee doesn't receive second introduction request2019-04-04T16:47:45ZakwizgranIntroducee doesn't receive second introduction requestSteps to reproduce:
* Add devices A and B as contacts
* Add devices B and C as contacts
* B offers to introduce A and C
* A accepts the introduction
* C declines the introduction
* B offers to introduce A and C again
* Expected: A and C ...Steps to reproduce:
* Add devices A and B as contacts
* Add devices B and C as contacts
* B offers to introduce A and C
* A accepts the introduction
* C declines the introduction
* B offers to introduce A and C again
* Expected: A and C receive B's new introduction request
* Actual: B's new introduction request appears in the conversation with C, but not the conversation with A. After turning C's screen off and on, the accept and decline buttons disappear from B's new introduction request (this might be a separate bug, or might indicate that the request can no longer be answered because the session has been aborted)
* B can still exchange private messages with A and C, so it's not a connection issueAndroid 1.1Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1514Wrong message is shown when other introducee accepts introduction2019-04-04T16:47:33ZakwizgranWrong message is shown when other introducee accepts introductionSteps to reproduce:
* Add devices A and B as contacts
* Add devices B and C as contacts
* B offers to introduce A and C
* A declines the introduction
* As expected, A sees "You declined the introduction to C", B sees "A declined the intr...Steps to reproduce:
* Add devices A and B as contacts
* Add devices B and C as contacts
* B offers to introduce A and C
* A declines the introduction
* As expected, A sees "You declined the introduction to C", B sees "A declined the introduction to C", and C sees "B says that A declined the introduction"
* C accepts the introduction
* As expected, B sees "C accepted the introduction to A" and C sees "You accepted the introduction to A. Before A gets added to your contacts, they need to accept the introduction as well. This might take some time." (Separately from this ticket, we might think about showing different text to C in the case where A has already responded. The current text suggests we're still waiting for a response.)
* Expected: A sees "C accepted the introduction" (or "C accepted the introduction from B", or "B says that C accepted the introduction", etc)
* Actual: A sees "B accepted the introduction to C". This mixes up the roles, implying that A was introducing B to C and B accepted, whereas B was introducing A to C and C acceptedAndroid 1.1Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1512Can't pipe into headless prompt2020-10-31T12:52:40ZNicoCan't pipe into headless promptWhenever I try to pipe into Briar's registration prompt, I get this output:
```
No account found. Let's create one!
Nickname: Password: Exception in thread "main" java.lang.RuntimeException: EOF
at com.github.ajalt.clikt.output.NonInt...Whenever I try to pipe into Briar's registration prompt, I get this output:
```
No account found. Let's create one!
Nickname: Password: Exception in thread "main" java.lang.RuntimeException: EOF
at com.github.ajalt.clikt.output.NonInteractiveCliktConsole.promptForLine(CliktConsole.kt:63)
at com.github.ajalt.clikt.output.TermUi.prompt(TermUi.kt:94)
at com.github.ajalt.clikt.output.TermUi.prompt$default(TermUi.kt:86)
at org.briarproject.briar.headless.BriarServiceImpl.createAccount(BriarService.kt:60)
at org.briarproject.briar.headless.BriarServiceImpl.start(BriarService.kt:33)
at org.briarproject.briar.headless.Router.start$briar_headless(Router.kt:45)
at org.briarproject.briar.headless.Main.run(Main.kt:78)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:112)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:19)
at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:166)
at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:164)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:181)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:200)
at org.briarproject.briar.headless.MainKt.main(Main.kt:115)
```
This is how I tried it:
_Python_
```python
p = Popen(['java', '-jar', self.headless_jar, '-v'],
stdin=PIPE, universal_newlines=True)
p.communicate(credentials[0] + '\n' + credentials[1] +
'\n' + credentials[1] + '\n')
```
_Bash_
```bash
echo "nico
password
password
" | java -jar briar-headless.jar
```
Upstream had an issue called [NonInteractiveCliktConsole only reads in the first line from an input file](https://github.com/ajalt/clikt/issues/32) which sounds like the origin of this problem. It was fixed in newer versions (1.6.0). Before that version, it failed like this:
```bash
INFO: No database key in backup file
No account found. Let's create one!
Nickname: Password: Usage: briar-headless [OPTIONS]
Error: Could not get account information. Is STDIN connected?
```
In the meantime, [version 1.7.0](https://github.com/ajalt/clikt/releases/tag/1.7.0) was released but it doesn't change anything regarding this problem. I have [built a version of briar-headless with 1.7.0](https://media.dorfbrunnen.eu/briar/patched/briar-headless.jar) and tested it both in bash and python and get the same exception like with 1.6.0.
We should investigate why we get this exception when upstream claims to now support multi-line pipes.
On IRC we discussed to allow environment variables as an alternative for "scripted use" of the api.
Related:
* [Lines of code](https://github.com/ajalt/clikt/blob/master/clikt/src/main/kotlin/com/github/ajalt/clikt/output/CliktConsole.kt#L61) producing exception in _clikt_
* Fixed issue called [Make possible to use arbitrary input/output stream](https://github.com/ajalt/clikt/issues/57)
* [Lines of code](https://code.briarproject.org/NicoAlt/briar-gtk/blob/39986ba6b4cec35806efecaf59da7dcdc2214b3c/src/briar/api/api.py#L30) in briar-gtk's current code
* [Lines of code](https://code.briarproject.org/briar/briar/blob/4d26628f2a08169d4cbeebd1a9a4eafbca581504/briar-headless/src/main/java/org/briarproject/briar/headless/BriarService.kt#L31) of prompt in _briar-headless_
* Commit [Update clikt to 1.7.0 ](https://code.briarproject.org/NicoAlt/briar/commit/a53458be423f86ae01b28a035766391615fa80cc)Headless MVPTorsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1510Private message send button is disabled after rotating screen2019-04-23T14:46:30ZakwizgranPrivate message send button is disabled after rotating screenSteps to reproduce:
* Start writing a private message
* Rotate the screen to landscape - the keyboard closes
* Rotate the screen back to portrait - the keyboard is still closed
* Try to send the message - the send button has no effect
* ...Steps to reproduce:
* Start writing a private message
* Rotate the screen to landscape - the keyboard closes
* Rotate the screen back to portrait - the keyboard is still closed
* Try to send the message - the send button has no effect
* Delete and re-enter the text - the send button works again
Related to #843. @grote I'm guessing this may be fixed already on your 843-landscape-keyboard branch, as some relevant code has changed - could you please test?Android 1.1Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1509Introduction onboarding reappears after rotating screen2019-04-23T14:46:12ZakwizgranIntroduction onboarding reappears after rotating screenSteps to reproduce:
* Create a new account
* Add two test contacts
* Open one of the conversations
* The introduction onboarding is shown (as expected)
* Dismiss the onboarding by pressing the back button or tapping inside or outside the...Steps to reproduce:
* Create a new account
* Add two test contacts
* Open one of the conversations
* The introduction onboarding is shown (as expected)
* Dismiss the onboarding by pressing the back button or tapping inside or outside the circle (doesn't matter which)
* Rotate the screen
* The onboarding is shown again (bug)
* After leaving and re-entering the conversation, the onboarding isn't shown again (as expected) - this suggests it's an issue with the ViewModel
Tested on the Moto G 4G (Android 5.1).Android 1.1Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1508NPE when deleting app data2019-03-22T15:04:58ZakwizgranNPE when deleting app dataStacktrace:
```
E/ACRA (15625): ACRA caught a NullPointerException for org.briarproject.briar.android.debug
E/ACRA (15625): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getName()' ...Stacktrace:
```
E/ACRA (15625): ACRA caught a NullPointerException for org.briarproject.briar.android.debug
E/ACRA (15625): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.io.File.getName()' on a null object reference
E/ACRA (15625): at org.briarproject.bramble.account.AndroidAccountManager.deleteAppData(AndroidAccountManager.java:115)
E/ACRA (15625): at org.briarproject.bramble.account.AndroidAccountManager.deleteAccount(AndroidAccountManager.java:79)
E/ACRA (15625): at org.briarproject.bramble.account.BriarAccountManager.deleteAccount(BriarAccountManager.java:27)
E/ACRA (15625): at org.briarproject.briar.android.splash.SplashScreenActivity.startNextActivity(SplashScreenActivity.java:85)
E/ACRA (15625): at org.briarproject.briar.android.splash.SplashScreenActivity.lambda$onCreate$0(SplashScreenActivity.java:64)
E/ACRA (15625): at org.briarproject.briar.android.splash.-$$Lambda$SplashScreenActivity$KPoQeENQNPCou2oWqt2CDnWR61c.run(lambda)
E/ACRA (15625): at android.os.Handler.handleCallback(Handler.java:739)
E/ACRA (15625): at android.os.Handler.dispatchMessage(Handler.java:95)
E/ACRA (15625): at android.os.Looper.loop(Looper.java:135)
E/ACRA (15625): at android.app.ActivityThread.main(ActivityThread.java:5343)
E/ACRA (15625): at java.lang.reflect.Method.invoke(Native Method)
E/ACRA (15625): at java.lang.reflect.Method.invoke(Method.java:372)
E/ACRA (15625): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
E/ACRA (15625): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
```Android 1.1akwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/1507API 29: TorPlugin does not start2020-11-16T10:35:52ZTorsten GroteAPI 29: TorPlugin does not startOn Android Q, calling `exec()` on writable application files is [a W^X violation](https://issuetracker.google.com/issues/128554619#comment4) and represents an unsafe application practice, because apps with vulnerabilities can be exploite...On Android Q, calling `exec()` on writable application files is [a W^X violation](https://issuetracker.google.com/issues/128554619#comment4) and represents an unsafe application practice, because apps with vulnerabilities can be exploited to download code and execute it. We currently extract the Tor and obfsproxy binaries into our writeable app data dir, so we are affected by this policy change.
It should still be possible to package the binaries into the application's native libs directory and enable `android:extractNativeLibs=true` (is enabled by default), and then call `exec()` on the read-only `/data/app` artifacts. A similar approach is done with the `wrap.sh` functionality, documented at https://developer.android.com/ndk/guides/wrap-script#packaging_wrapsh .
> Additionally, please be aware that executables executed via exec() are not managed according to the Android process lifecycle, and generally speaking, exec() is discouraged from Android applications. While not Android documentation, https://stackoverflow.com/questions/16179062/using-exec-with-ndk covers this in some detail. Relying on exec() **may be problematic in future Android versions**.
Fixing this, might make #1278 a lot easier.Android 1.2akwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/1506Provide a Tor/obfsproxy arm64 binary2019-10-14T16:34:24ZTorsten GroteProvide a Tor/obfsproxy arm64 binary[Starting August 1, 2019](https://android-developers.googleblog.com/2019/01/get-your-apps-ready-for-64-bit.html), all new apps and app updates that include native code are required to provide 64-bit versions in addition to 32-bit version...[Starting August 1, 2019](https://android-developers.googleblog.com/2019/01/get-your-apps-ready-for-64-bit.html), all new apps and app updates that include native code are required to provide 64-bit versions in addition to 32-bit versions when publishing to Google Play.
We currently do not provide 64-bit binaries of Tor and obfsproxy for arm and x86, but should do so.
As the APK size will get quite big with the additional binaries, we should consider split APKs (#1278).Android 1.2Torsten GroteTorsten Grote2019-07-31https://code.briarproject.org/briar/briar/-/issues/1501Show new contacts at the top of the contact list2019-03-22T16:54:17ZTorsten GroteShow new contacts at the top of the contact listCurrently, new contacts get added to the bottom of the list. They should be at the top for better visibility.Currently, new contacts get added to the bottom of the list. They should be at the top for better visibility.Android 1.2Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1500Check PNGs for exploits before passing them to Android2021-11-04T11:03:44ZakwizgranCheck PNGs for exploits before passing them to AndroidWe need to find out how to detect PNGs that can exploit this vulnerability, so we can avoid passing them to Android:
https://www.zdnet.com/article/opening-this-image-file-grants-hackers-access-to-your-android-phone/
Subtask of #1237.We need to find out how to detect PNGs that can exploit this vulnerability, so we can avoid passing them to Android:
https://www.zdnet.com/article/opening-this-image-file-grants-hackers-access-to-your-android-phone/
Subtask of #1237.Android 1.4https://code.briarproject.org/briar/briar/-/issues/1499Tor process crashes2023-09-15T16:50:20ZTorsten GroteTor process crashesWhen enabling/disabling the Tor plugin in quick succession one sometimes can get the Tor process to exit.
There's two ways that have been observed so far:
The first one prints an exception whenever trying to make control commands:
```r...When enabling/disabling the Tor plugin in quick succession one sometimes can get the Tor process to exit.
There's two ways that have been observed so far:
The first one prints an exception whenever trying to make control commands:
```ruby
W/TorPlugin: java.io.IOException: Tor is no longer running
java.io.IOException: Tor is no longer running
at net.freehaven.tor.control.TorControlConnection.react(TorControlConnection.java:325)
```
The second one doesn't print anything to the log. The TorPlugin seems to hang (only prints on the event thread) and signing out of Briar isn't possible anymore. It just hangs at the sign out fragment.Android 1.4akwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/1498Use Meek-Lite pluggable transport in China2019-02-22T12:28:21ZTorsten GroteUse Meek-Lite pluggable transport in ChinaThe obfs4 project [includes a meek-likte transport](https://github.com/Yawning/obfs4/tree/master/transports/meeklite) that we could use to circumvent Tor censorship in China.The obfs4 project [includes a meek-likte transport](https://github.com/Yawning/obfs4/tree/master/transports/meeklite) that we could use to circumvent Tor censorship in China.Android 1.1Torsten GroteTorsten Grote2019-02-28https://code.briarproject.org/briar/briar/-/issues/1496Check whether we're affected by implicit broadcast restrictions on Android 8+2019-02-21T10:32:35ZakwizgranCheck whether we're affected by implicit broadcast restrictions on Android 8+Apps targetting Android 8+ don't receive certain implicit broadcasts. Check whether we're affected.
https://developer.android.com/about/versions/oreo/background
Subtask of #1260.Apps targetting Android 8+ don't receive certain implicit broadcasts. Check whether we're affected.
https://developer.android.com/about/versions/oreo/background
Subtask of #1260.Android 1.1Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1493Latest message isn't always fully visible after loading conversation2021-11-04T11:03:44ZakwizgranLatest message isn't always fully visible after loading conversationWhen opening a private conversation where the latest message contains multiple images, the bottom of the latest message is sometimes below the viewport, making it necessary to scroll down manually to see the whole message. This can happe...When opening a private conversation where the latest message contains multiple images, the bottom of the latest message is sometimes below the viewport, making it necessary to scroll down manually to see the whole message. This can happen regardless of whether the latest message has any text.
Logging shows that we're eagerly loading the text of the latest message, if it has any, and automatically scrolling to the bottom after adding the text and images to each message, as expected. But for some reason this scrolling doesn't make the whole of the latest message visible.
Steps to reproduce:
* Check out the 1242-display-image-attachments-fake-data branch (commit 54082209)
* Create a test contact with no messages
* Repeatedly send a message to the contact, close and reopen the conversation (fake attachments will be added to the message when the conversation's reopened)
* Once there's more than a screenful of messages and the latest message has multiple images, repeatedly close and reopen the conversation without sending any more messages
* It may take a lot of tries to reproduce the bug
The bug seems to be a race condition. I was able to reproduce it on the Nexus 5X and the Moto G 4G.
Subtask of #1237.Android 1.4https://code.briarproject.org/briar/briar/-/issues/1492Race between sending and validating private message attachments2019-04-23T14:46:01ZakwizgranRace between sending and validating private message attachmentsWhen writing a private message, we preview the attachments and remove any attachments that can't be loaded (either because the content provider supplies a MIME type with no known extension, or because Glide can't load the preview, or, in...When writing a private message, we preview the attachments and remove any attachments that can't be loaded (either because the content provider supplies a MIME type with no known extension, or because Glide can't load the preview, or, in the case of a single attachment, because we can't determine the image size). If the send button is clicked before an invalid attachment has been removed from the list, the invalid attachment will be sent. At the moment this causes two problems:
* Inconsistent behaviour depending on how quickly the attachments load and the user clicks the send button
* False UI feedback (the "Could not attach image" toast is shown but the attachment is sent)
Once the backend for image attachments has been implemented (#1434), we may have additional problems:
* The adapter item created for the message may not match the attachments that were actually sent
* We may not be able to display our own messages if invalid attachments were sent
Subtask of #1438.Android 1.3Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1487Investigate OOM errors in nightly tests2021-08-27T11:34:07ZakwizgranInvestigate OOM errors in nightly testsThe nightly tests have started to fail regularly due to OOM errors. Investigate whether memory usage has increased significantly.The nightly tests have started to fail regularly due to OOM errors. Investigate whether memory usage has increased significantly.Android 1.3akwizgranakwizgranhttps://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/1485FileUriExposedException for custom notification sound2019-11-06T09:47:51ZakwizgranFileUriExposedException for custom notification sound* Android version: 7.1.2
* Phone model: Xiaomi Redmi 5A (riva)
* Briar version: 1.0.1 (1833efa)
Stacktrace:
```
android.os.FileUriExposedException: file:///storage/emulated/0/Ringtones/Unlock.wav exposed beyond app through Notification....* Android version: 7.1.2
* Phone model: Xiaomi Redmi 5A (riva)
* Briar version: 1.0.1 (1833efa)
Stacktrace:
```
android.os.FileUriExposedException: file:///storage/emulated/0/Ringtones/Unlock.wav exposed beyond app through Notification.sound
at android.os.StrictMode.onFileUriExposed(StrictMode.java:1796)
at android.net.Uri.checkFileUriExposed(Uri.java:2346)
at android.app.NotificationManager.notifyAsUser(NotificationManager.java:300)
at android.app.NotificationManager.notify(NotificationManager.java:284)
at android.app.NotificationManager.notify(NotificationManager.java:268)
at org.briarproject.briar.android.AndroidNotificationManagerImpl.updateGroupMessageNotification(AndroidNotificationManagerImpl.java:439)
at org.briarproject.briar.android.AndroidNotificationManagerImpl.lambda$showGroupMessageNotification$5$AndroidNotificationManagerImpl(AndroidNotificationManagerImpl.java:383)
at org.briarproject.briar.android.AndroidNotificationManagerImpl$$Lambda$6.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6205)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
```
I don't know why StrictMode threw this exception rather than just logging it, but judging by the package name this was a release build.Android 1.2Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1484NPE when creating contact alias dialog2018-12-18T17:47:19ZakwizgranNPE when creating contact alias dialog* Android version: 8.1.0
* Phone model: Xiaomi Mi A1 (tissot)
* Briar version: 1.1.5 (8f4c3c4)
Stacktrace:
```
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.briarproject.briar.android/org.briarproject.briar.andr...* Android version: 8.1.0
* Phone model: Xiaomi Mi A1 (tissot)
* Briar version: 1.1.5 (8f4c3c4)
Stacktrace:
```
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.briarproject.briar.android/org.briarproject.briar.android.conversation.ConversationActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void org.briarproject.briar.android.activity.ActivityComponent.inject(org.briarproject.briar.android.conversation.AliasDialogFragment)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2792)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2870)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4723)
at android.app.ActivityThread.-wrap18(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1607)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:172)
at android.app.ActivityThread.main(ActivityThread.java:6590)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void org.briarproject.briar.android.activity.ActivityComponent.inject(org.briarproject.briar.android.conversation.AliasDialogFragment)' on a null object reference
at org.briarproject.briar.android.conversation.AliasDialogFragment.onCreate(AliasDialogFragment.java:43)
at android.support.v4.app.Fragment.performCreate(Fragment.java:2414)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1418)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3269)
at android.support.v4.app.FragmentManagerImpl.dispatchCreate(FragmentManager.java:3223)
at android.support.v4.app.FragmentController.dispatchCreate(FragmentController.java:190)
at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:369)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:85)
at org.briarproject.briar.android.activity.BaseActivity.onCreate(BaseActivity.java:80)
at org.briarproject.briar.android.conversation.ConversationActivity.onCreate(ConversationActivity.java:183)
at android.app.Activity.performCreate(Activity.java:7023)
at android.app.Activity.performCreate(Activity.java:7014)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1215)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2745)
... 10 more
java.lang.NullPointerException: Attempt to invoke interface method 'void org.briarproject.briar.android.activity.ActivityComponent.inject(org.briarproject.briar.android.conversation.AliasDialogFragment)' on a null object reference
at org.briarproject.briar.android.conversation.AliasDialogFragment.onCreate(AliasDialogFragment.java:43)
at android.support.v4.app.Fragment.performCreate(Fragment.java:2414)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1418)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3269)
at android.support.v4.app.FragmentManagerImpl.dispatchCreate(FragmentManager.java:3223)
at android.support.v4.app.FragmentController.dispatchCreate(FragmentController.java:190)
at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:369)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:85)
at org.briarproject.briar.android.activity.BaseActivity.onCreate(BaseActivity.java:80)
at org.briarproject.briar.android.conversation.ConversationActivity.onCreate(ConversationActivity.java:183)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3269)
at android.support.v4.app.FragmentManagerImpl.dispatchCreate(FragmentManager.java:3223)
at android.support.v4.app.FragmentController.dispatchCreate(FragmentController.java:190)
at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:369)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:85)
at org.briarproject.briar.android.activity.BaseActivity.onCreate(BaseActivity.java:80)
at org.briarproject.briar.android.conversation.ConversationActivity.onCreate(ConversationActivity.java:183)
at android.app.Activity.performCreate(Activity.java:7023)
at android.app.Activity.performCreate(Activity.java:7014)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1215)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2745)
... 10 more
java.lang.NullPointerException: Attempt to invoke interface method 'void org.briarproject.briar.android.activity.ActivityComponent.inject(org.briarproject.briar.android.conversation.AliasDialogFragment)' on a null object reference
at org.briarproject.briar.android.conversation.AliasDialogFragment.onCreate(AliasDialogFragment.java:43)
at android.support.v4.app.Fragment.performCreate(Fragment.java:2414)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1418)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3269)
at android.support.v4.app.FragmentManagerImpl.dispatchCreate(FragmentManager.java:3223)
at android.support.v4.app.FragmentController.dispatchCreate(FragmentController.java:190)
at android.support.v4.app.FragmentActivity.onCreate(FragmentActivity.java:369)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:85)
at org.briarproject.briar.android.activity.BaseActivity.onCreate(BaseActivity.java:80)
at org.briarproject.briar.android.conversation.ConversationActivity.onCreate(ConversationActivity.java:183)
at android.app.Activity.performCreate(Activity.java:7023)
at android.app.Activity.performCreate(Activity.java:7014)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1215)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2745)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2870)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4723)
at android.app.ActivityThread.-wrap18(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1607)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:172)
at android.app.ActivityThread.main(ActivityThread.java:6590)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
```Android 1.1Torsten GroteTorsten Grote