Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

[Crash] ActivityNotFound #8412

Closed
boek opened this issue Feb 13, 2020 · 4 comments
Closed

[Crash] ActivityNotFound #8412

boek opened this issue Feb 13, 2020 · 4 comments
Assignees
Labels
b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info 🐞 bug Crashes, Something isn't working, .. eng:qa:verified QA Verified Feature:CustomTabs P1 Current sprint

Comments

@boek
Copy link
Contributor

boek commented Feb 13, 2020

android.content.ActivityNotFoundException: 
 
  at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:2018)
 
  at android.app.Instrumentation.execStartActivity (Instrumentation.java:1673)
 
  at android.app.Activity.startActivityForResult (Activity.java:4688)
 
  at androidx.fragment.app.FragmentActivity.startActivityForResult (FragmentActivity.java:6)
 
  at android.app.Activity.startActivityForResult (Activity.java:4646)
 
  at androidx.fragment.app.FragmentActivity.startActivityForResult (FragmentActivity.java:3)
 
  at android.app.Activity.startActivity (Activity.java:5007)
 
  at androidx.core.app.ActivityCompat.startActivity (ActivityCompat.java:2)
 
  at mozilla.components.feature.customtabs.CustomTabWindowFeature$start$1$invokeSuspend$$inlined$collect$1.emit (Collect.kt:14)
 
  at mozilla.components.support.ktx.kotlinx.coroutines.flow.FlowKt$ifChanged$$inlined$filter$1$2.emit (Collect.kt:7)
 
  at mozilla.components.feature.customtabs.CustomTabWindowFeature$start$1$invokeSuspend$$inlined$mapNotNull$1$2.emit (Collect.kt:6)
 
  at kotlinx.coroutines.EventLoopKt.emitAll (EventLoop.kt:15)
 
  at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAll$1.invokeSuspend (Unknown Source:10)
 
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:2)
 
  at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:15)
 
  at android.os.Handler.handleCallback (Handler.java:873)
 
  at android.os.Handler.dispatchMessage (Handler.java:99)
 
  at android.os.Looper.loop (Looper.java:214)
 
  at android.app.ActivityThread.main (ActivityThread.java:6986)
 
  at java.lang.reflect.Method.invoke (Native Method)
 
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
 
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1445)

https://play.google.com/apps/publish/?account=7083182635971239206#AndroidMetricsErrorsPlace:p=org.mozilla.fenix&appid=4975374341268119750&appVersion=PRODUCTION&lastReportedRange=LAST_14_DAYS&clusterName=apps/org.mozilla.fenix/clusters/11c21c0f&detailsAppVersion=PRODUCTION&detailsSpan=14

┆Issue is synchronized with this Jira Task

@boek boek added 🐞 bug Crashes, Something isn't working, .. P1 Current sprint b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info Feature:CustomTabs labels Feb 13, 2020
@boek boek added this to To do in Fenix Crashes via automation Feb 13, 2020
@github-actions github-actions bot added the needs:triage Issue needs triage label Feb 13, 2020
@ValentinTimisica ValentinTimisica self-assigned this Feb 26, 2020
@severinrudie severinrudie moved this from To do to In progress in Fenix Crashes Feb 26, 2020
@ValentinTimisica
Copy link
Contributor

ValentinTimisica commented Feb 27, 2020

Steps to reproduce

  • Make Fenix default browser (Settings->Set as default browser)
  • From the gmail app send a mail with this link: https://www.fonvirtual.com/en/international-phone-number/
  • Go to gmail app and access that link. Should be opened in a Fenix custom tab.
  • From the top of the screen tap on Click to Speak, near the phone number.

Expected behaviour

  • The app should handle the tel scheme or to show an appropriate error.

Actual behaviour

  • The app crashes

Device information

  • Samsung Galaxy Note 10 (Android 10)

Crash informations

StackTrace


    android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW cat=[mozilla.components.pwa.category.SHORTCUT] dat= pkg=org.mozilla.fenix (has extras) }
        at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2071)
        at android.app.Instrumentation.execStartActivity(Instrumentation.java:1717)
        at android.app.Activity.startActivityForResult(Activity.java:5276)
        at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:6)
        at android.app.Activity.startActivityForResult(Activity.java:5234)
        at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:3)
        at android.app.Activity.startActivity(Activity.java:5605)
        at androidx.core.app.ActivityCompat.startActivity(ActivityCompat.java:2)
        at mozilla.components.feature.customtabs.CustomTabWindowFeature$start$1$invokeSuspend$$inlined$collect$1.emit(Collect.kt:14)
        at mozilla.components.support.ktx.kotlinx.coroutines.flow.FlowKt$ifChanged$$inlined$filter$1$2.emit(Collect.kt:7)
        at mozilla.components.feature.customtabs.CustomTabWindowFeature$start$1$invokeSuspend$$inlined$mapNotNull$1$2.emit(Collect.kt:6)
        at kotlinx.coroutines.EventLoopKt.emitAll(EventLoop.kt:15)
        at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAll$1.invokeSuspend(Unknown Source:10)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:2)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:15)
        at android.os.Handler.handleCallback(Handler.java:883)
        at android.os.Handler.dispatchMessage(Handler.java:100)
        at android.os.Looper.loop(Looper.java:237)
        at android.app.ActivityThread.main(ActivityThread.java:7770)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1047)

I opened an issue in AC to fix the crash.

ValentinTimisica added a commit to ValentinTimisica/fenix that referenced this issue Mar 2, 2020
…WindowFeature'

Change required for showing error message when the app can't handle a specific
scheme. Implemented in AC:
mozilla-mobile/android-components#6122
@betsymi betsymi added the needs:strings Needs strings label Mar 5, 2020
@ValentinTimisica ValentinTimisica moved this from In progress to Review in progress in Fenix Crashes Mar 6, 2020
ValentinTimisica added a commit to ValentinTimisica/fenix that referenced this issue Mar 10, 2020
…WindowFeature'

Change required for showing error message when the app can't handle a specific
scheme. Implemented in AC:
mozilla-mobile/android-components#6122
@betsymi betsymi removed the needs:strings Needs strings label Mar 12, 2020
ValentinTimisica added a commit to ValentinTimisica/fenix that referenced this issue Mar 26, 2020
…WindowFeature'

Change required for showing error message when the app can't handle a specific
scheme. Implemented in AC:
mozilla-mobile/android-components#6122
ValentinTimisica added a commit to ValentinTimisica/fenix that referenced this issue Mar 26, 2020
…WindowFeature'

Change required for showing error message when the app can't handle a specific
scheme. Implemented in AC:
mozilla-mobile/android-components#6122
sblatz pushed a commit to ValentinTimisica/fenix that referenced this issue Mar 31, 2020
…WindowFeature'

Change required for showing error message when the app can't handle a specific
scheme. Implemented in AC:
mozilla-mobile/android-components#6122
sblatz added a commit that referenced this issue Mar 31, 2020
…#8903)

* For #8412: Passes error handling function to 'CustomTabWindowFeature'

Change required for showing error message when the app can't handle a specific
scheme. Implemented in AC:
mozilla-mobile/android-components#6122

* Upgrade AC version

Co-authored-by: Sawyer Blatz <sdblatz@gmail.com>
@ValentinTimisica ValentinTimisica moved this from Review in progress to Reviewer approved in Fenix Crashes Apr 1, 2020
@ValentinTimisica ValentinTimisica added the eng:qa:needed QA Needed label Apr 1, 2020
@sflorean
Copy link
Contributor

sflorean commented Apr 1, 2020

@ValentinTimisica tested on Samsung Galaxy Note10 (Android 10) this issue and "click to speak" option is not working/not responsive in custom tab - Nightly, but works if the link is opened in the browser.
The browser is not crashing opening the link, like is happening on Beta.
This should be the fix for this bug?

@ValentinTimisica
Copy link
Contributor

Hello @sflorean, I investigated the problem and it seems like it's a Fenix Snackbar related issue. The snackbar shows only when the toolbar is set to top. I created #9812 for the Snackbar bug.

Related to the current crash I created below the testing notes:

Testing notes

  • Make Fenix default browser (Settings->Set as default browser)
  • Set toolbar to top (Settings-> Customize). This is done to bypass the Snackbar bug described above.
  • From the gmail app send a mail with this link: https://www.fonvirtual.com/en/international-phone-number/
  • Go to gmail app and access that link. Should be opened in a Fenix custom tab.
  • From the top of the screen tap on Click to Speak, near the phone number.
  • Now a snackbar with the message Unable to connect. Unrecognizable URL scheme will show.

Check video with the fix below

@liuche liuche mentioned this issue Apr 13, 2020
32 tasks
@sflorean
Copy link
Contributor

Verified as fixed on Fenix 4.3.0 - beta.1 with Samsung Galaxy Note 10 (Android 10).
@ValentinTimisica thank you for the extra step.

Fenix Crashes automation moved this from Reviewer approved to Done Apr 14, 2020
@sflorean sflorean added eng:qa:verified QA Verified and removed eng:qa:needed QA Needed labels Apr 14, 2020
@ekager ekager removed the needs:triage Issue needs triage label Apr 17, 2020
@liuche liuche mentioned this issue Apr 28, 2020
32 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info 🐞 bug Crashes, Something isn't working, .. eng:qa:verified QA Verified Feature:CustomTabs P1 Current sprint
Projects
No open projects
Fenix Crashes
  
Done
Development

No branches or pull requests

5 participants