briar issueshttps://code.briarproject.org/briar/briar/-/issues2022-05-26T15:45:43Zhttps://code.briarproject.org/briar/briar/-/issues/1526AssertionError: Already have a database key2022-05-26T15:45:43ZakwizgranAssertionError: Already have a database key* Android version: 5.1.1
* Briar version: 1.1.5 (8f4c3c4)
* Phone model: Smartfren Andromax B16C2H
Log:
```
02-01 21:43:52.743 I/CameraView: Releasing camera
02-01 21:43:52.882 I/CameraView: Surface destroyed
02-01 21:43:53.956 I/BaseAc...* Android version: 5.1.1
* Briar version: 1.1.5 (8f4c3c4)
* Phone model: Smartfren Andromax B16C2H
Log:
```
02-01 21:43:52.743 I/CameraView: Releasing camera
02-01 21:43:52.882 I/CameraView: Surface destroyed
02-01 21:43:53.956 I/BaseActivity: Starting NavDrawerActivity
02-01 21:43:54.138 I/BaseActivity: Stopping ContactExchangeActivity
02-01 21:44:13.750 I/BaseActivity: Starting SettingsActivity
02-01 21:44:16.276 I/BaseActivity: Stopping NavDrawerActivity
02-01 21:45:25.374 I/BaseActivity: Starting NavDrawerActivity
02-01 21:45:25.556 I/BaseActivity: Stopping SettingsActivity
02-01 21:45:26.976 I/BaseActivity: Starting SetupActivity
02-01 21:45:27.134 I/BaseActivity: Stopping NavDrawerActivity
02-01 21:45:42.017 I/SetupControllerImpl: Creating account
```
Stacktrace:
```
java.lang.AssertionError: Already have a database key
at org.briarproject.bramble.account.AccountManagerImpl.createAccount(AccountManagerImpl.java:163)
at org.briarproject.briar.android.login.SetupControllerImpl.lambda$createAccount$0(SetupControllerImpl.java:101)
at org.briarproject.briar.android.login.-$$Lambda$SetupControllerImpl$u65UGqVCiIKOcwdlXIj7schCrSA.run(lambda)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
```
Looks like this could be related to previous bugs where SetupActivity reappears after setup is complete, or somehow appears in a session where setup didn't even take place (#1189, #1327, #1396). The log here shows that the user navigated from ContactExchangeActivity -> NavDrawerActivity -> SettingsActivity -> NavDrawerActivity -> SetupActivity. Unfortunately the log isn't long enough to show whether setup occurred in this session.Android 1.4https://code.briarproject.org/briar/briar/-/issues/1525IllegalThreadStateException when starting contact exchange task2021-11-04T11:03:43ZakwizgranIllegalThreadStateException when starting contact exchange task* Android version: 8.1.0
* Briar version: 1.1.5 (8f4c3c4)
* Phone model: OnePlus A0001 (bacon)
* User feedback: "Tried to connect @ 35C3 during the event."
Stacktrace:
```
java.lang.IllegalThreadStateException
at java.lang.Threa...* Android version: 8.1.0
* Briar version: 1.1.5 (8f4c3c4)
* Phone model: OnePlus A0001 (bacon)
* User feedback: "Tried to connect @ 35C3 during the event."
Stacktrace:
```
java.lang.IllegalThreadStateException
at java.lang.Thread.start(Thread.java:724)
at org.briarproject.bramble.contact.ContactExchangeTaskImpl.startExchange(ContactExchangeTaskImpl.java:113)
at org.briarproject.briar.android.keyagreement.ContactExchangeActivity.lambda$startContactExchange$0(ContactExchangeActivity.java:66)
at org.briarproject.briar.android.keyagreement.-$$Lambda$ContactExchangeActivity$fyog59L3yYwzJYBvp0hzYrpHYRo.run(Unknown Source:4)
at org.briarproject.briar.android.controller.DbControllerImpl.lambda$runOnDbThread$0(DbControllerImpl.java:35)
at org.briarproject.briar.android.controller.-$$Lambda$DbControllerImpl$SwC9ndeQwlnMM-VN8yvqCJG1ESc.run(Unknown Source:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
```
This exception is thrown if start() is called when the thread isn't in the initial state. A couple of guesses about how this could have happened:
* A ContactExchangeTask instance was reused across multiple contacts
* A ContactExchangeActivity instance received multiple KeyAgreementFinishedEvents, possibly relating to different contacts, each of which cause it to start its ContactExchangeTask
Assigning to myself as I'm refactoring this code for remote contacts.Android 1.4https://code.briarproject.org/briar/briar/-/issues/1524DeadSystemException2022-07-13T14:58:33ZakwizgranDeadSystemException* Android version: 8.1.0
* Briar version: "N/A" (perhaps the package manager is unavailable?)
* Phone model: Motorola Moto G4 Plus (lineage_athene)
Stacktrace:
```
android.os.DeadSystemException
at android.os.PowerManager$WakeLo...* Android version: 8.1.0
* Briar version: "N/A" (perhaps the package manager is unavailable?)
* Phone model: Motorola Moto G4 Plus (lineage_athene)
Stacktrace:
```
android.os.DeadSystemException
at android.os.PowerManager$WakeLock.release(PowerManager.java:1463)
at android.os.PowerManager$WakeLock$1.run(PowerManager.java:1328)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
```
[Docs](https://developer.android.com/reference/android/os/DeadSystemException.html) for this exception:
> The core Android system has died and is going through a runtime restart. All running apps will be promptly killed.
[This thread](https://groups.google.com/forum/#!topic/android-platform/VVHA6-eRB3c) explains that a runtime restart is a form of soft reboot.
Doesn't look like there's anything we can do here. Creating this ticket for documentation only.https://code.briarproject.org/briar/briar/-/issues/1523RuntimeException: Camera is being used after Camera.release() was called2021-03-24T16:26:51ZakwizgranRuntimeException: Camera is being used after Camera.release() was called* Android version: 6.0.1
* Briar version: 1.1.5 (8f4c3c4)
* Phone models: Samsung GT-I9100 and GT-I9300 (m0xx)
* User feedback: "I could not scan other device. They could scan me. I have Replicant 6.003."
Stacktrace:
```
java.lang.Runti...* Android version: 6.0.1
* Briar version: 1.1.5 (8f4c3c4)
* Phone models: Samsung GT-I9100 and GT-I9300 (m0xx)
* User feedback: "I could not scan other device. They could scan me. I have Replicant 6.003."
Stacktrace:
```
java.lang.RuntimeException: Camera is being used after Camera.release() was called
at android.hardware.Camera.native_getParameters(Native Method)
at android.hardware.Camera.getParameters(Camera.java:1999)
at android.hardware.Camera$EventHandler.handleMessage(Camera.java:1152)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5461)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
```
We have four reports of this crash, one on the GT-I9100 (running Replicant) and three on the GT-I9300 (probably also running Replicant, as it's the same Android version as the GT-I9100, and the version's too high to be a factory ROM).
This looks like a Replicant bug: camera calls are being made asynchronously. I'll report it upstream. I'm not adding it to the current milestone as there doesn't seem to be anything we can do.https://code.briarproject.org/briar/briar/-/issues/1522IllegalArgumentException when setting contact alias2019-04-03T10:18:21ZakwizgranIllegalArgumentException when setting contact alias* Android version: 4.4.4
* Briar version: 1.1.5 (8f4c3c4)
* Phone model: Samsung GT-S7262 (logan2gxx)
Stacktrace:
```
java.lang.IllegalArgumentException
at org.briarproject.bramble.contact.ContactManagerImpl.setContactAlias(Cont...* Android version: 4.4.4
* Briar version: 1.1.5 (8f4c3c4)
* Phone model: Samsung GT-S7262 (logan2gxx)
Stacktrace:
```
java.lang.IllegalArgumentException
at org.briarproject.bramble.contact.ContactManagerImpl.setContactAlias(ContactManagerImpl.java:138)
at org.briarproject.bramble.contact.ContactManagerImpl.lambda$setContactAlias$4(ContactManagerImpl.java:146)
at org.briarproject.bramble.contact.-$$Lambda$ContactManagerImpl$EfFGAUvRrCV355yeOOy1D8He3mI.run(lambda)
at org.briarproject.bramble.db.DatabaseComponentImpl.transaction(DatabaseComponentImpl.java:177)
at org.briarproject.bramble.contact.ContactManagerImpl.setContactAlias(ContactManagerImpl.java:146)
at org.briarproject.briar.android.conversation.ConversationViewModel.lambda$setContactAlias$2(ConversationViewModel.java:90)
at org.briarproject.briar.android.conversation.-$$Lambda$ConversationViewModel$XcyaPAb6QDHfJV0o5jdtkgo2ULo.run(lambda)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
```
This exception is thrown at ContactManagerImpl line 192 on current master if the alias is empty or too long. The ConversationViewModel checks for an empty alias, but it doesn't look like we're checking the maximum length.Android 1.1Torsten GroteTorsten Grotehttps://code.briarproject.org/briar/briar/-/issues/1521Cannot resolve symbol R after build2020-11-15T19:06:59ZnicedeveloperCannot resolve symbol R after buildI'm also encountering "can not resolve symbol R" error
import org.briarproject.briar.R; , where R is in redI'm also encountering "can not resolve symbol R" error
import org.briarproject.briar.R; , where R is in redhttps://code.briarproject.org/briar/briar/-/issues/1520Stale scroll position is restored after opening blog post2020-11-15T19:08:03ZakwizgranStale scroll position is restored after opening blog postSteps to reproduce:
* Ensure the blog feed has at least a screenful of posts
* Scroll down a few posts
* Rotate the screen to landscape and back to portrait
* The scroll position is remembered, as expected
* Scroll down a few more posts
...Steps to reproduce:
* Ensure the blog feed has at least a screenful of posts
* Scroll down a few posts
* Rotate the screen to landscape and back to portrait
* The scroll position is remembered, as expected
* Scroll down a few more posts
* Tap on a post to open it
* Use the back button to return to the feed
* The scroll position jumps back to where it was when the screen was rotatedhttps://code.briarproject.org/briar/briar/-/issues/1519Password entry and confirmation fields should have descriptions2020-11-15T19:09:36ZakwizgranPassword entry and confirmation fields should have descriptionsGoogle Play's pre-launch report warns that the password entry and confirmation fields should have descriptions for screen reader accessibility.
https://support.google.com/accessibility/android/answer/7158690
This may apply to other fie...Google Play's pre-launch report warns that the password entry and confirmation fields should have descriptions for screen reader accessibility.
https://support.google.com/accessibility/android/answer/7158690
This may apply to other fields in the app, but the automated tests don't yet get past the setup screen.https://code.briarproject.org/briar/briar/-/issues/1518Touch target for screen filter checkbox is too small2020-11-15T19:10:24ZakwizgranTouch target for screen filter checkbox is too smallGoogle Play's pre-launch report warns that the screen filter checkbox should be at least 48dp high for accessibility. The current size varies from 32 to 36dp depending on the device.
The same may be true of other checkboxes, but the aut...Google Play's pre-launch report warns that the screen filter checkbox should be at least 48dp high for accessibility. The current size varies from 32 to 36dp depending on the device.
The same may be true of other checkboxes, but the automated testing doesn't go past the setup screen yet (I'm working on a script to allow it to do so).https://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/1515No dependency for integrity assertion 'com.android.tools.analytics-library:pr...2019-08-14T14:22:52ZnicedeveloperNo dependency for integrity assertion 'com.android.tools.analytics-library:protos:26.2.1:protosi 've got android studio 3.3.2
and receiving an error No dependency for integrity assertion 'com.android.tools.analytics-library:protos:26.2.1:protos-26.2.1.jar:2f371f5b1f551e85ab08be4d6a2873471b3d44afd1ebf6aa3298f3b796bf691f'
everyth...i 've got android studio 3.3.2
and receiving an error No dependency for integrity assertion 'com.android.tools.analytics-library:protos:26.2.1:protos-26.2.1.jar:2f371f5b1f551e85ab08be4d6a2873471b3d44afd1ebf6aa3298f3b796bf691f'
everything is uptodate including SDK Tools, SDK Platforms and SDK Update Sites
What is wrong ? I've searched the Internet, couldn't find anythinghttps://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/1513Bluetooth dialog needs to be dismissed multiple times after rotating screen2020-11-15T19:12:00ZakwizgranBluetooth dialog needs to be dismissed multiple times after rotating screenSteps to reproduce:
* Start to add a nearby contact
* When the Bluetooth permission dialog is visible, rotate the screen
* Dismiss the dialog
* Expected: The dialog only needs to be dismissed once
* Actual: The dialog needs to be dismiss...Steps to reproduce:
* Start to add a nearby contact
* When the Bluetooth permission dialog is visible, rotate the screen
* Dismiss the dialog
* Expected: The dialog only needs to be dismissed once
* Actual: The dialog needs to be dismissed once, plus once for every time the screen was rotated
Test devices:
* Sony Xperia Tipo (Android 4.0.4)
* Motorola Moto E3 (Android 6.0)https://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/1511Settings to increase polling time2021-12-13T14:13:45ZDmitry RubtsovSettings to increase polling timeSince Briar takes a lot of battery power (up to 20% of my Galaxy Note 9), I want to customize update frequency for incoming messages. I think, that it is easy and usefulSince Briar takes a lot of battery power (up to 20% of my Galaxy Note 9), I want to customize update frequency for incoming messages. I think, that it is easy and usefulhttps://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.2akwizgranakwizgran