You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ripple.apache.org by "Tim Barham (JIRA)" <ji...@apache.org> on 2015/05/01 04:04:07 UTC

[jira] [Commented] (RIPPLE-82) "cordova already defined" JS error when running "ripple emulate"

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

Tim Barham commented on RIPPLE-82:
----------------------------------

Ripple falls foul of this check because it creates a setter for windows.cordova to intercept creation of that object, so it can patch it. I can't see any way to fix this on the Ripple side, so it looks like I'll have to fix it in Cordova (which means a new release of tools and all platforms, which is annoying). Incidentally, I tried making the property Ripple defines non-enumerable, but that doesn't help. Cordova's check is {{"cordova" in window}} which returns true even if the property is non-enumerable.

> "cordova already defined" JS error when running "ripple emulate"
> ----------------------------------------------------------------
>
>                 Key: RIPPLE-82
>                 URL: https://issues.apache.org/jira/browse/RIPPLE-82
>             Project: Apache Ripple
>          Issue Type: Bug
>         Environment: Ripple 0.9.28, Cordova 5.0.0, Chrome 42.0.2311.135 x64, Mac OS X 10.10.3, Android SDK Tools 24.1.2, Android SDK Platform Tools 22, Android SDK Build Tools 22.0.1
>            Reporter: Mark Holmes
>
> *Replication*
> After freshly installing Ripple and Cordova I created a new project using {{cordova create test}}. I navigated into this project and build it using {{cordova platform add android; cordova build android}}. I then ran the emulator using {{ripple emulate}}
> *JS Console*
> {{Ripple :: Environment Warming Up (Tea. Earl Gray. Hot.)}}
> {{{color:red}ripple.js:50 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.{color}}}
> {{http://localhost:4400/ripple/assets/ripple.js Failed to load resource: the server responded with a status of 404 (Not Found)(anonymous function) @ ripple.js:50}}
> {{ripple.js:37 cordova :: Initialization Finished (Make it so.)}}
> {{{color:red}cordova.js:104 Uncaught Error: cordova already defined{color}}}
> *Terminal*
> {{INFO: Server instance running on: http://localhost:4400}}
> {{INFO: CORS XHR proxy service on: http://localhost:4400/ripple/xhr_proxy}}
> {{INFO: JSONP XHR proxy service on: http://localhost:4400/ripple/jsonp_xhr_proxy}}
> {{Cordova 3.0 Project detected...}}
> {{INFO: Could not find cordova as a local module. Expecting to find it installed globally.}}
> {{refreshing project (platform: android) ...}}
> {{... done.}}
> {{INFO: Set Device User Agent (String): "Mozilla/5.0 (Linux; Android 4.1.1; Nexus 7 Build/JRO03D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166  Safari/535.19"}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)