You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Flutter 3.24.0, the framework expects activities to be Theme.AppCompat descendants but net.openid.appauth.RedirectUriReceiverActivity isn't, causing the app to crash at logout, and preventing the user from logging out completely given the logout process cannot pass fully.
Steps To Reproduce
On Android:
Successful .loginPassword(...)
Attempt .logout(...)
Expected Behavior
.logout closes current user session as it did on Flutter 3.22.3 and earlier.
E/AndroidRuntime(25794): java.lang.RuntimeException: Unable to start activity ComponentInfo{[REDACTED]/net.openid.appauth.RedirectUriReceiverActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
E/AndroidRuntime(25794): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4164)
E/AndroidRuntime(25794): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4322)
E/AndroidRuntime(25794): at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
E/AndroidRuntime(25794): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
E/AndroidRuntime(25794): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
E/AndroidRuntime(25794): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2685)
E/AndroidRuntime(25794): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(25794): at android.os.Looper.loopOnce(Looper.java:230)
E/AndroidRuntime(25794): at android.os.Looper.loop(Looper.java:319)
E/AndroidRuntime(25794): at android.app.ActivityThread.main(ActivityThread.java:8934)
E/AndroidRuntime(25794): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(25794): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
E/AndroidRuntime(25794): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
E/AndroidRuntime(25794): Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
E/AndroidRuntime(25794): at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:846)
E/AndroidRuntime(25794): at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:809)
E/AndroidRuntime(25794): at androidx.appcompat.app.AppCompatDelegateImpl.initWindowDecorActionBar(AppCompatDelegateImpl.java:550)
E/AndroidRuntime(25794): at androidx.appcompat.app.AppCompatDelegateImpl.getSupportActionBar(AppCompatDelegateImpl.java:537)
E/AndroidRuntime(25794): at androidx.appcompat.app.AppCompatDelegateImpl.invalidateOptionsMenu(AppCompatDelegateImpl.java:1220)
E/AndroidRuntime(25794): at androidx.appcompat.app.AppCompatActivity.invalidateOptionsMenu(AppCompatActivity.java:314)
E/AndroidRuntime(25794): at androidx.activity.ComponentActivity.invalidateMenu(ComponentActivity.java:567)
E/AndroidRuntime(25794): at androidx.activity.ComponentActivity$$ExternalSyntheticLambda0.run(Unknown Source:2)
E/AndroidRuntime(25794): at androidx.core.view.MenuHostHelper.addMenuProvider(MenuHostHelper.java:133)
E/AndroidRuntime(25794): at androidx.activity.ComponentActivity.addMenuProvider(ComponentActivity.java:545)
E/AndroidRuntime(25794): at androidx.fragment.app.FragmentActivity$HostCallbacks.addMenuProvider(FragmentActivity.java:735)
E/AndroidRuntime(25794): at androidx.fragment.app.FragmentManager.attachController(FragmentManager.java:3014)
E/AndroidRuntime(25794): at androidx.fragment.app.FragmentController.attachHost(FragmentController.java:117)
E/AndroidRuntime(25794): at androidx.fragment.app.FragmentActivity.lambda$init$3$androidx-fragment-app-FragmentActivity(FragmentActivity.java:139)
E/AndroidRuntime(25794): at androidx.fragment.app.FragmentActivity$$ExternalSyntheticLambda3.onContextAvailable(Unknown Source:2)
E/AndroidRuntime(25794): at androidx.activity.contextaware.ContextAwareHelper.dispatchOnContextAvailable(ContextAwareHelper.kt:84)
E/AndroidRuntime(25794): at androidx.activity.ComponentActivity.onCreate(ComponentActivity.java:358)
E/AndroidRuntime(25794): at androidx.fragment.app.FragmentActivity.onCreate(FragmentActivity.java:216)
E/AndroidRuntime(25794): at net.openid.appauth.RedirectUriReceiverActivity.onCreate(RedirectUriReceiverActivity.java:49)
E/AndroidRuntime(25794): at android.app.Activity.performCreate(Activity.java:8995)
E/AndroidRuntime(25794): at android.app.Activity.performCreate(Activity.java:8964)
E/AndroidRuntime(25794): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1456)
E/AndroidRuntime(25794): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4146)
E/AndroidRuntime(25794): ... 12 more
The text was updated successfully, but these errors were encountered:
Here's a fix for those using manifestPlaceholders in build.gradle:
Add this to your main AndroidManifest.xml:
<!-- The android:theme of the extenal net.openid.appauth.RedirectUriReceiverActivity have to be an Theme.AppCompat descendant since Flutter 3.24.0. Until this is fixed on the package level (https://github.com/Bdaya-Dev/oidc/issues/118) we have to use this workaround based on AndroidManifest merging logic: https://developer.android.com/build/manage-manifests -->
<activityandroid:name="net.openid.appauth.RedirectUriReceiverActivity"android:theme="@style/Theme.AppCompat.Translucent.NoTitleBar">
</activity>
Description
Since Flutter 3.24.0, the framework expects activities to be
Theme.AppCompat
descendants butnet.openid.appauth.RedirectUriReceiverActivity
isn't, causing the app to crash at logout, and preventing the user from logging out completely given the logout process cannot pass fully.Steps To Reproduce
On Android:
.loginPassword(...)
.logout(...)
Expected Behavior
.logout
closes current user session as it did on Flutter 3.22.3 and earlier.Additional Context
The issue is known and fixed in other, related projects: AppAuth-Android, flutter_appauth
The text was updated successfully, but these errors were encountered: