Skip to content

Crash after credentials on Android 11 (with PlayStore and f-droid App) #146

Description

@tichachm

Hi,
on Android 11 devices (tested with Nokia and Huawei) the App crashes after authorization with the geteduroam webinterface.
It sounds like that issue:
#113

We also tested loading a eap-config file, this also results in a app crash.

There is no error prompted.

Activity

  1. tichachm commented on Jun 13, 2025

    @tichachm
    Author

    Here is the last output of Android Studio before the crash:

    Image

  2. dzolnai commented on Jun 13, 2025

    @dzolnai
    Collaborator

    Hello,

    I checked the crash logs and couldn't find any in the past week for a Nokia or Huawei running Android 11.

    I see that you have the app running via Android Studio though. The line you sent is not a crash, just a warning, so it is probably not that. Crashes are marked in red and usually start with the text "FATAL EXCEPTION".

    I recommend deleting the Logcat logs just before the app crashes and then copying the entire log contents over to a file, so you can search for it just in the relevant parts.

  3. tichachm commented on Jun 13, 2025

    @tichachm
    Author

    Hi @dzolnai

    we were able to find the following error:
    { "header": { "logLevel": "ERROR", "pid": 27823, "tid": 27823, "applicationId": "com.android.settings", "processName": "com.android.settings", "tag": "AndroidRuntime", "timestamp": { "seconds": 1749799763, "nanos": 31000000 } }, "message": "FATAL EXCEPTION: main\nProcess: com.android.settings, PID: 27823\njava.lang.IllegalStateException: More than one auth type set\n\tat android.net.wifi.WifiConfiguration.getAuthType(WifiConfiguration.java:2582)\n\tat com.android.settings.wifi.addappnetworks.AddAppNetworksFragment.isSavedWifiConfiguration(AddAppNetworksFragment.java:334)\n\tat com.android.settings.wifi.addappnetworks.AddAppNetworksFragment.filterSavedNetworks(AddAppNetworksFragment.java:399)\n\tat com.android.settings.wifi.addappnetworks.AddAppNetworksFragment.createContent(AddAppNetworksFragment.java:260)\n\tat com.android.settings.wifi.addappnetworks.AddAppNetworksFragment.onViewCreated(AddAppNetworksFragment.java:230)\n\tat androidx.fragment.app.Fragment.performViewCreated(Fragment.java:2921)\n\tat androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:562)\n\tat androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1324)\n\tat androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1477)\n\tat androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:1555)\n\tat androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1608)\n\tat androidx.fragment.app.BackStackRecord.executeOps(BackStackRecord.java:455)\n\tat androidx.fragment.app.FragmentManager.executeOps(FragmentManager.java:2333)\n\tat androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2117)\n\tat androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2055)\n\tat androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1957)\n\tat androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3056)\n\tat androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:2990)\n\tat androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:251)\n\tat androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:458)\n\tat android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1436)\n\tat android.app.Activity.performStart(Activity.java:8215)\n\tat android.app.ActivityThread.handleStartActivity(ActivityThread.java:3458)\n\tat android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)\n\tat android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)\n\tat android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)\n\tat android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)\n\tat android.app.ActivityThread$H.handleMessage(ActivityThread.java:2067)\n\tat android.os.Handler.dispatchMessage(Handler.java:106)\n\tat android.os.Looper.loop(Looper.java:223)\n\tat android.app.ActivityThread.main(ActivityThread.java:7701)\n\tat java.lang.reflect.Method.invoke(Native Method)\n\tat com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)\n\tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)"

    Does that help?

  4. dzolnai commented on Jun 13, 2025

    @dzolnai
    Collaborator

    Yes, would you be able to share the .eap-config file via email at daniel@egeniq.com?
    Don't forget to remove the username + password from it, if it contains any.

  5. dzolnai commented on Jun 13, 2025

    @dzolnai
    Collaborator

    Thanks for the file you have sent me, I am able to reproduce the issue.
    The root cause is this system issue: https://issuetracker.google.com/issues/171375137
    Google seems to have fixed it, and rolled out an update on top of Android 11, but since this is still marked as Android 11, we cannot know beforehand if the user has it or not. From the comments on the issue (and your report as well) it seems that it wasn't rolled out widely...
    Also detecting the crash is not possible, because it is not our app which fails, but the system, but it does lock up our app so that it needs to restart as well.
    Now we are in luck, because on Android 11 we can fall back to the intents version, which does seem to work with the eap-config file you have sent me. But that has some other known issues, such as the permission dialog not appearing, so I wouldn't switch over to that one in a heartbeat.
    @tichachm since you have the app running in Android Studio, could you try replacing the following line

    val intentsNotAllowed = Build.BRAND.startsWith("oneplus", ignoreCase = true) && Build.VERSION.SDK_INT == Build.VERSION_CODES.R
    

    with:

    val intentsNotAllowed = Build.VERSION.SDK_INT == Build.VERSION_CODES.R
    

    I'm curious if it will work now.

    @pauldekkers what do you think. Maybe we should display a method chooser on Android 11 where suggestions is the recommended? And if it crashes they could still try with the other?

  6. tichachm commented on Jun 16, 2025

    @tichachm
    Author

    Hello @dzolnai,
    I will test this as soon as I have my Android 11 test device, but that may take until next week.

  7. tichachm commented on Jun 23, 2025

    @tichachm
    Author

    Thanks for the file you have sent me, I am able to reproduce the issue. The root cause is this system issue: https://issuetracker.google.com/issues/171375137 Google seems to have fixed it, and rolled out an update on top of Android 11, but since this is still marked as Android 11, we cannot know beforehand if the user has it or not. From the comments on the issue (and your report as well) it seems that it wasn't rolled out widely... Also detecting the crash is not possible, because it is not our app which fails, but the system, but it does lock up our app so that it needs to restart as well. Now we are in luck, because on Android 11 we can fall back to the intents version, which does seem to work with the eap-config file you have sent me. But that has some other known issues, such as the permission dialog not appearing, so I wouldn't switch over to that one in a heartbeat. @tichachm since you have the app running in Android Studio, could you try replacing the following line

    val intentsNotAllowed = Build.BRAND.startsWith("oneplus", ignoreCase = true) && Build.VERSION.SDK_INT == Build.VERSION_CODES.R
    

    with:

    val intentsNotAllowed = Build.VERSION.SDK_INT == Build.VERSION_CODES.R
    

    I'm curious if it will work now.

    @pauldekkers what do you think. Maybe we should display a method chooser on Android 11 where suggestions is the recommended? And if it crashes they could still try with the other?

    The fall back to the intents version seems to work well on the Nokia Test Device.
    I could also reproduce same in the emualtor:

    Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions