- This topic has 5 replies, 3 voices, and was last updated 8 years, 9 months ago by wayne.
-
AuthorPosts
-
ed-graham2gmail-comParticipantI’ve been using GapDebug with my PhoneGap app and it’s worked great up until I upgraded to PG cli-6.0.0 which uses Cordova 4.0.1. Now, it cuts to “App Connection Lost” any time there’s an error in the connected app. (I’ve also upgrade to WKWebView but having tried using the UIWebView I get the same issue).
ios 9.2.1, iPhone 5S
Window 10 64-bit
GD Version 2015 Update 6 (2.2.0)Also, if I try to Enable Instant Debugging, it starts with the same error.
Unsure if there’s a link, but in both cases, it also flashes up with an identical app in the left hand pane on loading which reads “JSContext” which then quickly disappears.
Last several log entries:
!ENTRY com.genuitec.powderhorn.eclipse.deviceconnector 1 0 2016-02-20 02:41:05.172
!MESSAGE onPageAdded PID:7640:3 JSContext!ENTRY com.genuitec.powderhorn.eclipse.deviceconnector 1 0 2016-02-20 02:41:06.087
!MESSAGE onPageRemoved PID:7640:3 JSContext!ENTRY com.genuitec.powderhorn.eclipse.deviceconnector 1 0 2016-02-20 02:43:05.014
!MESSAGE onPageAdded PID:7640:4 JSContext!ENTRY com.genuitec.powderhorn.eclipse.deviceconnector 1 0 2016-02-20 02:43:06.052
!MESSAGE onPageRemoved PID:7640:4 JSContext
support-michaelKeymasterThx for reporting this issue. Will investigate asap and share what we learn. I’ve been using gapdebug with Cordova 6 on iOS but have not worked with wkwebview yet. To be clear is the error you’re referring to a JavaScript error or native? If a js error how can I replicate it? Is it as simple as creating an uncaught npe?
ed-graham2gmail-comParticipantOn further investigation, it appears to be the WKWebView. Just create a blank PG index page with config.xml specifying PG 6 and this plugin:
<plugin name=”cordova-plugin-wkwebview-engine” source=”npm”/>
<feature name=”CDVWKWebViewEngine”>
<param name=”ios-package” value=”CDVWKWebViewEngine” />
</feature>
<preference name=”CordovaWebViewEngine” value=”CDVWKWebViewEngine” />(I’m using PhoneGap Build by the way).
Without the plugin, the app loads in GapDebug with Instant Debugging enabled and stays blue. With the plugin, loading the app, then opening a window causes the orange App Connection Lost message. As mentioned, it flashes up with the additional app… JS Context icon on the left – perhaps this is confusing GapDebug somehow as it recognises 2 apps and is trying to initialise the wrong one. You can open a new tab to get it to work but any native errors after that cause a repeat of the issue it seems.
ed-graham2gmail-comParticipantUpdate: On further testing it seems to drop repeatedly after that and not just on errors
wayneModeratorhi Ed,
Here’s a quick update of my investigation so far this morning (dallas tz). I started with a local ios build using cordova 6. I added the wkwebview plugin from npm and updated my config.xml per your settings. I am able to build, run and debug the cordova helloworld app with gapdebug. I did notice that gapdebug is not automatically reconnecting a disconnected debugger when its app is restarted – opened a bug for that. Lastly I set break pts in the wkwebview plugin native code to verify that it is actually be used.Next I’m going to try using phonegap build similar to your example. I’ll share more details shortly.
wayneModeratorupdate #2, PGB
I built a helloworld app using PGB set to 6.0.0. No other plugins installed.I’m able to install, start and debug the app with breakpts set with gapdebug. I’m testing the app on an iphone 6s, ios 9.2.1. When I update the app while it is being debugged I see a similar issue as on my local build test app. The current debug session terminates with “App connection lost”. The app starts but does not reconnect to the previous debug session as expected. I removed the wkwebview plugin and the instant debugging resumed working correctly for the app. So definitely some work to do to reestablish existing debug sessions.
Would you like me to make a quick video to show my setup and the build/debug process? Or maybe you can share your project with me to test.
-
AuthorPosts