Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
nativescript. Your current version is 5.1.0
tns-core-modules. Your current version is 5.1.1
tns-android has 5.1.0 version
component tns-ios. Your current version is 5.1.0
Describe the bug
I'm using the Telerik Sidebar component nativescript-ui-sidedrawer together with another view that has a TabView Component.
Also I'm setting the default transition to Frame.defaultTransition = { name: "fade" };
Without the TabView navigating back to a home component works as expected.
When I add the TabView inside the page and try to navigate back to the home view it crashes with:
An uncaught Exception occurred on "main" thread.
android.content.res.Resources$NotFoundException: Unable to find resource ID #0xffffffec
at android.content.res.ResourcesImpl.getResourceTypeName(ResourcesImpl.java:249)
at android.content.res.Resources.getResourceTypeName(Resources.java:1964)
at android.support.v4.app.FragmentManagerImpl.loadAnimation(FragmentManager.java:1172)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1543)
at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:797)
at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2625)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2411)
at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2366)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2273)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:733)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
From reading through other bug reports this is caused by __interfering transitions__ that subtract some static Nativescript identifiers or thelike.
__In that case I guess the side drawer is trying to slide to the left with an animation while the navigation is trying to transition to the home view with a fade animation.__
If I remove the default transition code it works again.
Confirming the issue with the drawer template.
Test project located here - to reproduce load the porject and navigate to the browse page (where the tab view is placed) and then navigate back.
I started seeing this error as well. I can successfully navigate between multiple pages through the RadSideDrawer. One page however, contains a TabView. After loading this page, when I go to navigate away to any other page I receive the error mentioned above.
I first thought this was an issue related to the resource images I used (I generally see some error about ExifInterface though it doesn't actually crash the app).
There was a mention of a temporary workaround by changing the transition to flip vs fade and slide. Is this being done on the app level page switch or forTabView`?
So after some experimentation, flip is the only one working for me to not break the application when navigating away from the view with a TabView widget (Route2).
I tested out an idea to see if I could possibly limit this transition style to the affected route only as I don't want to have to use flip for the entire app.
On my RadSideDrawer component I have all the links routed through this method onNavItemTap. I added an if/else within this method to use the flip transition style when navigating to Route2. Doing this seems to work. It looks like this conflict with RadSideDrawer and TabView might only be happening upon navigation to vs after. Hope this helps someone else dealing with this while a proper fix is in place.
If anyone's looking for a workaround, downgrading tns-core-modules to 5.1.0 fixed the issue for us.
Hi @NickIliev, I am using a Sidedrawer for Navigation. In addition, in my Dashboard page there is a TabView also. Once I move from the dashboard to another page, I cant go back to the Dashboard.
Thanks!
Should be fixed with https://github.com/NativeScript/NativeScript/pull/6955
@manoldonev Great to hear this has been resolved, I'd like to test and confirm. Does this require updating both the NativeScript CLI and NativeScript package? (not sure if they're the same thing)
Once updated, will it build and compile the Android app with the fixes in place or do I have to make any other configurations? I'll delete the /platforms folder and run a clean tns add android to be certain.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.