- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My application is connecting to an API through https and it is working fine in Emulator, but when i pushed to Server and tested in my Samsung mobile device ( A8), i am not getting the expected response, looks device couldn't able to connect to https, how could i debug this issue
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Can you try building your app and installing on device? App preview has some limitations so it is better to check by insatlling app on device.
To find more about how to build? please refer this: https://software.intel.com/en-us/xdk/docs/using-the-build-tab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Emulator is just a simulator. There are some limitations just check out this link: https://software.intel.com/en-us/xdk/docs/dev-emulator
Try to build with crosswalk and use either build or debug tab to see the actual behavior of the app.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also make sure you have included the site in your whitelist information in the projects tab under build settings. You can read more about it here: https://software.intel.com/en-us/xdk/docs/using-cordova-whitelist-rules-with-intel-xdk?language=en
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Team
I have build with external whitelist as "https://" since i am calling a https website from the application, but still its failing, could you help to advise
Regards
Thiru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What happens if you just put * in the whitelist entry? And use the W3C option?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have tried using * and also tried https://*, but both didnt work, can you help to check
Regards
Thiru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The CONNECTION plugin is checked?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
could you advise where is it available, don't find in plugin management,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thirukkumaran -- can you provide a sample app that illustrates what you are trying to do and results in the failure? Create a simple app that results in the failure and ZIP the entire project directory for that app. Then attach the ZIP to your post, using the "attach media" button (scroll down below your edit window).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Paul, I am working on it, will update you shortly - Thiru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I got the same problem also. Somehow we need to override the ssl error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Thiru, I'm afraid this sample app is not helping me understand the issue. I see that you have configured an AJAX call that references a URL named https://xxx/ -- which fails on the Emulate tab because that is an unresolvable address. You have set the "Network Requests (Internal Whitelist)" to "*" and left the "Intent" whitelist empty. I'm assuming the URL you are using is a valid URL? What happens if you put an "*" in the Intent whitelist, as well?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HI Paul
sorry that i cant provide the URL, but the URL is valid and it is working fine in emulator, i tried below options
1) "*" for "Network Requests (Internal Whitelist)" and "*" for "Intent whitelist empty",
2) "*" for "Network Requests (Internal Whitelist)" and empty for "Intent whitelist empty",
3) "https://*" for "Network Requests (Internal Whitelist)" and "https://*" for "Intent whitelist empty",
Note that i have tried these options in "Crosswalk for Andorid" build & "Android" build, and tested in Samsung A8 model, let me know if i need to enable any options in my mobile,
1 more issue is, when i tried to build fo iOS, i have got the attached certificate error, i have downloaded the certificate from step 1a and tried to upload in step 1b in "iOS certificate", could you check and advise.
Regards
Thiru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thiru, I wonder if this is part of the problem:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Paul
I have identified the issue, the request header Origin is set to "file://" if i invoke https URL from my mobile and the URL is not allowing this origin value, i simulated this case in SOAP UI and i have got the same error response when i pass origin as "file://" and it works finr for "file://1" in SOAP UI,
could you advise how can i setup the default origin for https calls.
Regards
Thiru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
the https service which i am calling is a POST service, hence origin header gets added
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thiru, if you are trying to post a file to your server, you might be better off using the Cordova file-transfer plugin to accomplish that. I suspect it exists for this very reason that you are describing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Paul
I am not posting a file, i am sending user id and password in post call to authenicate using an URL, but origin header is going as "file://" from my mobile in ajax call, hence the request has been rejected from server,
could you advise how the origin has been set ?
Regards
Thiru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That would be the appropriate origin, since your app is not associated with a domain or web server, it is a standalone app that just happens to use HTML5 as the language. There are some sample apps that have been built by one of my colleagues that cover logging into a site using OAuth techniques.
https://software.intel.com/en-us/xdk/article/oauth2-with-intelxdk-cordova-html5
https://software.intel.com/en-us/xdk/docs/oauth2authentication
https://github.com/krisrak/jquery-cordova-oauth2
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page