hotwired / turbo-android

Android framework for making Turbo native apps
MIT License
423 stars 51 forks source link

onGetLayoutInflater() cannot be executed until the Fragment is attached to the FragmentManager #199

Closed Maximum21 closed 2 years ago

Maximum21 commented 2 years ago

Fatal Exception: java.lang.IllegalStateException: onGetLayoutInflater() cannot be executed until the Fragment is attached to the FragmentManager. at androidx.fragment.app.Fragment.getLayoutInflater(Fragment.java:1673) at androidx.fragment.app.Fragment.onGetLayoutInflater(Fragment.java:1622) at androidx.fragment.app.Fragment.performGetLayoutInflater(Fragment.java:1654) at androidx.fragment.app.Fragment.getLayoutInflater(Fragment.java:1639) at dev.hotwire.turbo.fragments.TurboWebFragment.createProgressView(:5) at dev.hotwire.turbo.delegates.TurboWebFragmentDelegate.showProgressView(:2) at dev.hotwire.turbo.delegates.TurboWebFragmentDelegate.access$showProgressView() at dev.hotwire.turbo.delegates.TurboWebFragmentDelegate$attachWebViewAndVisit$1.invoke(:72) at dev.hotwire.turbo.delegates.TurboWebFragmentDelegate$attachWebViewAndVisit$1.invoke(:6) at dev.hotwire.turbo.delegates.TurboWebFragmentDelegate$attachWebView$2.invoke(:6) at dev.hotwire.turbo.delegates.TurboWebFragmentDelegate$attachWebView$2.invoke(:6) at dev.hotwire.turbo.views.TurboView$attachWebView$1.run(:15) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:233) at android.app.ActivityThread.main(ActivityThread.java:8063) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)

Maximum21 commented 2 years ago

Facing this issue in some devices OnePlus Nord N10 5G/AC2001/HD1911 There are other devices where it has never given this same exception.

Maximum21 commented 2 years ago

@dhh Hi how are you? Anyone here who can help me out on this issue? Kindly

Maximum21 commented 2 years ago

Hi @jayohms can there be any comment here ?

ghiculescu commented 2 years ago

@Maximum21 do you have any tips on how to replicate the issue?

jayohms commented 2 years ago

Closing this for now, based on the fix in #236. If this is still an issue, we can re-open.