MetaMask / MetaMask/customauth-android-sample
Crash when login with Android 7 (API 24 and 25) Google Pixel Emulator
- Dominant language
- Kotlin
- Stars
- 5
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Hi @phuctm97
I clone you simple to test login with google but i got an issue below.
Can you take a look to see that ?
Thanks so much.

2022-04-01 17:37:48.398 8604-8604/org.torusresearch.sample E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.torusresearch.sample, PID: 8604
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.torusresearch.sample/org.torusresearch.customauth.activity.StartUpActivity}: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=torus://org.torusresearch.sample/redirect pkg=com.android.chrome (has extras) }
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=torus://org.torusresearch.sample/redirect pkg=com.android.chrome (has extras) }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1809)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1523)
at android.app.Activity.startActivityForResult(Activity.java:4224)
at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:597)
at android.app.Activity.startActivityForResult(Activity.java:4183)
at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:583)
at android.app.Activity.startActivity(Activity.java:4507)
at androidx.core.content.ContextCompat$Api16Impl.startActivity(ContextCompat.java:830)
at androidx.core.content.ContextCompat.startActivity(ContextCompat.java:279)
at androidx.browser.customtabs.CustomTabsIntent.launchUrl(CustomTabsIntent.java:376)
at org.torusresearch.customauth.activity.StartUpActivity.onCreate(StartUpActivity.java:75)
at android.app.Activity.performCreate(Activity.java:6662)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with org.torusresearch.customauth.activity.StartUpActivity.onCreate at line 75, where CustomTabsIntent.launchUrl triggers the ActivityNotFoundException on Android API 24 and 25. Reproduce the Google login flow in the referenced Pixel emulator configurations and inspect how the torus:// redirect intent is handled. Done means login no longer crashes on those API levels and the redirect flow completes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- authentication, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100