- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was doing some routine updates to my code when the iOS build suddently wasn't able to connect to the server via AJAX calls. All the code I have has worked thousands of times before on build, and still works just fine in emulator. I hadn't changed any connection functions between when it was working and not working. I've restarted my system and device with no luck. I uninstalled and installed the app with no luck. I have even opened and built other I versions I had backed up and have worked in production (versions that the public is using currenly), and they won't connect either through an XDK build out.
It's almost as if now XDK is preventing builds from connecting to servers once they are built.
What's happening here?
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From what you are saying it looks like there might be some server side issue.
If your existing builds (that your customers are using) used to work before and are not working now, that means something on server (the one that you are making AJAX request to) went wrong. Once the project is built it has no bearing on XDK. So please check your server side code (if it's yours) or check if any configuration requirements have changed on the website you are trying to connect.
If you are having issue with only newly built binary, please let us know which version of XDK are you using. Also, make sure all the whitelisting settings are correct. If it does not work, please send your project zip via PM.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The existing build that customers are using work and loads just fine.
The version I am building now is an update, with the AJAX urls identical to the public working version. The only diference between the working public version and the newer version that isn't connecting after XDK build is the wording of a few <p> blocks in the HTML. The newer version will connect in emulator, but not in build. So yes, I am only having problems with newly built binaries. My whitelist has remained the same as well. I even tried making it the default http://*, but it didn't work.
I am running 2893 on OS X El Captian.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I recommend testing your application via the Debug tab within Intel XDK or via the Test Tab including the weinre script tag after the body tag in your index.html file. Both options will allow you to view the network traffic of your application so that you can better determine the issues or errors you might be encountering.
In order to evaluate your project with the Debug Tab, you will need to connect your iOS device to your computer via a USB cable. Once the application is running your should be able to navigate the developer tools via the Debug Tab to view the network traffic.
On the other hand, in order to evaluate your project with the Test tab, you will need to include the weinre script tag located on the Test tab then perform an iOS Build to install and run the application on your device. Once the application is running your should be able to navigate the developer tools via the Test Tab to view the network traffic.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It was able to connect to the server without a problem in the Test tab. Couldn't get it to recognize my phone in Debug (and never have). But still won't connect on build. It fires the error param for all AJAX calls.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mike, We are looking into this issue. If you are able to, can you please see what status does the AJAX call return?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have tested from the Debug tab to a signed version of the app preview. My AJAX code works fine there. As Mike states, its only in the deployed app that it fails in the ajax success function. I am expecting data to be returned but get nothing (undefined) back. I own the servers that I am connecting to and they are responding to the same ajax requests from browsers and the Test and Debug tabs. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm getting a error status 0 and text undefined. Same as CAJazzer.
For the record, I've built a basic cordova HTML/Cordova app with one simple AJAX call. Same problem. Works in Emulate and Test, but fails to connect in binary.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Engineering is looking into this issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Mike -- does it make any difference if you build with CLI 4.1.2 or CLI 5.1.1? Which CLI are you building with now? Please try both and reply with results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I also have the same problem, this problem begins when I upgrated do CLI 5.1.1 yesterday. When I build the app all ajax returns status 0 and response text "" , in emulator works fine.
I have tried many options in Whitelist, using Cordova Whitlist, W3C Widget Acess, put xhr.js in code, crossDomain: true in ajax requisition and Access-Control-Allow-Origin: * in server, and nothing work.
I'm using Intel XDK 2893 and have the same problem in Android Build.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Mike -- can you also try changing the format of your whitelist rule fields on the iOS so they do not include a protocol?
For example, change:
http://debug-software.intel.com/*
to:
*.intel.*
And let me know if anything changes as a result...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Paul F. (Intel) wrote:
@Mike -- can you also try changing the format of your whitelist rule fields on the iOS so they do not include a protocol?
For example, change:
http://debug-software.intel.com/*
to:
*.intel.*
And let me know if anything changes as a result...
I tested here in Android (W3C Widget Access) and returned the same problem, statusCode: 0.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Same error. I stopped try change my project and did a simple example with google maps and doesn't work.
I tried this example http://codepen.io/ionic/pen/uzngt , works in android and emulator but doesn't work in real ios device.
My project was working fine until the last update and now I can't connect with soap, http, web service and google maps api.
XDK test tab was working with ios device, but now isn't working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was/have been running 5.1.1.
Looks like the same result and errors when I downgraded to 4.1.2, although I did not downgrade the plugins, just the CLI.
When I reformatted the URL to the format you suggested, I got a different Error:
Error Thrown: Unauthorized
status: 401
text response: ERROR whitelist rejection: url="http://www.....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Mario -- when you say you "have the same problem in Android Build" -- do you mean that AJAX was working prior with your Android builds and now is not?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mike, thanks for the additional feedback. Engineering continues to investigate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Mike -- engineering believes they have located the root of the problem and is pushing a fix to the iOS build servers. You can try it now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Success! Thanks for sticking with it, I really appreciate your support.
Keep up the good work!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad it worked! I'll let engineering know that it was successful.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page