- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
After updating to v. 1816 I am unable to run my Cordova project properly.
Upon executing the following code:
function redirectLogin(url){ window.location.assign("main.html"); }
I receive these errors:
GET file:///F:/Development/Intel/XDK/xdk/public/pages/main.html net::ERR_FILE_NOT_FOUND
For some reason XDK is now looking for the file on my F:/ drive where it is installed, instead of looking for it from the location in which the script is executed (Project Folder).
This problem persists when the project is built as well, essentially making it impossible to run the project properly.
These errors also appear, before the redirectLogin function is called:
Failed to load resource: net::ERR_UNKNOWN_URL_SCHEME about:blank
Failed to load resource: net::ERR_CACHE_MISS http://127.0.0.1:58889/http-services/emulator-webserver/ripple/userapp//C/U…fd71-659a-4031-bc22-2a8845b88669/platforms/windows/www/index.html##mainsub
None of the above errors appeared when using the previous version- 1621.
Please let me know if what I may do to solve this problem.
Alternatively- is there any way I could get the previous version of XDK? My deadline is in 3 days and I'd rather be able to solve this posthaste.
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I also have the same issue after update the XDK to 1816 (selected html5 + cordvoa)
$(window).attr('location', 'Setup.html');
Failed to load resource: net::ERR_FILE_NOT_FOUND file:///C:/Users/CK%20PC/AppData/Local/Intel/XDK/xdk/public/Setup.html
Not allowed to load local resource: file:///C:/Users/CK%20PC/AppData/Local/Intel/XDK/xdk/public/Setup.html data:text/html,chro…:1
11Failed to load resource: net::ERR_UNKNOWN_URL_SCHEME
Need the fix urgently. Thanks in advanced.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a similar issue, again with Version 1816 running the Hello World sample code:
Failed to load resource: net::ERR_CACHE_MISS http://127.0.0.1:58889/http-services/emulator-webserver/ripple/userapp//Use…ratchdir/68944440-e31e-42ab-b889-a3b9a7e02c05/platforms/ios/www/index.html for iOS emulator and
Failed to load resource: net::ERR_CACHE_MISS http://127.0.0.1:58889/http-services/emulator-webserver/ripple/userapp//Use…944440-e31e-42ab-b889-a3b9a7e02c05/platforms/android/assets/www/index.html for Android emulator
I'm running with the debug script included.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Debug your app using the Debug tab, some of these messages are invalid errors from the Emulate tab that can be ignored. If you run your app on a real device using the Debug tab you'll get a more accurate representation and will know which are real errors in your app and which are due to the Emulate tab.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As Paul said, these two diagnostics are completely spurious and can be ignored.
Failed to load resource: net::ERR_UNKNOWN_URL_SCHEME about:blank
Failed to load resource: net::ERR_CACHE_MISS ...
The second one is merely saying that a file was received but wasn't found in the cache. That's not even an error.
I tried typing this call into the console under the debugger:
window.location.assign('index.html')
This succeeded. So I'm guessing that the problem is in the way that the relative URL is resolved into an absolute URL. How is the redirectLogin function invoked?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This issue is related to a relative location URL that is referenced in the emulator. The fix is being worked on. The workaround is to use absolute URL or temporarily avoid using emulator. The app should work just fine with TEST tab using App Preview or with Build.
Swati
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can modify your code to check for the presence of the emulator like this code snippet:
var media = "audio/bark.wav" ; // if( z.match(/\/emulator.*\/ripple\/userapp/i) ) { // if in the Ripple emulator if( window.tinyHippos ) { // if in the Ripple emulator media = z + "/" + media ; } else if( x.match(/(ios)|(iphone)|(ipod)|(ipad)/ig) ) { // if on a real iOS device media = "/" + media ; } else { // everything else... media = z + "/" + media ; }
So, in this case, I have to change the way a media object is referenced within the emulator versus on an iOS device versus Android and others.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Until we fix the problem, please use this workaround when you are trying to change the location during AJAX callback either using
window.location.assign or window.location.href.
The emulator is not able to resolve the relative location during AJAX callback, so please use this additional code when you are trying to change the location.
var newLocation = 'main.html'; // or any other location if ( window.tinyHippos ) { // special case for emulator newLocation = getWebRoot() + newLocation; } document.location.href=newLocation; function getWebRoot() { "use strict" ; var path = window.location.href ; path = path.substring( 0, path.lastIndexOf('/') ) ; path += '/'; return path; }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have problems After updating to v. 1816 too. In addition to the error: "Failed to load resource: net::ERR_CACHE_MISS" my project doesn't work because of the "navigator.geolocation.watchPosition" always get an error in the emulator. Before the updating the emulator was working correctly.
Thanks in advanced.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is nothing wrong with your project. The ERR_CACHE_MISS message is a known bug in the Emulate tab that has nothing to do with your app.
The way the Emulate tab deals with geolocation is now actually more accurate than in the past, the behavior you were seeing in the past was misleading. If you want to see the behavior you used to get switch to an iOS device. That behavior, in the Android instance of the Emulator, is kind of right and kind of wrong. The way the geo behaves on different platforms varies. Neither one of them accurately portrays a real device (although, the iOS version in the Emulate tab is closer to accurate). Some Android devices will actually do what you are seeing in the Emulate tab, some will not. Unfortunately, the Android world is very scattered.
To test your geo code in the Emulate tab, use both the iOS and the Android to be sure you've covered all the bases. However, do not rely on either to accurately reflect a real device, it is a simple simulation. Instead, to really test your geo code, you must run your app on a real device. Try using this app as a test case > https://github.com/xmnboy/hello-cordova < it contains a geo test that I am able to build and make work on all devices. There are lots of notes in the app source along with console.log messages to help you understand what is happening. This test app is very useful for understanding how the geo varies with different devices and under different conditions. I encourage you to use it for that purpose.
In the past, the iOS version of the underlying Cordova code is the only version that was presented by the Emulate tab. That has changed so that the Android behavior is more like most Android devices. Unfortunately, it's not possible to simulate every type of Android device out there, so we make a very rough approximation as to what you will get. Consider the Emulate tab as a useful way to debug basic logic, use a real device to debug real-world situations.
Please see this doc page for more guidance regarding debugging: https://software.intel.com/en-us/html5/intel-xdk-debug-and-test-overview

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