question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crash in [@ java.lang.RuntimeException: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java)]

See original GitHub issue

Similar to https://github.com/mozilla-mobile/fenix/issues/6436

Crash report: https://crash-stats.mozilla.org/report/index/394f182b-8987-4fa1-b8b6-8190a0200908 Sentry: https://sentry.prod.mozaws.net/operations/firefox-nightly/issues/9509776/?query=is%3Aunresolved (looks like started Sept 1)

Java stack trace:

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:504)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
Caused by: java.lang.reflect.InvocationTargetException
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
	... 1 more
Caused by: mozilla.components.lib.state.StoreException: Exception while reducing state
	at mozilla.components.lib.state.Store$$special$$inlined$CoroutineExceptionHandler$1$lambda$1.run(Store.kt:1)
	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:7073)
	... 3 more
Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=org.mozilla.firefox_beta/org.mozilla.fenix.downloads.DownloadService (has extras) }: app is in background uid UidRecord{ba745a5 u0a1159 CEM  idle change:cached procs:1 proclist:17880, seq(0,0,0)}
	at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1666)
	at android.app.ContextImpl.startService(ContextImpl.java:1611)
	at android.content.ContextWrapper.startService(ContextWrapper.java:677)
	at mozilla.components.feature.downloads.DownloadMiddleware.sendDownloadIntent(DownloadMiddleware.kt:4)
	at mozilla.components.feature.downloads.DownloadMiddleware.invoke(DownloadMiddleware.kt:17)
	at mozilla.components.lib.state.internal.ReducerChainBuilder$build$$inlined$forEach$lambda$1.invoke(ReducerChainBuilder.kt:3)
	at mozilla.components.feature.media.middleware.MediaMiddleware.invoke(MediaMiddleware.kt:39)
	at mozilla.components.lib.state.internal.ReducerChainBuilder$build$$inlined$forEach$lambda$1.invoke(ReducerChainBuilder.kt:3)
	at mozilla.components.lib.state.internal.ReducerChainBuilder$build$threadCheck$1.invoke(ReducerChainBuilder.kt:4)
	at mozilla.components.lib.state.internal.ReducerChainBuilder$build$$inlined$forEach$lambda$1.invoke(ReducerChainBuilder.kt:3)
	at mozilla.components.lib.state.Store$dispatch$1.invokeSuspend(Store.kt:4)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:21)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:764)

┆Issue is synchronized with this Jira Task

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
dholbertcommented, Sep 10, 2020

I’m hitting this reliably several times per day, FWIW; I’ll glance at my phone and notice a notification telling me “Sorry, Firefox Nightly had a problem and crashed”. Logcat shows “ActivityManager: Background start not allowed: service Intent { cmp=org.mozilla.fenix/.downloads.DownloadService (has extras) } to org.mozilla.fenix/.downloads.DownloadService” which is what brought me to this issue here.

Looks like the Play Store has a update for Nightly available for me right now. Not sure if it has the fix mentioned above yet (I’m guessing yes since it was merged 23 hours ago). In any case, I can report back regarding whether this seems fixed or not.

2reactions
liuchecommented, Sep 8, 2020

Looks Downloads related, @Amejia481 or @kglazko could you coordinate/take a look? If this is in Nightly, it may be in Beta too so if it’s a problem we’ll want to uplift this fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Crash in [@ java.lang.RuntimeException: at com.android ...
RuntimeException: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java)] in java.lang.IllegalArgumentException: Tab with same ID ...
Read more >
Android Studio Button Causing Crash - java - Stack Overflow
RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: ...
Read more >
How to solve java.lang.RuntimeException - Microsoft Q&A
I'm getting an error in play store crash list . java.lang.RuntimeException: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run ...
Read more >
Crash in [@ java.lang.RuntimeException: at android.app ...
at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
Read more >
SOCS Application Crashes When In Sent To Background
at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found