briar issueshttps://code.briarproject.org/groups/briar/-/issues2023-03-13T22:15:02Zhttps://code.briarproject.org/briar/briar-desktop/-/issues/394Reconsider usage of `GlobalScope`2023-03-13T22:15:02ZMikolai GütschowReconsider usage of `GlobalScope`The following discussion from !240 should be addressed:
- [ ] @ialokim started a [discussion](https://code.briarproject.org/briar/briar-desktop/-/merge_requests/240#note_70890): (+3 comments)
> Which delicate API do you use here?
...The following discussion from !240 should be addressed:
- [ ] @ialokim started a [discussion](https://code.briarproject.org/briar/briar-desktop/-/merge_requests/240#note_70890): (+3 comments)
> Which delicate API do you use here?
>
> ----
> `GlobalScope.launch {}` which seems to be ok to use here, but if you have another idea like an injected app-wide scope, please let me know.https://code.briarproject.org/briar/briar-desktop/-/issues/393Use `rememberSaveable` wherever appropriate for Android2022-09-23T11:46:27ZMikolai GütschowUse `rememberSaveable` wherever appropriate for AndroidQuoting from !240:
- [ ] @ialokim started a [discussion](https://code.briarproject.org/briar/briar-desktop/-/merge_requests/240#note_70876): (+4 comments)
> We have always used `remember` instead of `rememberSaveable`. I know that...Quoting from !240:
- [ ] @ialokim started a [discussion](https://code.briarproject.org/briar/briar-desktop/-/merge_requests/240#note_70876): (+4 comments)
> We have always used `remember` instead of `rememberSaveable`. I know that this is needed on Android for, e.g., configuration changes. Are you aware of any consequences on Desktop though?
>
> ----
>
> No, don't know how this works on desktop. However, I'd argue best to use `rememberSaveable` everywhere where we'd want it in Android, to a) practice using it and recognizing when it is needed and b) to allow us one day to unify the UI codebases of both projects in an easier fashion.https://code.briarproject.org/briar/briar/-/issues/2365DesktopLifecycleModule extends LifecycleModule which probably doesn't work2022-09-21T19:16:45ZSebastianDesktopLifecycleModule extends LifecycleModule which probably doesn't workSee [this discussion](https://code.briarproject.org/briar/briar/-/merge_requests/1699#note_71081) on IoModule and TestIoModule which had a similar problem.See [this discussion](https://code.briarproject.org/briar/briar/-/merge_requests/1699#note_71081) on IoModule and TestIoModule which had a similar problem.https://code.briarproject.org/briar/briar-desktop/-/issues/390Image compressor unable to compress file to 32kb2022-12-09T08:26:46ZSebastianImage compressor unable to compress file to 32kbI found an image for which our ImageCompressor implementation fails to compress it to the required file size:
https://unsplash.com/photos/EHcIO_3DbOg
This is the log:
```
Exception in thread "Thread-13" java.io.IOException
at o...I found an image for which our ImageCompressor implementation fails to compress it to the required file size:
https://unsplash.com/photos/EHcIO_3DbOg
This is the log:
```
Exception in thread "Thread-13" java.io.IOException
at org.briarproject.briar.desktop.attachment.media.ImageCompressorImpl.compressImage(ImageCompressorImpl.kt:86)
at org.briarproject.briar.desktop.conversation.ConversationViewModel$sendMessage$1.invoke(ConversationViewModel.kt:180)
at org.briarproject.briar.desktop.conversation.ConversationViewModel$sendMessage$1.invoke(ConversationViewModel.kt:175)
at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)
```
[ImageCompressorImpl.kt:86](https://code.briarproject.org/briar/briar-desktop/-/blob/main/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/attachment/media/ImageCompressorImpl.kt#L86)
We have this there:
```kotlin
for (quality in 100 downTo 1 step 10) {
val jpgWriter = ImageIO.getImageWritersByFormatName("jpg").next()
jpgWriter.output = ImageIO.createImageOutputStream(out)
val jpgWriteParam = jpgWriter.defaultWriteParam
jpgWriteParam.compressionMode = ImageWriteParam.MODE_EXPLICIT
jpgWriteParam.compressionQuality = quality / 100f
val outputImage = IIOImage(scaled, null, null)
jpgWriter.write(null, outputImage, jpgWriteParam)
jpgWriter.dispose()
if (out.size() <= MAX_IMAGE_SIZE) {
LOG.i { "Compressed image to ${out.size()} bytes, quality $quality" }
return ByteArrayInputStream(out.toByteArray())
}
out.reset()
}
throw IOException()
```
I have not yet debugged this, but I'm wondering what the lowest quality is that we actually try. We start with 100 but do we reach 1 or 10 as the last value? Edit: I just checked. We never reach 1 but the lowest value we try is 10. I guess we probably should change this to try quality 1 and in doubt even reduce image dimensions if even that does not suffice.
This is the full image:
![imran-hecimovic-EHcIO_3DbOg-unsplash](/uploads/800f92fcdac18eb25a9e43417961d99a/imran-hecimovic-EHcIO_3DbOg-unsplash.jpg)https://code.briarproject.org/briar/public-mesh-research/-/issues/15Initial investigations: wifi client2023-08-28T16:08:02ZakwizgranInitial investigations: wifi clientInvestigate our options for connecting to a wifi hotspot (which could be a WFD legacy mode hotspot) as a wifi client, rather than by using the WFD API.
The APIs available for connecting to wifi networks have changed a lot over the years...Investigate our options for connecting to a wifi hotspot (which could be a WFD legacy mode hotspot) as a wifi client, rather than by using the WFD API.
The APIs available for connecting to wifi networks have changed a lot over the years, so we'll need to test on a lot of different API versions.
Questions:
* Can we scan for available networks? How often? What permissions are needed? Can we access the SSIDs of the networks?
* Can we request a connection to a network that's not currently in range? If so, do we connect automatically when the network comes in range? What if the client's screen is off? Is the connection kept if the network doesn't have internet access?
* If two or more devices are providing hotspots with the same SSID and password, can a client roam from one to the other?
* If a client has previously connected to a hotspot and accepted the dialog that warns about no internet access, is the dialog shown again when reconnecting to the same hotspot? Is it shown again when connecting to a different device's hotspot that uses the same SSID and password?
Subtask of #1. Related to #5.Public mesh researchakwizgranakwizgranhttps://code.briarproject.org/briar/briar/-/issues/2364Do we need a revocation mechanism or remote-destruction? Is it helpful?2022-09-15T09:20:43ZThomasDo we need a revocation mechanism or remote-destruction? Is it helpful?Hi!
I found this ancient thread:https://sourceforge.net/p/briar/mailman/briar-devel/thread/4F33A780.8050705%40gmx.com/#msg28809772
>(Starting a new thread for this because the old thread was getting frayed.)
>
>On 09/02/12 03:14, awgh wr...Hi!
I found this ancient thread:https://sourceforge.net/p/briar/mailman/briar-devel/thread/4F33A780.8050705%40gmx.com/#msg28809772
>(Starting a new thread for this because the old thread was getting frayed.)
>
>On 09/02/12 03:14, awgh wrote:
>> - Cert revocations are signed with the cert they're revoking. If that
>> cert isn't in the local table, this is one string compare. Not much of
>> a DoS.
>
>Cool, I think we have the beginnings of a design here. Thanks Ben!
>
>1. Each user creates a personal keypair (this is separate from any
>pseudonyms she may create).
>
>2. The user creates a revocation certificate and signs it with the
>private key.
>
>3. The user applies a secret sharing algorithm to the revocation
>certificate. She chooses a few trusted friends and sends each friend a
>SAVE_SHARE message, which contains a share of the revocation certificate
>and the ID of the key.
>
>4. The user creates a KEY_ID message containing the ID of the key and
>sends it to any contacts who didn't receive shares.
>
>5. If a friend thinks the user's key has been compromised, she creates a
>REVOKE_SHARE message containing her share of the certificate and the ID
>of the key. She stores the message and sends it to all her contacts.
>
>6. If a user receives a REVOKE_SHARE message and recognises the ID, she
>stores the message and forwards it to all her contacts.
>
>7. If a user receives enough shares to reconstruct the revocation
>certificate, she considers the key revoked. She creates a REVOKE_CERT
>message containing the certificate, stores the message and sends it to
>all her contacts.
>
>8. If a user receives a REVOKE_CERT message and recognises the ID, she
>considers the key revoked, stores the message and forwards it to all her
>contacts.
>
>Does this look like a reasonable start?
>
>Cheers,
>Michael
I know that a lot has changed since then. But do we need a revocation mechanism in Briar now?
It also made me think: Is a remote-identity-destruction-mechanism helpful? (If the phone gets into the wrong hands and the phone can still access another contact some way - that contacts can together derive a revocation-key which tells the phone to delete the Briar-Identity?) Or is that remote-mechanism more in the scope of a panic-button-app?https://code.briarproject.org/briar/briar-spec/-/issues/16Not documented: What if BSP-Content > max length of frame data2022-09-15T09:05:44ZThomasNot documented: What if BSP-Content > max length of frame dataHi!
I already got that info through debugging, but I didn't find in the doc what happend when BSP-Data is bigger than the content of a BTP-Frame is allowed to be - that is is just sliced and the next frame starts directly with the conten...Hi!
I already got that info through debugging, but I didn't find in the doc what happend when BSP-Data is bigger than the content of a BTP-Frame is allowed to be - that is is just sliced and the next frame starts directly with the content without having a header.https://code.briarproject.org/briar/briar-spec/-/issues/15clarify things around contact initiation2022-09-15T08:49:39ZThomasclarify things around contact initiationHi!
It it not really clear for me when reading the Specs when BHP is used. Basically it is only used currently in the Endpoint created in.
I would add clarification to BHP, BRP and also generally tackle BHP+BRP in https://code.briarproje...Hi!
It it not really clear for me when reading the Specs when BHP is used. Basically it is only used currently in the Endpoint created in.
I would add clarification to BHP, BRP and also generally tackle BHP+BRP in https://code.briarproject.org/briar/briar/-/wikis/A-Quick-Overview-of-the-Protocol-Stack .
The Key Agreement Protocol (https://chat.briarproject.org/briar/pl/rzro8mqxx7fz9x3cfmaejrkkbr ) is also currently never mentioned or specified.https://code.briarproject.org/briar/public-mesh-research/-/issues/14Initial investigations: companion device pairing2023-08-28T16:08:02ZakwizgranInitial investigations: companion device pairinghttps://developer.android.com/guide/topics/connectivity/companion-device-pairinghttps://developer.android.com/guide/topics/connectivity/companion-device-pairingPublic mesh researchSebastianSebastianhttps://code.briarproject.org/briar/public-mesh-research/-/issues/13Evaluate testing libraries for automating mesh experiments2023-08-28T16:08:02ZakwizgranEvaluate testing libraries for automating mesh experimentsEvaluate libraries designed for automated on-device testing to see whether any of them would be suitable for automating mesh experiments that need to run on real devices.
* https://www.softwaretestingmagazine.com/tools/open-source-andro...Evaluate libraries designed for automated on-device testing to see whether any of them would be suitable for automating mesh experiments that need to run on real devices.
* https://www.softwaretestingmagazine.com/tools/open-source-android-testing-tools/
* https://android.googlesource.com/platform/tools/test/connectivity/+/master/acts
* https://source.android.com/docs/core/connect/acts
* https://source.android.com/docs/core/connect/acts-advanced-guide
* https://android.googlesource.com/platform/external/sl4a/+/master/README.md
* https://github.com/google/mobly
* https://github.com/google/mobly/issues/666Public mesh researchSebastianSebastianhttps://code.briarproject.org/briar/briar-mailbox/-/issues/161About screen2023-08-28T16:00:10ZakwizgranAbout screenAdd a screen that shows the Mailbox version, to help with debugging.Add a screen that shows the Mailbox version, to help with debugging.https://code.briarproject.org/briar/briar-desktop/-/issues/385IOException on startup2023-04-19T14:32:03ZMikolai GütschowIOException on startupOn current `main`, but only marked as warning at logging time. Doesn't seem to cause further issues, but should probably be adressed at some point.
```
10:34:59.932 [main] WARN o.b.b.s.UnixSecureRandomProvider - java.io.IOException: Op...On current `main`, but only marked as warning at logging time. Doesn't seem to cause further issues, but should probably be adressed at some point.
```
10:34:59.932 [main] WARN o.b.b.s.UnixSecureRandomProvider - java.io.IOException: Operation not permitted
java.io.IOException: Operation not permitted
at java.base/java.io.FileOutputStream.writeBytes(Native Method)
at java.base/java.io.FileOutputStream.write(FileOutputStream.java:349)
at java.base/java.io.DataOutputStream.writeLong(DataOutputStream.java:230)
at org.briarproject.bramble.system.AbstractSecureRandomProvider.writeToEntropyPool(AbstractSecureRandomProvider.java:24)
at org.briarproject.bramble.system.UnixSecureRandomProvider.writeSeed(UnixSecureRandomProvider.java:49)
at org.briarproject.bramble.system.UnixSecureRandomProvider.getProvider(UnixSecureRandomProvider.java:41)
at org.briarproject.bramble.crypto.CryptoComponentImpl.<init>(CryptoComponentImpl.java:85)
at org.briarproject.bramble.crypto.CryptoModule.provideCryptoComponent(CryptoModule.java:32)
at org.briarproject.bramble.crypto.CryptoModule_ProvideCryptoComponentFactory.provideCryptoComponent(CryptoModule_ProvideCryptoComponentFactory.java:42)
at org.briarproject.bramble.crypto.CryptoModule_ProvideCryptoComponentFactory.get(CryptoModule_ProvideCryptoComponentFactory.java:31)
at org.briarproject.bramble.crypto.CryptoModule_ProvideCryptoComponentFactory.get(CryptoModule_ProvideCryptoComponentFactory.java:10)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at org.briarproject.bramble.sync.MessageFactoryImpl_Factory.get(MessageFactoryImpl_Factory.java:21)
at org.briarproject.bramble.sync.MessageFactoryImpl_Factory.get(MessageFactoryImpl_Factory.java:8)
at org.briarproject.bramble.sync.SyncModule_ProvideMessageFactoryFactory.get(SyncModule_ProvideMessageFactoryFactory.java:26)
at org.briarproject.bramble.sync.SyncModule_ProvideMessageFactoryFactory.get(SyncModule_ProvideMessageFactoryFactory.java:9)
at org.briarproject.bramble.db.DatabaseModule_ProvideDatabaseFactory.get(DatabaseModule_ProvideDatabaseFactory.java:36)
at org.briarproject.bramble.db.DatabaseModule_ProvideDatabaseFactory.get(DatabaseModule_ProvideDatabaseFactory.java:12)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at org.briarproject.bramble.db.DatabaseModule_ProvideDatabaseComponentFactory.get(DatabaseModule_ProvideDatabaseComponentFactory.java:40)
at org.briarproject.bramble.db.DatabaseModule_ProvideDatabaseComponentFactory.get(DatabaseModule_ProvideDatabaseComponentFactory.java:13)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at org.briarproject.bramble.lifecycle.LifecycleManagerImpl_Factory.get(LifecycleManagerImpl_Factory.java:30)
at org.briarproject.bramble.lifecycle.LifecycleManagerImpl_Factory.get(LifecycleManagerImpl_Factory.java:10)
at org.briarproject.bramble.lifecycle.LifecycleModule_ProvideLifecycleManagerFactory.get(LifecycleModule_ProvideLifecycleManagerFactory.java:26)
at org.briarproject.bramble.lifecycle.LifecycleModule_ProvideLifecycleManagerFactory.get(LifecycleModule_ProvideLifecycleManagerFactory.java:9)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at org.briarproject.bramble.cleanup.CleanupModule_ProvideCleanupManagerFactory.get(CleanupModule_ProvideCleanupManagerFactory.java:35)
at org.briarproject.bramble.cleanup.CleanupModule_ProvideCleanupManagerFactory.get(CleanupModule_ProvideCleanupManagerFactory.java:11)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at org.briarproject.briar.desktop.DaggerBriarDesktopTestApp.injectEagerSingletons(DaggerBriarDesktopTestApp.java:1641)
at org.briarproject.briar.desktop.DaggerBriarDesktopTestApp.inject(DaggerBriarDesktopTestApp.java:1493)
at org.briarproject.bramble.BrambleCoreEagerSingletons$Helper.injectEagerSingletons(BrambleCoreEagerSingletons.java:51)
at org.briarproject.briar.desktop.RunWithMultipleTemporaryAccounts.app(RunWithMultipleTemporaryAccounts.kt:91)
at org.briarproject.briar.desktop.RunWithMultipleTemporaryAccounts.run(RunWithMultipleTemporaryAccounts.kt:52)
at org.briarproject.briar.desktop.TestWithTwoConnectedTemporaryAccountsKt.main(TestWithTwoConnectedTemporaryAccounts.kt:28)
at org.briarproject.briar.desktop.TestWithTwoConnectedTemporaryAccountsKt.main(TestWithTwoConnectedTemporaryAccounts.kt)
```https://code.briarproject.org/briar/briar-desktop/-/issues/383Follow-up from notifications: improve setup for interactive tests2022-09-14T07:02:47ZSebastianFollow-up from notifications: improve setup for interactive testsThe following discussion from !214 should be addressed:
- [ ] @sebkur started a [discussion](https://code.briarproject.org/briar/briar-desktop/-/merge_requests/214#note_70441): (+10 comments)
> What was your motivation for these c...The following discussion from !214 should be addressed:
- [ ] @sebkur started a [discussion](https://code.briarproject.org/briar/briar-desktop/-/merge_requests/214#note_70441): (+10 comments)
> What was your motivation for these changes here?
This discussion was about `RunWithMultipleTemporaryAccounts` and moving the customization into a `LaunchedEffect()` with `delay(500)` in 107100adc7290d98:
```kotlin
application {
LaunchedEffect(Unit) {
delay(500)
apps.forEach {
val accountManager = it.getAccountManager()
val lifecycleManager = it.getLifecycleManager()
val dbKey = accountManager.databaseKey ?: throw AssertionError()
lifecycleManager.startServices(dbKey)
lifecycleManager.waitForStartup()
}
customization(apps)
}
```https://code.briarproject.org/briar/public-mesh-research/-/issues/11Initial investigations: LAN peer discovery2023-08-28T16:08:02ZakwizgranInitial investigations: LAN peer discoveryPort the LAN peer discovery code from the Disco app to the public mesh testbed, bring it up to date, wire it up to the UI, and see whether we can use wake locks, wifi locks and/or multicast locks to solve the issues reported [here](https...Port the LAN peer discovery code from the Disco app to the public mesh testbed, bring it up to date, wire it up to the UI, and see whether we can use wake locks, wifi locks and/or multicast locks to solve the issues reported [here](https://code.briarproject.org/briar/briar/-/issues/28#note_32217) with the success rate dropping when the screen is turned off. We also need to test on newer API levels and work out what permissions are required on each API level.
It would be useful to know whether LAN peer discovery typically works for devices connected to a wifi hotspot (created manually via the system settings app) and/or a Wi-Fi Direct legacy mode hotspot (we could use the Offline Hotspot app for testing this).
Subtask of #1. Related to briar#28.Public mesh researchakwizgranakwizgranhttps://code.briarproject.org/briar/briar-desktop/-/issues/382.desktop file for jar distribution2022-09-21T21:56:19ZMikolai Gütschow.desktop file for jar distributionWhile working on !214
@ialokim started a [discussion](https://code.briarproject.org/briar/briar-desktop/-/merge_requests/214#note_70289): (+9 comments)
> one thing worth mentioning is that the Briar logo is not shown in this test syst...While working on !214
@ialokim started a [discussion](https://code.briarproject.org/briar/briar-desktop/-/merge_requests/214#note_70289): (+9 comments)
> one thing worth mentioning is that the Briar logo is not shown in this test system since no `.desktop` file is installed when directly running the jar (as opposed to an installation via deb (and flatpack?)). We could overcome this by setting an image on the notification itself, but I would have to look into it again. Also, it might be nice to have the option of creating the `.desktop` file anyhow, to be able to find it in the start menu for example. Not sure how this is usually handled with Java programs distributed as jar files...
We should probably check on (first or all?) launch if a `.desktop` file is present on the system and otherwise offer the user to create one.Desktop 1.0.0https://code.briarproject.org/briar/briar-desktop/-/issues/379Data dir is resolved relative to submodule directory when run using `./gradle...2022-09-06T06:56:14ZSebastianData dir is resolved relative to submodule directory when run using `./gradlew run`When I run briar from the git repo using `./gradlew run --args="--data-dir briardata"` then I would expect `briardata` to be in the current working directory where I'm currently located with my shell. However, apparently the current work...When I run briar from the git repo using `./gradlew run --args="--data-dir briardata"` then I would expect `briardata` to be in the current working directory where I'm currently located with my shell. However, apparently the current working directory for the process is the `briar-desktop` subdirectory so that the data dir created/used really is `briar-desktop/briardata`.https://code.briarproject.org/briar/briar-desktop/-/issues/375High CPU load due to text input fields2023-06-01T07:17:07ZVivienHigh CPU load due to text input fieldsWhile a blinking cursor is displayed in any text input field, the CPU load of the Java process increases by about 10%. This leads to a temperature increase of 3°C on this (old) laptop during the login screen, but an increase of up to 15°...While a blinking cursor is displayed in any text input field, the CPU load of the Java process increases by about 10%. This leads to a temperature increase of 3°C on this (old) laptop during the login screen, but an increase of up to 15°C while typing a message. Nothing relevant appears in the log output.
Steps to reproduce:
1. java -jar briar-desktop.jar
2. Keep the window in the foreground so that any cursor blinks.
```
Briar Desktop
Version 0.2.1-nightly
Git hash 51607c81039fc360301701e7c9d94efd9d528020
Commit time 2022-08-28 19:29:32
System Information
OS Name Debian GNU/Linux
OS Version 11.4 (bullseye)
Architecture amd64 (x86_64)
Kernel Release 5.18.0-0.deb11.3-amd64
Kernel Version #1 SMP PREEMPT_DYNAMIC Debian 5.18.14-1~bpo11+1 (2022-07-28)
Software
openjdk-17-jre 17.0.4+8-1~deb11u1
xfce4 4.16
xfwm4 4.16.1-1
```https://code.briarproject.org/briar/briar/-/issues/2362Timestamps in contact list (and maybe other lists) aren't updated2022-08-30T13:17:55ZakwizgranTimestamps in contact list (and maybe other lists) aren't updatedTimestamps in the contact list aren't updated if the screen timeout is set to less than 1 minute, as the refresher task is cancelled when the screen turns off.
Other BriarRecyclerViews may be affected if they don't reload their data or ...Timestamps in the contact list aren't updated if the screen timeout is set to less than 1 minute, as the refresher task is cancelled when the screen turns off.
Other BriarRecyclerViews may be affected if they don't reload their data or redraw their lists when started/resumed.https://code.briarproject.org/briar/briar/-/issues/2361Walkie-talkie feature2022-10-26T19:35:27ZVladislavWalkie-talkie featureFeatures:
1. Possibility to record and send short audio message (~10 sec), to a person, group or blog.
2. Hands off possibility. (Voice detection for recording an sending & auto play for incoming audio messages)
3. Push-to-talk possibili...Features:
1. Possibility to record and send short audio message (~10 sec), to a person, group or blog.
2. Hands off possibility. (Voice detection for recording an sending & auto play for incoming audio messages)
3. Push-to-talk possibility. (record and send message while holding on-display button or volume-up button)
Use case:
Communicate while driving, playing, workout.
Tips:
While recording is performed in app, we could use low quality audio format (8-16 kHz), just for voice recording.https://code.briarproject.org/briar/dont-kill-me-lib/-/issues/3Huawei app launch intent doesn't work on P40 Lite 5G2023-08-24T14:46:52ZakwizgranHuawei app launch intent doesn't work on P40 Lite 5GOn the Huawei P40 Lite 5G (Android 10, EMUI 12.0.0), `HuaweiUtils.appLaunchNeedsToBeShown()` returns `true` but none of the intents in `huaweiAppLaunchIntents` can be used to open an activity.On the Huawei P40 Lite 5G (Android 10, EMUI 12.0.0), `HuaweiUtils.appLaunchNeedsToBeShown()` returns `true` but none of the intents in `huaweiAppLaunchIntents` can be used to open an activity.