Software Archive
Read-only legacy content
공지
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 토론

My app can able to connect https website in Emulator , but not in mobile device , how could i debug the issue.

Thirukkumaran_N_
초급자
4,235 조회수

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

0 포인트
26 응답
Amrita_C_Intel
3,300 조회수

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

0 포인트
Amrita_C_Intel
3,300 조회수

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.

0 포인트
Anusha_M_Intel1
3,300 조회수

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

0 포인트
Thirukkumaran_N_
초급자
3,300 조회수

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

 

0 포인트
PaulF_IntelCorp
3,300 조회수

What happens if you just put * in the whitelist entry? And use the W3C option?

0 포인트
Thirukkumaran_N_
초급자
3,300 조회수

I have tried using * and also tried https://*,  but both didnt work, can you help to check 

Regards

Thiru

0 포인트
Hamilton_Tenório_da_
소중한 기여자 I
3,300 조회수

The CONNECTION plugin is checked?

0 포인트
Thirukkumaran_N_
초급자
3,300 조회수

could you advise where is it available, don't find in plugin management,

0 포인트
PaulF_IntelCorp
3,300 조회수

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).

0 포인트
Thirukkumaran_N_
초급자
3,300 조회수

Hi Paul, I am working on it, will update you shortly - Thiru

0 포인트
Paschalis_P_
초급자
3,300 조회수

I got the same problem also. Somehow we need to override the ssl error

0 포인트
Thirukkumaran_N_
초급자
3,300 조회수

Hi Paul, sorry for the delay, i have created a sample app,  i have not given the actual url and related header details, please check.

Regards

Thiru

 

0 포인트
PaulF_IntelCorp
3,300 조회수

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?

0 포인트
Thirukkumaran_N_
초급자
3,300 조회수

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

 

 

 

0 포인트
PaulF_IntelCorp
3,300 조회수

Thiru, I wonder if this is part of the problem:

Screen Shot 2015-11-23 at 7.01.01 PM.png

0 포인트
Thirukkumaran_N_
초급자
3,300 조회수

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

 

 

 

 

 

0 포인트
Thirukkumaran_N_
초급자
3,300 조회수

the https service which i am calling is a POST service, hence origin header gets added 

0 포인트
PaulF_IntelCorp
3,300 조회수

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.

0 포인트
Thirukkumaran_N_
초급자
3,300 조회수

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

 

 

0 포인트
PaulF_IntelCorp
3,025 조회수

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

 

0 포인트
응답