You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Patrick Mueller (JIRA)" <ji...@apache.org> on 2014/01/10 07:44:50 UTC

[jira] [Commented] (CB-5759) Conflict between xhr.js from Intel XDK and Weinre remote hook script

    [ https://issues.apache.org/jira/browse/CB-5759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13867564#comment-13867564 ] 

Patrick Mueller commented on CB-5759:
-------------------------------------

Thanks for the bug report!

Couple things:

- be gentle with me; I've never heard of the Intel XDK thing till this bug report, still trying to figure out what it is :-)

- I noticed a "use strict" in BrokenXDKXHRDemo/js/index_user_scripts.js; we had some problems with strict-mode in the past, I was hoping it was behind us, but you never can tell.  Could you try removing that and see if it changes anything?

- I notice you tested on an iPod touch - you should be able to get away without using weinre for most platforms now, as the platforms have been adding remote debug support into the browsers/web views.  Remote debugging is supported for iOS apps as of iOS 6 or so, as long as you have Mac desktop/laptop running a recent version of OS X.  I woulda guessed that whatever emulator you are using on your host would be using a browser/web view that also supported debugging.

- what's the easiest way for me to see the contents of intelxdk.js; I'd rather not have to download a whack of stuff if I can avoid it, just yet.  I'd like to see xhr.js as well - noticed that you didn't include it in your index.html, but had also mentioned adding it didn't change anything.  Smells like you likely need it (for some reason) when running your app.

- do you happen to know any of the Intel XDK devs? anyone who hangs out at Apache Cordova mailing lists?


> Conflict between xhr.js from Intel XDK and Weinre remote hook script
> --------------------------------------------------------------------
>
>                 Key: CB-5759
>                 URL: https://issues.apache.org/jira/browse/CB-5759
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: weinre
>    Affects Versions: 2.9.0
>         Environment: OS X, Windows
>            Reporter: Jonathan Silverman
>            Assignee: Patrick Mueller
>            Priority: Critical
>              Labels: javascript
>
> I have code that proves a conflict between xhr.js and weinre.
> Cross-post from: https://www.html5dev-software.intel.com/viewtopic.php?f=34&t=5024
> Adding xhr.js causes Weinre to not work, as no connectable targets appear. http://cl.ly/image/1L0l060e381G
> I can confirm that xhr.js and Weinre conflict. If they are both added, neither work. If one is added, and not the other, it works.
> Example:
> {code}
> <script src="intelxdk.js"></script>
>   <script src="xhr.js"></script>
>   <script type="text/javascript">
>    /* This code is used to run as soon as Intel activates */
>    var onDeviceReady=function(){
>       //hide splash screen
>       intel.xdk.device.hideSplashScreen();
>      
>      $.get("https://dev-1-web-geo.meteostar.local").done(function(data){ alert(data); });
>    };
>    document.addEventListener("intel.xdk.device.ready",onDeviceReady,false);
>   </script>
> {code}
> Works
> {code}
> <script src="intelxdk.js"></script>
>    <script src="http://debug-software.intel.com/target/target-script-min.js#QhYeZC6N-jY-XBnNnuS5DqN6Ti72PEzRd1Oeu_TKT9g"></script>
>   <script src="xhr.js"></script>
>   <script type="text/javascript">
>    /* This code is used to run as soon as Intel activates */
>    var onDeviceReady=function(){
>       //hide splash screen
>       intel.xdk.device.hideSplashScreen();
>      
>      $.get("https://dev-1-web-geo.meteostar.local").done(function(data){ alert(data); });
>    };
>    document.addEventListener("intel.xdk.device.ready",onDeviceReady,false);
>   </script>
> {code}
> Doesn't
> It doesn't seem to matter where you put the Weinre script. No matter what, it breaks xhr.js. It broke when included both before and after the xhr.js include.
> To me, this is critical because I would like to use Weinre to debug and test while using xhr.js to enable cross-origin XHRs to the app.
> This seems to affect Weinre 2.0.0-pre-HHOSN197, if that's the correct version number.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)