Fixed
Status Update
Comments
yb...@google.com <yb...@google.com> #2
Further testing shows 11.0.0 works in this setup and 11.2.0 is the first version this appears.
yb...@google.com <yb...@google.com> #3
This is expected. Both libraries have a java resource called 'protobuf.meta', which either the library authors need to stop shipping or the build author needs to pick one. See https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.PackagingOptions.html
However, if both libraries actually depend on that java resource you are in trouble.
However, if both libraries actually depend on that java resource you are in trouble.
ni...@gmail.com <ni...@gmail.com> #4
I can confirm that specifying exclude or pick-first on protobuf.meta results in a successful build and no *immediate* problems. However, the contents of these two files are completely different and without understanding the purpose of these files (I assume related to protocol buffer data structure) it feels very treacherous to remove them.
se...@google.com <se...@google.com> #5
Stephan, do you know what that file does and what changed that meant that it has started being bundled as a java resource in the testing support library?
ni...@gmail.com <ni...@gmail.com> #6
I see the same issue in a module referencing com.google.android.gms:play-services-location and com.google.android.gms:play-services-maps after integrating com.google.firebase:firebase-core and com.google.firebase:firebase-perf in the app.
I am running `11.6.2` of all libraries as well as Gradle 4.3.1-all and support lib 26.1.0
I am running `11.6.2` of all libraries as well as Gradle 4.3.1-all and support lib 26.1.0
se...@google.com <se...@google.com> #7
Experiencing the same issue. Any verdict on how to fix this?
ni...@gmail.com <ni...@gmail.com> #8
This will be fixed in the next release of Espresso v3.0.2.
We will be stripping off protobuf.meta file from the release binaries since they are not actually needed at run time.
We will be stripping off protobuf.meta file from the release binaries since they are not actually needed at run time.
se...@google.com <se...@google.com> #9
Ah sorry I misread your stacktrace.
se...@google.com <se...@google.com> #10
+ Ian,
Ian, do you have any ideas why we may fail to run fragment transaction in onResume?
Ian, do you have any ideas why we may fail to run fragment transaction in onResume?
ni...@gmail.com <ni...@gmail.com> #11
Yeah, some platform fragment things appear there in the stack, but that seems to be something the activity calls whether you use platform fragments or not. Thank you for reopening this.
se...@google.com <se...@google.com> #12
Ok, I was able to reproduce it. The issue is FragmentActivity.onResume doesn't resume its fragments and allow transactions immediately.
ap...@google.com <ap...@google.com> #13
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 9823ca6d8057b27adb44c8ffd3f211191bb41963
Author: Sergey Vasilinets <sergeyv@google.com>
Date: Thu Aug 23 18:41:17 2018
Call noteStateNotSaved() in OnResume
bug: 77944637
Test: SafeTransactionInOnResumeTest
Change-Id: I13211e0fece639382c8e3e961a8c702519d1c051
M fragment/build.gradle
M fragment/src/androidTest/AndroidManifest.xml
A fragment/src/androidTest/java/androidx/fragment/app/SafeTransactionInOnResumeTest.kt
M fragment/src/androidTest/res/values/styles.xml
M fragment/src/main/java/androidx/fragment/app/FragmentActivity.java
https://android-review.googlesource.com/737285
https://goto.google.com/android-sha1/9823ca6d8057b27adb44c8ffd3f211191bb41963
Branch: androidx-master-dev
commit 9823ca6d8057b27adb44c8ffd3f211191bb41963
Author: Sergey Vasilinets <sergeyv@google.com>
Date: Thu Aug 23 18:41:17 2018
Call noteStateNotSaved() in OnResume
bug: 77944637
Test: SafeTransactionInOnResumeTest
Change-Id: I13211e0fece639382c8e3e961a8c702519d1c051
M fragment/build.gradle
M fragment/src/androidTest/AndroidManifest.xml
A fragment/src/androidTest/java/androidx/fragment/app/SafeTransactionInOnResumeTest.kt
M fragment/src/androidTest/res/values/styles.xml
M fragment/src/main/java/androidx/fragment/app/FragmentActivity.java
se...@google.com <se...@google.com> #14
So it is fixed, however, I'm not sure in what release it will go in 1.0.0-rc03 or 1.1.0
ni...@gmail.com <ni...@gmail.com> #15
Thanks a lot!
[Deleted User] <[Deleted User]> #16
Am I correct that the bug will be fixed only for AndroidX? Does this mean that we need to migrate our codebase to AndroidX in order to rely on LiveData not lead to IllegalStateException: Can not perform this action after onSaveInstanceState?
ni...@gmail.com <ni...@gmail.com> #17
This is the number one issue crashing my app. Can't the fix be released in a rc? Will I need to wait to 1.1.0? =/
zh...@gmail.com <zh...@gmail.com> #18
Use `commitAllowingStateLoss()`, it is the only safe way to commit a fragment transaction.
Description
Version used:1.1.1
Devices/Android versions reproduced on: Android 4.x and 5.x
This is not something I can reproduce, but I'm seeing many errors in Crashlytics.
LiveData is supposed to notify changes only when it's safe to do fragment transactions, so this should not be happening, if I understand it correctly.
This is one of the exceptions I'm seeing:
java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
android.support.v4.app.FragmentManagerImpl.checkStateLoss (FragmentManager.java:2055)
android.support.v4.app.FragmentManagerImpl.enqueueAction (FragmentManager.java:2078)
android.support.v4.app.BackStackRecord.commitInternal (BackStackRecord.java:678)
android.support.v4.app.BackStackRecord.commit (BackStackRecord.java:632)
android.support.v4.app.DialogFragment.show (DialogFragment.java:160)
ar.com.lichtmaier.antenas.Pagame.mostrar (Pagame.java:33)
ar.com.lichtmaier.antenas.AntenaActivity.esPro (AntenaActivity.java:708)
ar.com.lichtmaier.antenas.AntenaActivity.bridge$lambda$0$AntenaActivity (AntenaActivity.java)
ar.com.lichtmaier.antenas.AntenaActivity$$Lambda$0.onChanged (Unknown Source)
android.arch.lifecycle.LiveData.considerNotify (LiveData.java:109)
android.arch.lifecycle.LiveData.dispatchingValue (LiveData.java:121)
android.arch.lifecycle.LiveData.access$400 (LiveData.java:59)
android.arch.lifecycle.LiveData$ObserverWrapper.activeStateChanged (LiveData.java:416)
android.arch.lifecycle.LiveData$LifecycleBoundObserver.onStateChanged (LiveData.java:368)
android.arch.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent (LifecycleRegistry.java:354)
android.arch.lifecycle.LifecycleRegistry.forwardPass (LifecycleRegistry.java:292)
android.arch.lifecycle.LifecycleRegistry.sync (LifecycleRegistry.java:332)
android.arch.lifecycle.LifecycleRegistry.moveToState (LifecycleRegistry.java:137)
android.arch.lifecycle.LifecycleRegistry.handleLifecycleEvent (LifecycleRegistry.java:123)
android.arch.lifecycle.ReportFragment.dispatch (ReportFragment.java:121)
android.arch.lifecycle.ReportFragment.onResume (ReportFragment.java:88)
android.app.Fragment.performResume (Fragment.java:2096)
android.app.FragmentManagerImpl.moveToState (FragmentManager.java:928)
android.app.FragmentManagerImpl.moveToState (FragmentManager.java:1067)
android.app.FragmentManagerImpl.moveToState (FragmentManager.java:1049)
android.app.FragmentManagerImpl.dispatchResume (FragmentManager.java:1879)
android.app.Activity.performResume (Activity.java:6128)
android.app.ActivityThread.performResumeActivity (ActivityThread.java:2995)
android.app.ActivityThread.handleResumeActivity (ActivityThread.java:3037)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:1350)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:135)
android.app.ActivityThread.main (ActivityThread.java:5290)
java.lang.reflect.Method.invoke (Method.java)
java.lang.reflect.Method.invoke (Method.java:372)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:911)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:706)