-
Notifications
You must be signed in to change notification settings - Fork 1.9k
No view found for id 0x9 (unknown) for fragment FragmentContainer #1518
Comments
@paradisehuman Could you please upload a zipped, minimized reproduction, using only the necessary code to reproduce the behavior? Your provided code utilizes other code which is not included (such as a |
I'm having the same issue for weeks now (at least from 20th of November). In the log there is no reference to any of my code to give me any pointers where to look, but my hunch is that it is related to push/pop views. The crashes happens on a range of devices with multiple Android version. I can't consistency reproduce it and due to our policy I can't upload the project. Click here to open one of the logs...
|
@jerone Exactly.... |
Related (XF 2.5.0.122203, Android): java.lang.RuntimeException: Unable to resume activity {xxx/md5f15cbca6eb98718c6f5cbf4f37c1c42e.MainActivity}: java.lang.IllegalArgumentException: No view found for id 0x1 (unknown) for fragment FragmentContainer{4b396b1 #0 id=0x1} at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3586) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3626) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2876) at android.app.ActivityThread.-wrap12(ActivityThread.java:-1) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:156) at android.app.ActivityThread.main(ActivityThread.java:6523) at java.lang.reflect.Method.invoke(Method.java:-2) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831) Caused by: java.lang.IllegalArgumentException: No view found for id 0x1 (unknown) for fragment FragmentContainer{4b396b1 #0 id=0x1} at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1334) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1569) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1636) at android.support.v4.app.FragmentManagerImpl.dispatchResume(FragmentManager.java:2991) at android.support.v4.app.FragmentController.dispatchResume(FragmentController.java:214) at android.support.v4.app.FragmentActivity.onResumeFragments(FragmentActivity.java:509) at android.support.v4.app.FragmentActivity.onPostResume(FragmentActivity.java:498) at android.support.v7.app.AppCompatActivity.onPostResume(AppCompatActivity.java:172) at android.app.Activity.performResume(Activity.java:7043) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3561) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3626) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2876) at android.app.ActivityThread.-wrap12(ActivityThread.java:-1) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:156) at android.app.ActivityThread.main(ActivityThread.java:6523) at java.lang.reflect.Method.invoke(Method.java:-2) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831) |
Sadly, I don't have a small repro available, but I thought I'd share I seem to be getting this issue and it is not during OnDestroy (as in #1490) nor am I setting the MainPage more than once (as in #1355). My stack trace looks very similar to the one from @jerone
|
In case it is useful, I've seen it on Nexus 5X - 8.0 |
Thank you for the updates, i am adding this to the work queue however I do not have a lot of confidence we will figure out the issue without a reduced repro. |
@jassmith commented on Feb 8, 2018, 7:51 PM GMT+1:
#1355 contains an reproduction link, is confirmed and already added to the queue. |
Hmmm... I am experiencing this crash too - catched by AppCenter since last release.
|
@jerone thank you :) Will get it assigned to the appropriate person. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hi Just a quick note - I was also having this issue, turned out to be caused by calling LoadApplication() twice in quick succession from my Xamarin.Android code. In my case this was due to an error in my page choosing logic - a missing return call. I send messages (via messaging center) to a running app to switch the current Xamarin.Forms view depending on the intent-filter (NFC, BLE etc), or in the case of an app not running, just call LoadApplication(). Anyway, I thought this might assist in debugging, just bung the following in your MainActivity.OnCreate, and watch it crash. LoadApplication(new App()); Exception text is: Unhandled Exception: Java.Lang.RuntimeException: Unable to resume activity {com.Spacelabs.ProteusPatientApp.Android/com.Spacelabs.ProteusPatientApp.Android.MainActivity}: java.lang.IllegalArgumentException: No view found for id 0x9 (unknown) for fragment FragmentContainer{9557288 #0 id=0x9} Nigel |
In general this is caused by changing the Application.MainPage in any manner rapidly while pages are still appearing. In fact its caused by doing Navigation in general during Appearing events/callbacks because the fragment transaction has not yet completed. Then the page gets removed from the stack as requested, but the transaction comes back and blows up. Almost every one of these we see is due to this kind of behavior, and really the best practice for you is to not navigate in appearing events (or before them as is @veletron2 case). That said there should be a fix for some of this in 2.5.1-pre2 |
This comment has been minimized.
This comment has been minimized.
Version Code: 625
|
Still having this issue in XForms Latest Version,I'm doing viewmodel navigation. Any Help @jassmith @jamesmontemagno ? below is my app log after crashing, i have a listview, on listview click it will navigate to detail page, while navigating its crashing. 03-25 15:42:50.003 E/FragmentManager( 4675): No view found for id 0x7b (unknown) for fragment FragmentContainer{198ffda #6 id=0x7b} Java.Lang.IllegalArgumentException: No view found for id 0x7b (unknown) for fragment FragmentContainer{198ffda #6 id=0x7b} 03-25 15:42:50.017 D/FragmentManager( 4675): md5b60ffeb829f638581ab2bb9b1a7f4f3f.FormsTextView{abf14fc V.ED..... ........ 0,0-87,49 #4b} |
+1 |
I created a repository on GitHub that I could reproduce the exception on my app. |
I Found a Fix for this , Just Delete ResourceDesigner.cs in android project through file explorer, and rebuild android project. and again include ResourceDesigner.cs .now clean and rebuild.it should work |
@Charuwaka, it didn´t work to me. Maybe you have executed the app again after the crash, but if you go to Account tab, Sign Out and try to Sign Up again, you´ll see the same exception. |
+1 |
+1 |
+1 |
+1 |
Try changing the page or tab within ui thread. It might do the trick. Atleast it worked for me. |
+1 |
Based on @jassmith comment I changed my login flow - I was navigating from an OnAppearing, however this is no longer the case and I’m still seeing the error. |
@PureWeen Are you sure this issue is related to those two? Otherwise closing this one when there's so many people reporting it doesn't seem a good call. Why not leave it open until everyone confirms it's been fixed? |
My thought process for closing this was
So I closed this one because it has no focused context to work on and no way to directly say "Hey your permutation of this problem is resolved" This issue can manifest in different ways with the same exception so I'm mainly trying to differentiate those ways and provide specific issues with specific examples to that. Right now I see two manifestations of this exception |
I've ran the samples in here against the latest fixes and they look good. If anyone else wants to test their scenarios against our fix. Here's a nuget you can test https://github.com/xamarin/Xamarin.Forms/files/2185851/3.3.0.zip |
MediaPicker.PickPhotoAsync() never returns if the user swipes down to dismiss the photo gallery Fixes #1493 Co-authored-by: Bjorn Vanslembrouck <bjorn.vanslembrouck@theaccessgroup.com> Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
I've been having the same exception on my application recently, when implementing Android deep links. Clicking a deep link would trigger the It turns out that we had annotated our Switching the launch mode to |
Description
I have a ListView on MasterPage detail
Steps to Reproduce
Expected Behavior
Refresh the data
Actual Behavior
Force Close in some situations for some Andorid 4.2.1 or 4.2.2 or 6.0.1 devices
Basic Information
Galaxy S3 Mini Value Edition,Galaxy J1 Ace,Galaxy J7
The text was updated successfully, but these errors were encountered: