Hi Rajil,

I used the latest crosswalk-cordova (11.39.257.0), and followed your steps, but 
it didn't reproduced the error message" No 'Access-Control-Allow-Origin'".

It only output ""Error in login 0"" when I request https://www.google.com via 
$http:
12-02 13:18:45.555: I/chromium(18821): [INFO:CONSOLE(53)] "Error in login 0", 
source: file:///android_asset/www/js/controllers.js (53)

And I try to request other external URL such as https://developer.apple.com, it 
is successful:
12-02 13:23:47.285: I/chromium(20008): [INFO:CONSOLE(51)] "Login with status 
undefined : msg : undefined", source: 
file:///android_asset/www/js/controllers.js (51)

I sent the APK to you, could you please test it  in your environment?
Could you send me the APK that you reproduced the issue by the sample code?

Thanks,
Junwei.


----------------------------------------------------------------------



Date: Wed, 26 Nov 2014 17:50:19 +0530

From: Rajil <[email protected]<mailto:[email protected]>>

To: crosswalk-help 
<[email protected]<mailto:[email protected]>>

Subject: [Crosswalk-help] Fwd: Re:  Crosswalk Cordova 10 - External

                URL

Message-ID:

                
<caffjb9ch68kaa_3yaeu97_q-mqecad-or7gvgovz8toq3ed...@mail.gmail.com<mailto:caffjb9ch68kaa_3yaeu97_q-mqecad-or7gvgovz8toq3ed...@mail.gmail.com>>

Content-Type: text/plain; charset="utf-8"



Hi Junwei;



You mentioned that you can open baidu(http://www.baidu.com), and can 
authenticate.  Are you redirecting to that URL or authenticating using $http 
from angular code?



I can open external URL by setting content tag in config.xml (cordova 
configuration file).  But can not authenticate via $http.



You can check via following steps:

1)  Create ionic project.  (reference:

http://ionicframework.com/getting-started/)  using following commands:





ionic start myApp sidemenu



cd myApp$ ionic platform add android$ ionic build android





2)  I changed login.html and controller.js as attached.  You can just replace 
these files in created newly created myApp project.



Notes:

1) This project is running fine with cordova 3.5 and crosswalk 9.  It doesn't 
give Access-Control-Allow-Origin error. while calling url using $http

2)  This project also is running fine with cordova3.6 and without crosswalk.

3)  But gives error with cordova 3.6 and crosswalk 10.

Error after clicking login button:

11-26 07:00:56.981: I/chromium(2147): [INFO:CONSOLE(0)] "XMLHttpRequest cannot 
load https://www.google.com/. No 'Access-Control-Allow-Origin'

header is present on the requested resource. Origin 'file://' is therefore not 
allowed access. The response had HTTP status code 405.", source:

file:///android_asset/www/index.html#/app/playlists<file:///\\android_asset\www\index.html#/app/playlists>
 (0)

11-26 07:00:56.991: I/chromium(2147): [INFO:CONSOLE(43)] "Error in login 0", 
source: 
file:///android_asset/www/js/controllers.js<file:///\\android_asset\www\js\controllers.js>
 (43)







regards,

Rajil Davda

Applied Software


_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to