[jbosstools-issues] [JBoss JIRA] (JBIDE-19187) CordovaSim + localhost:8080 fail

Ilya Buziuk (JIRA) issues at jboss.org
Wed Feb 11 06:41:49 EST 2015


    [ https://issues.jboss.org/browse/JBIDE-19187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13039484#comment-13039484 ] 

Ilya Buziuk edited comment on JBIDE-19187 at 2/11/15 6:41 AM:
--------------------------------------------------------------

[~burrsutter], well we have discussed cross domain ajax issues in  JBIDE-18312 and JBIDE-18404
in JBIDE-18404 our user and contributor Kaloyan Raev (zend studio lead) proposed very important stuff: 
{quote}
I experience serious troubles with CordovaSim after this switch to using the Remote cross domain proxy. Setting the Cross Domain Proxy to Remote means that all calls go through a cloud-based proxy server hosted at https://rippleapi.herokuapp.com/xhr_proxy. More info is available here: https://issues.apache.org/jira/browse/RIPPLE-63
In addition to the security issues, this also breaks mobile apps which tries to talk to a backend on localhost or to a remote server in the user's intranet - the cloud-based proxy just cannot connect to such backends. I also experience troubles with backends hosted on AWS. These are a quite common use cases during development of mobile apps.
Of course, users can switch the Cross Domain Proxy to Local or Disabled, but (1) this takes some painful hours to realize, and (2) it has to be done every time the simulator is started. All this ruins the user experience.
Was setting the default value to Remote really necessary to resolve this issue? I see it was just one of many changes done. Is it possible to revert it back to Local as the default?
{quote} 
So, this is exactly what we are facing in this issue. Now it fixed in master - JBIDE-18732. However, it's not pushed to 4.2.x cause it was decided that the fix is not save enough. 

What is proposed and will be done for 8.1.0 release:
1. local proxy will be default one
2. fixing livereload issue - JBIDE-19109
3. security warning for remote proxy JBIDE-19163 (PR was also contributed back to ripple - https://github.com/apache/incubator-ripple/pull/37)    

Basically, as I said before,  there is no silver bullet for handling all cross domain ajax. It depend dramatically on the server side setup  - http://stackoverflow.com/questions/18402422/phonegap-application-not-working-on-google-ripple
Also, I have decided to write a blog about CordovaSim and CrossDomain ajax in order to avoid misleading stuff our users might experience.



was (Author: ibuziuk):
[~burrsutter], well we have discussed cross domain ajax issues in  JBIDE-18312 and JBIDE-18404
in JBIDE-18312 our user and contributor Kaloyan Raev (zend studio lead) proposed very important stuff: 
{quote}
I experience serious troubles with CordovaSim after this switch to using the Remote cross domain proxy. Setting the Cross Domain Proxy to Remote means that all calls go through a cloud-based proxy server hosted at https://rippleapi.herokuapp.com/xhr_proxy. More info is available here: https://issues.apache.org/jira/browse/RIPPLE-63
In addition to the security issues, this also breaks mobile apps which tries to talk to a backend on localhost or to a remote server in the user's intranet - the cloud-based proxy just cannot connect to such backends. I also experience troubles with backends hosted on AWS. These are a quite common use cases during development of mobile apps.
Of course, users can switch the Cross Domain Proxy to Local or Disabled, but (1) this takes some painful hours to realize, and (2) it has to be done every time the simulator is started. All this ruins the user experience.
Was setting the default value to Remote really necessary to resolve this issue? I see it was just one of many changes done. Is it possible to revert it back to Local as the default?
{quote} 
So, this is exactly what we are facing in this issue. Now it fixed in master - JBIDE-18732. However, it's not pushed to 4.2.x cause it was decided that the fix is not save enough. 

What is proposed and will be done for 8.1.0 release:
1. local proxy will be default one
2. fixing livereload issue - JBIDE-19109
3. security warning for remote proxy JBIDE-19163 (PR was also contributed back to ripple - https://github.com/apache/incubator-ripple/pull/37)    

Basically, as I said before,  there is no silver bullet for handling all cross domain ajax. It depend dramatically on the server side setup  - http://stackoverflow.com/questions/18402422/phonegap-application-not-working-on-google-ripple
Also, I have decided to write a blog about CordovaSim and CrossDomain ajax in order to avoid misleading stuff our users might experience.


> CordovaSim + localhost:8080 fail
> --------------------------------
>
>                 Key: JBIDE-19187
>                 URL: https://issues.jboss.org/browse/JBIDE-19187
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: cordovasim
>    Affects Versions: 4.2.0.Final
>         Environment: JBDS 8
>            Reporter: Burr Sutter
>            Assignee: Ilya Buziuk
>            Priority: Critical
>             Fix For: 4.2.3.Beta1, 4.3.0.Alpha1
>
>         Attachments: hybrid4001.zip, localhost_error.png
>
>
> The following logic used to work and now fails:
>     	$.getJSON("http://localhost:8080/jboss-as-kitchensink-html5-mobile/rest/members", function(data) {
>     	    $("#contacts").empty();
>     	    var items = [];
>     	    $.each(data, function(key, val) {
>     	       console.log("item: " + key + " " + val.name);
>     	       items.push("<li><a href='#"+ key + "'>" + val.name +"</a></li>");
>     	    });
>     	    $("#contacts").append(items);
>     	    $("#contacts").listview("refresh");	
>     	});
> -------
> as seen in this youtube video and comments
> https://www.youtube.com/watch?v=FstGLMr3W8s&feature=gp-n-y&google_comment_id=z12aft3owojdsrmgl04cengwwrjzznmb5t00k&noredirect=1
> ---- Using the Chrome Debugger (via CordovaSim, right-click, Dev Tools)
> has the following error message:
>  https://rippleapi.herokuapp.com/xhr_proxy?tinyhippos_apikey=ABC&tinyhippos_…l=http%3A//localhost%3A8080/jboss-as-kitchensink-html5-mobile/rest/members 500 () rippleapi.herokuapp.com/xhr_proxy?tinyhippos_apikey=ABC&tinyhippos_rurl=http%3A//localhost%3A8080/jboss-as-kitchensink-html5-mobile/rest/members:1



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)



More information about the jbosstools-issues mailing list