IllegalStateException: Fragment HomeFragment not attached to a context.
See original GitHub issuehttps://sentry.prod.mozaws.net/operations/fenix-nightly/issues/6162466/ https://sentry.prod.mozaws.net/operations/fenix-nightly/issues/6162466/ Socorro link
IllegalStateException: Fragment HomeFragment{1a41004} (84c6a2c6-6203-448c-b564-fee8f55208fc)} not attached to a context.
at androidx.fragment.app.Fragment.requireContext(Fragment.java:2)
at androidx.fragment.app.Fragment.getResources(Fragment.java:1)
at org.mozilla.fenix.home.HomeFragment$onViewCreated$2.invokeSuspend(HomeFragment.kt:9)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:2)
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:15)
...
(2 additional frame(s) were not displayed)
Fragment HomeFragment{1a41004} (84c6a2c6-6203-448c-b564-fee8f55208fc)} not attached to a context.
┆Issue is synchronized with this Jira Task
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (14 by maintainers)
Top Results From Across the Web
Fragment not attached to a context - android - Stack Overflow
In my case, this problem occurred when I was calling getString(). changing this calls to getActivity().getString() solved the problem.
Read more >Android Fragment not attached to a context | by Weidian Huang
This is a common issue if we don't take care of it in our application, and it is difficult to catch the issue...
Read more >I Get Fragment Not Attached To A Context. What ... - ADocLib
This issue occurs whenever you call a context which is unavailable or null when you call it. This can be a situation when...
Read more >java.lang.IllegalStateException: Fragment not attached to Activity
IllegalStateException : Fragment not attached to Activity [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] Android :...
Read more >IllegalStateException Fragment
IllegalStateException : Fragment HomeFragment {32dd527} (861da8e7-151f-4367-9f5a-af37c10c6e3b)} not attached to a context. FATAL EXCEPTION : main Process ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Note to QA: this is a very rare crash, and I don’t think we’re going to be able to reproduce it. I’m also very confident in the fix. If you don’t mind, I think it’s safe can call this
qa-not-needed
.@ekager sorry for the late reply here! Tested with the same device on Nightly 7/16 and on 79.0.0-beta.7 and the issue isn’t reproducible anymore.