Status Update
Comments
mg...@google.com <mg...@google.com> #2
Since this is happening in Tink, rather than in the AndroidX library, it would be best to open an
gr...@gmail.com <gr...@gmail.com> #3
ma...@marcardar.com <ma...@marcardar.com> #4
Tink is the library that does the heavy lifting in Jetpack Security.
And yes, potentially raising that issue with the Tink team directly could help.
sj...@gmail.com <sj...@gmail.com> #5
Here, created it there too:
ha...@gmail.com <ha...@gmail.com> #6
th...@gmail.com <th...@gmail.com> #7
mg...@google.com <mg...@google.com> #8
mg...@google.com <mg...@google.com>
th...@tempo.co.nz <th...@tempo.co.nz> #9
ju...@veepee.com <ju...@veepee.com> #10
mg...@google.com <mg...@google.com> #11
sj...@gmail.com <sj...@gmail.com> #12
ap...@google.com <ap...@google.com> #13
+1
bo...@gmail.com <bo...@gmail.com> #14
ra...@gmail.com <ra...@gmail.com> #15
ma...@gmail.com <ma...@gmail.com> #16
Branch: androidx-main
commit a505a060ec741478e4096e8d160e136de18e8f39
Author: Daniel Angell <danielangell@google.com>
Date: Thu Oct 13 12:14:15 2022
Upgrade tink to 1.7.0 in security-crypto
Changed some calls into Tink to avoid deprecation warnings.
Bug: 185219606 (and likely others)
Test: Ran the security-crypto test suite
Change-Id: I7b1dcb3bf3f5d018a93ac3b06280724559f63ded
M security/security-crypto/build.gradle
M security/security-crypto/src/main/java/androidx/security/crypto/EncryptedFile.java
M security/security-crypto/src/main/java/androidx/security/crypto/EncryptedSharedPreferences.java
fi...@gmail.com <fi...@gmail.com> #17
i wonder what about the rare crashes though.
sj...@gmail.com <sj...@gmail.com> #18
I'm pretty new on this project and I haven't dug deep into all of the strange behavior reported. But having read many of the bug reports my initial guess is crashes on initialization are related to encrypted files that got restored from a backup. If you back up all of an app's files - including EncryptedSharedPreferences - and then restore after moving to a new device, factory restoring a device, or perhaps even uninstalling and reinstalling an app, you will crash and it might not be clear why. The recommended way to use the security jetpack library lends to these kinds of errors. The files get encrypted with a key that won't be available inside of a backup copy. So decryption will always fail if that key isn't there when restoring from a backup.
mg...@google.com <mg...@google.com> #19
But even if it did, it should have been automatically handled by the library , and as long as it's not, be mentioned on the docs with an explanation of what should be done about it.
fi...@wartek.belajar.id <fi...@wartek.belajar.id> #20
mg...@google.com <mg...@google.com>
ap...@google.com <ap...@google.com> #21
Maybe some way to exclude these files in backup rules?
ca...@careem.com <ca...@careem.com> #22
You can see the warning I added in your editor as a documentation comment on the EncryptedFile
and EncryptedSharedPreferences
classes. Those comments get copied into the reference info on the jetpack website:
But I think it would be much better for us to provide an Android backup agent implementation that does the filtering for you.
mg...@google.com <mg...@google.com> #23
Is it possible using setting it in XML , or only during runtime?
I wonder how to do each. BackupAgent doesn't have many samples at all, not even on Github and StackOverflow...
va...@cloudkitchens.com <va...@cloudkitchens.com> #24
You can definitely accomplish this with XML configuration:
But you can also write a custom backup agent class to do the work at runtime. I will update the documentation later to include a reference XML configuration.
Thanks for your feedback!
pr...@google.com <pr...@google.com> #25
Does it offer a functionality to tell "for the rest, backup as many files as of these from the list" ? This is useful for semi-cache files, which are important, but not very important.
li...@gmail.com <li...@gmail.com> #26
eg...@gmail.com <eg...@gmail.com> #27
[Deleted User] <[Deleted User]> #28
The issue still persists.
ma...@gmail.com <ma...@gmail.com> #29
kr...@gmail.com <kr...@gmail.com> #30
Same for me too. I updated the Lifecycle lib to v2.8.2 and Compose BOM to v2024.06.00 which incorporate v1.6.8 of Compose libs. Still, the app got this exception and crashed, but only in the release mode and not in debug mode. Unfortunately, I got the crash in the production app after its release. After downgrading the Lifecycle lib to v2.7.0, it is working fine in the production app. Immediately, I had to release another patch version, so the users do not complain about app not working.
mg...@google.com <mg...@google.com> #31
We have received a similar report at -keep class androidx.compose.ui.platform.AndroidCompositionLocals_androidKt { *; }
to your ProGuard rules).
Although we have included a custom ProGuard rule as part of our fix, the rule is not working as intendend across all projects. We are currently investigating the problem, see
ba...@gmail.com <ba...@gmail.com> #32
Updating to 2.8.2 with Compose BOM "2024.06.00" the app is crashing on Release build with the error "CompositionLocal LocalLifecycleOwner not present".
A proguard rules should be provided or another version with fix.
su...@gmail.com <su...@gmail.com> #33
However, for the visitors
"-keep class androidx.compose.ui.platform.AndroidCompositionLocals_androidKt { *; }"
Add this to your app proguard file and it'll work fine.
ih...@enverus.com <ih...@enverus.com> #34
mo...@gmail.com <mo...@gmail.com> #35
I can confirm it's still an issue for me with Compose BOM "2024.06.00" and lifecycle 2.8.2.
I added these lines to proguard to fix the issue:
-if public class androidx.compose.ui.platform.AndroidCompositionLocals_androidKt {
public static *** getLocalLifecycleOwner();
}
-keep public class androidx.compose.ui.platform.AndroidCompositionLocals_androidKt {
public static *** getLocalLifecycleOwner();
}
mg...@google.com <mg...@google.com> #36
Following up on the issue mentioned in
mg...@google.com <mg...@google.com> #37
Following up on the issue mentioned in
mg...@google.com <mg...@google.com> #38
Lifecycle 2.8.3 is now available on
pr...@google.com <pr...@google.com> #39
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.lifecycle:lifecycle-runtime-compose:2.9.0-alpha01
androidx.lifecycle:lifecycle-runtime-compose-android:2.9.0-alpha01
androidx.lifecycle:lifecycle-runtime-compose-desktop:2.9.0-alpha01
Description
Version used:
lifecycle-runtime-compose:2.8.0-alpha03
androidx.compose.ui:ui-android:1.7.0-alpha03
When
Devices/Android versions reproduced on: Android14
When running collectAsStateWithLifecycle in setContent inside the fragment, the following error occurs.
Could any of the changes in lifecycle 2.8.0-alpha03 be caused by LocalLifecycleOwner's has different directory?
"LocalLifecycleOwner moved from Compose UI to lifecycle-runtime-compose so that its Compose-based helper APIs can be used outside of Compose UI"
java.lang.IllegalStateException: CompositionLocal LocalLifecycleOwner not present
at androidx.lifecycle.compose.LocalLifecycleOwnerKt$LocalLifecycleOwner$1.invoke(LocalLifecycleOwner.kt:26)
at androidx.lifecycle.compose.LocalLifecycleOwnerKt$LocalLifecycleOwner$1.invoke(LocalLifecycleOwner.kt:25)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at androidx.compose.runtime.LazyValueHolder.getCurrent(ValueHolders.kt:29)
at androidx.compose.runtime.LazyValueHolder.getValue(ValueHolders.kt:31)
at androidx.compose.runtime.CompositionLocalMapKt.read(CompositionLocalMap.kt:90)
at androidx.compose.runtime.ComposerImpl.consume(Composer.kt:2135)
at androidx.lifecycle.compose.FlowExtKt.collectAsStateWithLifecycle(FlowExt.kt:180)