Tagged: Android, Connection-Lost, GabDebug, Phonegap
- This topic has 7 replies, 3 voices, and was last updated 9 years, 2 months ago by support-michael.
-
AuthorPosts
-
schlommParticipantDear all,
Yesterday I’ve started using PhoneGap and of course I need a tool to debug the stuff, what I’ll develop – GabDebug seems quite promising for me 🙂
Unfortunately I can get it to work. Some information:– GapDebug Version: GapDebug 2.0
– Mobile Phone: Google Nexus 4 with Android 5.1.1
– Workstation: Windows 8.1 64bitSteps which I am doing:
1. Using Phonegaps CLI Tool to set up an application
2. Adding Android support via “phonegap platform add android”
3. Enabling USB-Debugging on my Nexus 4
4. Defining the android namespace in the overall config.xml as it is stated in the Help-Section of GapDebug<widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" xmlns:android="http://schemas.android.com/apk/res/android" id="me.app.id" version="1.0.0">
5. Adding the remote-debugging snippet in the config.xml (as stated in the Help-Section of GapDebug)
`<gap:config-file platform=”android” parent=”/manifest”>;
<application android:debuggable=”true” />
</gap:config-file>`6. Adding the
'android:debuggable"=true"'
snippet to the AndroidManifest.xml
7. Build the app via “phonegap build”
8. Serve the app via “phonegap serve”
9. Using the PhoneGap Developer App to serve the app
10. In GapDebug I click on the application, which is available after I have loaded the app with the PhoneGap Developer App (GapDebug1.PNG in the attachments).At this steps, GapDebug or the GapDebug connection to the application crashes after 1 second with the message **”App Connection Lost – Inspector can not continue. Please close and open a new Inpsector”**. An screenshot is attached (GapDebug2.PNG). Also the application loaded by the PhoneGap Developer App is crashed and I have reopen the app and loading the my app manually.
Do you have any idea what is wrong with my workflow? Do I miss something?
To make it a little bit easier for you, I have pastebined some files, which may be important:1. index.html: http://pastebin.com/rLngynEU
2. config.xml: http://pastebin.com/GCqJpwbu
3. AndroidManifest.xml: http://pastebin.com/mNAsq2tkAnd the content from the logfile (I’ve cleaned the logfile right before I have loaded my application via the PhoneGap Developer App): http://pastebin.com/ENKRVRRh
If you need any other information, please let me know!
Would be awesome to get some feedback!
All the best,
Dominik- This topic was modified 9 years, 3 months ago by schlomm.
- This topic was modified 9 years, 3 months ago by schlomm. Reason: Formatting
Attachments:
You must be logged in to view attached files.
schlommParticipantUpdate: As far as I’ve read, it is not possible debug an appliaction, which is loaded via the the PhoneGapp Developer Application, because the PhoneGap Developer App is not debuggable, right?
What I’ve also tried: Compiling my application with the CLI tool via “phonegap build” (or “phonegap build android” to make it specifically for Android) and install this via GapDebug on my connected smartphone. Of course, I’ve also set the following flag to my AndroidManifest.XML:
android:debuggable="true"
Unfortunately I get a very similar message after I’ve selected the application, which I have started on my phone (check attachment).Any ideas?
Attachments:
You must be logged in to view attached files.
support-vadimParticipantHi schlomm,
Could you please share this app’s APK with us, so we can investigate the problem on our side?
Send to wayne at genuitec dot com and we will give it a look.Meanwhile, could you try to build your app f.e. with PhoneGap build and check if the problem can be reproduced there?
Regards,
Vadim Ridosh- This reply was modified 9 years, 3 months ago by wayne.
schlommParticipantHey Vadim,
Thanks for your fast response 🙂
I’ve uploaded the whole PhoneGap project to my GDrive. You can download it here: https://drive.google.com/file/d/0B92xkSXykSiqODZvU1pONmxuclE/view?usp=sharing
The built apks from<appname>\platforms\android\build\outputs\apk
are stored directly in the root folder.I’ve also used the PhoneGap Cloud-Build Service, downloaded the built apk, installed it on my smartphone, connected it to my computer, started GapDebug, startet the application and selected it on the lefthand panel.
Unfortunately I get the error about “App Connection Lost” (see attachment for details).
The apk built by PhoneGap Cloud Service can be downloaded here: https://drive.google.com/file/d/0B92xkSXykSiqUUQyS3ZEeE5xbWM/view?usp=sharingThanks for your help!
DominikEdit: Hopefully it’s also okay that I’ve uploaded the files to my GDrive Account. If not, please drop me a line….haven’t seen that you would prefer it via email.
- This reply was modified 9 years, 3 months ago by schlomm.
Attachments:
You must be logged in to view attached files.
support-vadimParticipantHi schlomm,
I’ve tried to install your app on my Nexus 7 and see no such a problem.
Could you please try these steps to help us to localize the problem:
1. Try to exit GD, then stop all adb.exe process instances, then re-start GD and try to reproduce the problem.
2. Try to open chrome://inspect/#devices URL in your Chrome browser, click on HelloWorld and try to reproduce the problem in opened devtools.
3. If both scenarios still fail – try to change your USB cable and/or USB port on your computer.Regards,
Vadim Ridosh
schlommParticipantDear Vadim,
Thanks for your answer and sorry for my late response.
Anyway…I’ve made a HardReset of my Nexus 4 and I’ve also switched the USB-cable and it is working now 🙂 I can easily upload/install the built apks using the “Install application” button in GapDebug.Thanks for your support!
Just one question left: Is there any live-debugging or live-inspecting option available, where it is not necessary to install the application, which has to rebuild everytime?
support-vadimParticipantHi schlomm,
Glad to hear your problem is solved now.
Regarding to your live-debugging question: Chrome Developer Tools allow you to change Javascript and CSS files right on-the fly, when you’re ready to save your changes just press Ctrl+S on the file and save it to the place your phonegap project is located. Next project build will catch these changes.Regards,
Vadim Ridosh
support-michaelKeymasterWe have just released a beta GapDebug 2015 update 5 (aka 2.1.0) that includes several improvements:
https://www.genuitec.com/forums/topic/gapdebug-2015-update-5-2-1-0-beta-1-available/
Please help us test drive it. -
AuthorPosts