dpa99c / phonegap-launch-navigator

Phonegap/Cordova plugin which launches native route navigation apps for Android, iOS and Windows
369 stars 131 forks source link

THREAD WARNING: ['LaunchNavigator'] #99

Closed VPliss closed 8 years ago

VPliss commented 8 years ago

Hello, When I use this plugin on iOS, my app freeze with this log :


THREAD WARNING: ['LaunchNavigator'] took '11.066895' ms. Plugin should use a background thread.
Attempting to load the view of a view controller while it is deallocating is not allowed and may result in undefined behavior (<UIAlertController: 0x14e493660>)
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present modally an active controller <MainViewController: 0x14ce325d0>.'
*** First throw call stack:
(0x1821ecf5c 0x196ddff80 0x187ab09b8 0x1878433e0 0x18787025c 0x18786f0b4 0x18777d828 0x18777d324 0x18777d1ac 0x186f4d040 0x1005b9d30 0x1005bf780 0x1821a4258 0x1821a20c0 0x1820d0dc0 0x18d224088 0x1877aaf60 0x100022bf8 0x19760a8b8)
libc++abi.dylib: terminating with uncaught exception of type NSException

Could you help me please ?

dpa99c commented 8 years ago

The THREAD WARNING is a non-issue; just a warning.

The fatal error is caused by Application tried to present modally an active controller.

I would assume this is caused by the native UI picker (provided by cordova-plugin-actionsheet) colliding with another native UI element. Therefore I assume this only occurs if you do not specify app in the options object when calling launchnavigator.navigate() ??

Are you including other plugins that contain native UI elements? Are you able to reproduce the error when running one of the example project apps?

VPliss commented 8 years ago

Are you able to reproduce the error when running one of the example project apps? ➞ I don't reproduce whit the Sample project

Are you including other plugins that contain native UI elements? ➞ com.ios.cordova-idfa 0.1.0 "Cordova IDFA" com.lampa.startapp 0.1.4 "startApp" cordova-plugin-actionsheet 2.3.1 "ActionSheet" cordova-plugin-app-event 1.2.0 "Application Events" cordova-plugin-appversion 1.0.0 "App Version" cordova-plugin-badge 0.7.3 "Badges" cordova-plugin-camera 2.3.0 "Camera" cordova-plugin-compat 1.0.0 "Compat" cordova-plugin-customurlscheme 4.2.0 "Custom URL scheme" cordova-plugin-device 1.1.3 "Device" cordova-plugin-dialogs 1.3.0 "Notification" cordova-plugin-geolocation 2.4.0 "Geolocation" cordova-plugin-globalization 1.0.4 "Globalization" cordova-plugin-inappbrowser 1.4.0 "InAppBrowser" cordova-plugin-network-information 1.0.1 "Network Information" cordova-plugin-splashscreen 2.1.0 "Splashscreen" cordova-plugin-themeablebrowser 0.2.17 "ThemeableBrowser" cordova-plugin-whitelist 1.3.0 "Whitelist" cordova-plugin-x-socialsharing 5.0.12 "SocialSharing" de.appplant.cordova.plugin.local-notification 0.8.4 "LocalNotification" de.appplant.cordova.plugin.printer 0.7.1 "Printer" org.pushandplay.cordova.apprate 1.1.7 "AppRate" phonegap-plugin-push 1.8.2 "PushPlugin" uk.co.workingedge.phonegap.plugin.launchnavigator 3.2.1 "Launch Navigator"

dpa99c commented 8 years ago

I'd say it's likely another of those plugins is colliding with cordova-plugin-actionsheet.

You can confirm that it's cordova-plugin-actionsheet (not launchnavigator) that is the problem by specifying an app in the launch options, for example:

launchnavigator.navigate("Someplace", {app : launchnavigator.APP.GOOGLE_MAPS});

If this works OK, then for sure the problem is with cordova-plugin-actionsheet. In which case, it may be worth raising an issue against that plugin since this plugin is only a user of it.

Out of the plugins you have listed, I would guess cordova-plugin-x-socialsharing and cordova-plugin-dialogs as being likely suspects for the conflict. You can test this by uninstalling those plugins from your project, then retesting to see if the app still crashes. If not those plugins, then try uninstalling the others until you find which is conflicting.

VPliss commented 8 years ago

Hello, It's fix for me. I have a problem with my js when I call the plugin :

event.stopPropagation();

Thanks for your help.