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.

Compatibility issue with Pro UI RadSideDrawer component

See original GitHub issue

The main navigation of my app is managed by the RadSideDrawer component of Telerik Pro UI. A page in the main section shows a map with some markers. On marker select event a page in a subfolder is opened. The page shows detailed information about the selected marker, following the pattern implemented in Master Detail Template.

The navigation to the detail page works fine using the topmost.navigate() method, but when I try to go back to the map page using topmost.goBack(); or the Android device back button I receive this error:

System.err: java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to com.telerik.android.primitives.widget.sidedrawer.SideDrawerState
System.err:     at com.telerik.android.primitives.widget.sidedrawer.RadSideDrawer.onRestoreInstanceState(RadSideDrawer.java:784)
System.err:     at android.view.View.dispatchRestoreInstanceState(View.java:17445)
System.err:     at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3693)
System.err:     at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3699)
System.err:     at android.view.View.restoreHierarchyState(View.java:17423)
System.err:     at android.app.Fragment.restoreViewState(Fragment.java:653)
System.err:     at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1299)
System.err:     at android.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1547)
System.err:     at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1609)
System.err:     at android.app.BackStackRecord.executePopOps(BackStackRecord.java:865)
System.err:     at android.app.FragmentManagerImpl.executeOps(FragmentManager.java:2389)
System.err:     at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2187)
System.err:     at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2140)
System.err:     at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2047)
System.err:     at android.app.FragmentManagerImpl$1.run(FragmentManager.java:718)
System.err:     at android.os.Handler.handleCallback(Handler.java:769)
System.err:     at android.os.Handler.dispatchMessage(Handler.java:98)
System.err:     at android.os.Looper.loop(Looper.java:164)
System.err:     at android.app.ActivityThread.main(ActivityThread.java:6540)
System.err:     at java.lang.reflect.Method.invoke(Native Method)
System.err:     at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

The same error occurs in all Android devices and emulators that I have tested (Nexus 5, Nexus 6P, Huawei P10).

TNS Core Modules are at version 3.3.0, NativeScript Pro UI is at version 3.2.0 (the last one at the moment I write), nativescript-google-maps-sdk is at version 2.4.3.

I published this basic app to highlight the issue: https://github.com/alexmeia/nativescritp-sidedrawer-and-googlemaps

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

1reaction
alexmeiacommented, Dec 5, 2017

Thank you @StrahinjaCav for the suggestion. Whit the SideDrawer component I solved the problem in a not optimal but effective way, forcing the initialization of the SideDrawer on first application access. It seems that if the UI component sets its references to Java objects before the MapView does, the bug is bypassed. The solution you link seems less specific, I will try it.

1reaction
hostracommented, Dec 5, 2017

Hi, i had the same issue and have sort of managed to solve it by following first part of this post and saving and restoring reference to MapView myself.

Its not the prettiest solution but didnt find any other way

P.S. you can try following the whole post isntructions but i was unable to make it work that way

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trouble Implementing SideDrawer | Telerik Forums
Hello, I'm working to add the RadSideDrawer component to my ... "file:///Users/donmatthews/Documents/Telerik/nativescript-ui-pro.tgz",
Read more >
Add side drawer to nativescript project with angular 2
It seems that you are hitting multiple issues with your code. The error suggests that you might be using incompatible versions.
Read more >
RadSideDrawer not working after upgrade - Google Groups
Now all my views that use the RadSideDrawer fail with the following error. JavaScript error: file:///app/tns_modules/ui/builder/builder.js:147:56: JS ERROR ...
Read more >
Use as application root and show over navigation bar
This article explains how to use the RadSideDrawer as a root of the application making it appear over the navigation bar.
Read more >
Add side drawer to nativescript project with angular 2-angular.js
The error suggests that you might be using incompatible versions. ... fdr NativeScript 3.0.0 - use nativescript-telerik-ui-pro 2.0.1 fdr NativeScript 2.5.x ...
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