Skip to content

AAPS 3.4.0.0 crashes on start with tidepool plugin enabled and no mainstream browser #4456

@M0P

Description

@M0P

I just build and installed AAPS 3.4.0.0 and it instantly crashed all the time.

I asked AI the logs and asked for the reason and it pointed me towards the AuthFlowOut.kt and the BrowserAllowlist. The only browser I have installed is fennec, which is not in the allowlist.

I could fix it myself removing the browser checks from the code - then the system defaults browser is used and no more crashes.

What I have changed:

File AuthFlowOut.kt (Line 51):

    val authService: AuthorizationService =
        AuthorizationService(
            context, AppAuthConfiguration.Builder()
                // .setBrowserMatcher(
                //     BrowserAllowList(
                //         VersionedBrowserMatcher.CHROME_CUSTOM_TAB,
                //         VersionedBrowserMatcher.FIREFOX_CUSTOM_TAB,
                //         VersionedBrowserMatcher.SAMSUNG_CUSTOM_TAB
                //     )
                // )
                .build()
        )

LogCat:

FATAL EXCEPTION: main
Process: info.nightscout.androidaps, PID: 28905
android.content.ActivityNotFoundException
 at net.openid.appauth.AuthorizationService.prepareAuthorizationRequestIntent(authorizationservice.java:555)
 at net.openid.appauth.AuthorizationService.performAuthManagementRequest(authorizationservice.java:339)
 at net.openid.appauth.AuthorizationService.performAuthorizationRequest(authorizationservice.java:228)
 at net.openid.appauth.AuthorizationService.performAuthorizationRequest(authorizationservice.java:175)
 at app.aaps.plugins.sync.tidepool.auth.AuthFlowOut.doTidePoolInitialLogin$lambda$0(AuthFlowOut.kt:152)
 at app.aaps.plugins.sync.tidepool.auth.AuthFlowOut.$r8$lambda$IRmsE71-yBtN7GoiJT_TJqIOhBo(Unknown Source:0)
 at app.aaps.plugins.sync.tidepool.auth.AuthFlowOut$$ExternalSyntheticLambda0.onFetchConfigurationCompleted(D8$$SyntheticClass:0)
 at net.openid.appauth.AuthorizationServiceConfiguration$ConfigurationRetrievalAsyncTask.onPostExecute(authorizationserviceconfiguration.java:417)
 at net.openid.appauth.AuthorizationServiceConfiguration$ConfigurationRetrievalAsyncTask.onPostExecute(authorizationserviceconfiguration.java:358)
 at android.os.AsyncTask.finish(asynctask.java:771)
 at android.os.AsyncTask.-$$Nest$mfinish(Unknown Source:0)
 at android.os.AsyncTask$InternalHandler.handleMessage(asynctask.java:788)
 at android.os.Handler.dispatchMessage(handler.java:107)
 at android.os.Looper.loopOnce(looper.java:267)
 at android.os.Looper.loop(looper.java:371)
 at android.app.ActivityThread.main(activitythread.java:8837)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.android.internal.os.RuntimeInit$[MethodAndArgsCaller.run](https://methodandargscaller.run/)(runtimeinit.java:598)
 at com.android.internal.os.ZygoteInit.main(zygoteinit.java:896)

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