- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Trying to Debug on Android device.
Error is Debug Module Error.
Error: Build Failed.
Using Crosswalk 14 with the following Plugins
Device
Splashscreen
StatusBAr
Notification
Geolocation
Vibration
Intel XDK Camera
Flashlight
NFC (Chariot Solutions)
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it still failing? Can you provide a link to a ZIP file for an app that fails to build the debug module? You can attach the ZIP to this message using the "add media" button.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is really strange.
Compiling the Debug module for Android I get the error above.
Compiling for iOS its creates the App Preview IPA file but refuses to install it on to my iPhone.
I have even tried to copy on via iTunes but it still will not install.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Now App Preview for IOS is not compiling. Just get an error suggest retry, have had this before and it eventually disappeared.
Since V2496 I have not been able to create a new App Preview for either IOS or Android causes major issues for testing.
Have updated to V2548 and still the problem exists.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please ZIP your entire project directory for the app that fails to build the debug module and attach it to this message using the "add media" button (or provide a link to a DropBox or OneDrive, etc. location via a private message, if you do not wish to share your app publicly).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nick -- I'm able to build a debug module using your app, and run it on an Android device. Building a "debuggable" App Preview for iOS does not depend on your app, since we cannot yet build a custom debug module, it only depends on you providing the appropriate files to the build system so it can sign our standard App Preview for iOS with your iOS credentials.
Since your app uses core plugins, you can get away with using the "generic" debug module on Android (although, I don't understand why you cannot build a custom debug module). The "trick" is described about halfway down this doc file: https://software.intel.com/en-us/xdk/docs/using-the-debug-tab
Your app does not need the legacy intel.xdk.device plugin. I recommend you remove it, and comment out these lines in your app.js file:
// ...additional event handlers here... document.addEventListener("intel.xdk.device.ready",onDeviceReadyHideStatus,true); function onDeviceReadyHideStatus(evt) { intel.xdk.device.hideStatusBar(); AppMobi.device.hideStatusBar(); }
because they should be taken care of by the next set of lines, which use the standard Cordova devicready event (courtesy of the statusbar plugin):
document.addEventListener('deviceready', function() { StatusBar.overlaysWebView(false); StatusBar.backgroundColorByName('black'); }, false);
I also recommend that you choose Crosswalk 14, not 11, for your Crosswalk builds.
BTW -- that "AppMobi.device.hideStatusBar()" function may cause your app to halt because that namespace no longer exists...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have tried again with this app and another app. Neither will build a Debug module for Android, both give the error attached. I have made the mods to the code as above.
Error is Debug Module Error. In red it says Error: Build failed....
Frustrating the hell out of me know as I have a bug that I can't identify.
Going to PM you another project if thats OK, see if you can get Debug module to build.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nick, are you able to perform a Crosswalk build with either of the projects? If the custom debug module build continues to fail, there is a way to use a "generic" debug module rather than a custom debug module. See the "Debugging with a Generic Debug Module" section on this doc page: https://software.intel.com/en-us/xdk/docs/using-the-debug-tab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Paul,
Yes I can use the Generic debug but it thinks my internet connection is down so cannot complete the processes required to test the app. It isn't as I am typing this on the same machines whilst XDK is running.
Error in console is net::ERR_INTERNET_DISCONNECTED
After restarting XDK (as moving between internet connections whilst XDK is running may not help) the debug module will now not run, just get an empty yellow banner at when attempting to start the debug process, and yellow dots above the debug and run buttons.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After numerous attempts yellow banner says error 3, then disappears.
Device is connected to the Wifi and can access the internet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry to push this, but now debug refuses to recognise cordova plugin barcodescanner.
cordova.plugins.barcodeScanner.scan(
function (result) {
document.getElementById("tagid").value = result.text;
getTagDetails();
},
function (error) {
alert("Scanning failed: " + error);
}
);
}
Error is Uncaught TypeError: Cannot read property 'barcodeScanner' of undefined, yet this works outside of the debugger but fails to save the results as per my original post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nick, your comments are confusing. Are you using the Test tab or the Debug tab?
Did you try installing the generic debug module using the procedure I provided? It does not require a network connection.
If you used the generic debug module with the Debug tab, it will not contain any third-party plugins, so you won't be able to test things like the barcode scanner, because that is not a core plugin. Copy and paste this into the JavaScript console in the Chrome DevTools window (the debug console) to get a list of the plugins that are installed in the debug module you are using:
- console.log(JSON.stringify(cordova.require('cordova/plugin_list').metadata, null, 1)) ;
that will work from the weinre command line, if you are using the Test tab, the Emulate tab or the Debug tab.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for my rant and confusion, but things went wrong and was desperate to get it working on the Sony Experia that my customer had purchased for the job.
The frustration comes from the fact that every device I tested on it worked perfectly ios8, ios9, Android 4.4.4, Android 4.2.2, except this damned Sony Experia running 4.4.4.
The process involves scanning a QR code, this then downloads data from the internet which confirms certain information then the tag details are saved to a database using a web service.
The issue is that the Sony Experia will not save the data, it scans, it downloads the data, it will let me save the device configuration which requires a save routine linked to a web service, but when hitting the save button to save the tag data, it refuses to run the save routine. I have written the data to the Console and it is the correct format, but it will not jump into the Ajax routine to saveReading, it just does nothing.
My frustration is from the fact that the Debug will not let me properly test, to follow the logic to see what is happening. Even though the app is running through the Generic Debug module, it doesn't help me because of the restrictions above. Without the ability to scan a QR code I cannot follow the process through to see where it is failing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Paul
I think I may have finally found the issue.
using navigator.geolocation.getCurrentPosition(saveReading, onError); does not seem to work on a Sony Xperia device.
Basically my app loads TAG information then also reads the GeoLocation data prior to uploading to my WebService. The app is not progressing passed the GeoLocation function on the xperia, all other devices are fine.
My function is:-
function getLocation(){
if (navigator.geolocation){
navigator.geolocation.getCurrentPosition(saveReading, onError);
}
else
{
navigator.notification.alert("Cannot get Geolocation Data.");
}
}
The Sony Xperia isn't even throwing the alert if it fails to get a location.
I have also tested the demo GeoLocation App from XDK, this too fails on the Xperia, no map is displayed with the current location.
AT a lose as to why this might be the case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nick, I'm assuming you are building your app withe "Android" option, please try building with the Android-Crosswalk option, instead. This is one of the reasons we provide the Crosswalk build, the Android webviews are inconsistent and subject to manufacturer tweaks and modifications. The Crosswalk webview is built into your app, so it does increase the size of your app, but the tradeoff is well worth the increase in size.
If you are building with CLI 4.1.2 I recommend using the Crosswalk 14 option, otherwise, you have the option of using Crosswalk 15 with the CLI 5 build option. Unless you have a high performance game, both should work well. See this blog for more details on this confusion regarding webviews: http://blogs.intel.com/evangelists/2014/09/02/html5-web-app-webview-app/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
BTW -- to debug how geo works or does not work on the Xperia, install the "hello-cordova" sample app and you can experiment with geolocation on that device using that app. Might help illuminate what is happening or not happening by using that app. Lots of comments and console log messages (you may have to enable the console log messages) to help you out. Also, be sure to check what the geo settings are on the Xperia, if they've turned off geo you won't get any data back, but you should get an error message (it can take a while to get the error message).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Paul
I narrowed the issue down to the GeoLocation options for the Xperia, it will not work unless high accuracy is set to true, no other option works, however it then takes 9 or 10 seconds before the data is saved, this compares to 1 second or less on all other devices tested.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great! Now if there was an easy way to tell which way the Android geo settings are configured when you run, I haven't searched for such an API or plugin. If you find something, let me know and I'll add it to the hello-cordova app.
I'm guessing that the longer delay in the Xperia is probably due to the fact that it does not provide adequate "coarse" geo info via the network, which is typically used to "kick start" the real GPS to sync faster. The GPS antennae used in phones and tablets are not nearly as good as what you find in a dedicated GPS device (for price, size and battery reasons), so they can't lock onto as many GPS satellites and take longer to get in sync.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Paul
I will continue to research this, your summary is spot on. I have had to add better feed back for the users to tell then that something is happening whilst the Geo data is gathered.
Its a fix but not ideal.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page