cross-domain,visual-studio-cordova,ripple , Internet not accessible from ripple emulator

Internet not accessible from ripple emulator


Tag: cross-domain,visual-studio-cordova,ripple

I created a VS Cordova project, and need to download some data from a web service, but Ripple runs inside Chrome, and Chrome considers that request "cross-domain" and blocks it. Setting ripple proxy option to disabled/local/remote has no effect. I can start another instance of Chrome with --web-security-disabled command line option, point it to the same URL http://localhost:4409/... and application works fine in that second Chrome. Now all I need is to find a way to pass --web-security-disabled to Chrome when I start it by pressing F5 in Visual Studio. It's probably somewhere in some config file, just need to find it ...


It is difficult to know without looking at the exact code, but it is likely that one of a few of things is happening:

  1. Your code is bypassing the CORS proxy in Ripple
  2. Proxying through Ripple is resulting in the web server denying the request.
  3. You have the Ripple extension installed in Chrome. In effect you can end up with two Ripples running which can cause a number of unexpected behaviors.

To know which is happening, be sure the CORS proxy is set to "local" and check the network tab. An XHR call to would look something like this:


Try just doing this from your index.html page and see if it succesfully goes through the proxy.

    var xmlhttp = new XMLHttpRequest();"GET", "", true);

If you need to further debug or you want to use Ripple outside of Visual Studio, you can actually install the Ripple npm package and use it outside of Visual Studio. Build for Android in the debug config, then go to the bld/Debug folder and execute the following from the command prompt:

    npm install -g ripple-emulator
    ripple emulate android --port 12345

A browser Window will appear. Paste that into Chrome if its not your default and retry. You can then see what is going through the proxy in the command prompt.

You can also use this same method to debug your app using the Chrome Dev Tools with --web-security-disabled.


Cannot change screen orientation on VS2015 RC Apache Cordova Tools

I have just created a blank application from template using Visual Studio 2015 Enterprise RC and when I change the screen orientation to portrait, the build fails on Android and I get the following error. [aapt] C:\Users\HasanDogu\Documents\Visual Studio 2015\Projects\BlankCordovaApp3\BlankCordovaApp3\platforms\android\ant-build\AndroidManifest.xml:6: error: Error: String types not allowed (at 'screenOrientation' with value 'Portrait')....

Cordova CLI 5.0.0 - JavaScript error BlankCordovaApp

I am using the JavaScript Blank Apache Cordova App. Changes were made to the config.xml only. I changed the Cordova CLI in config.xml from 4.3.0 to 5.0.0. NPM downloaded the files, and no errors were reported. When I F5 Debug > Android > Ripple. I get the following: "Exception occurred"....

Does sencha touch supports windows8

I am developing windows8 application for that I am using sencha touch and cordova. I am able to add the platform using cordova platfrom add windows But when I am importing the same windows project in visual studio running on my windows8.0 maching it's saying you need windows 8.1. I...

Handling cross domain preflight AJAX OPTIONS requests with Spring MVC 4

This is probably a simple answer, but I can't seem to get it to work. In a cross-domain, preflight AJAX request, the client first makes an OPTIONS request just get a set of headers back to figure out what the remote server accepts. Right now, for every Spring controller POST...

Visual Studio Cordova app runs in Ripple not on device

I have a Cordova App (5.0.0) developed in VS2015 (RC). The application successfully makes calls to a remote web service when running under the Ripple Emulator. As soon as the application is deployed for debug to a device (In this case a Nexus 6) the call to the Web Service...

Cordova tool for Visual Studio 2015 RC

I tried install Visual Studio 2015 RC on windows 10 (build 10074) , and create blank cordova project , but i get as follow error message , and i tried reinstall visual studio 2015 rc many times , but can't resolve this . Android Package: extra-android-support One or more required...

Unique session issue with Access-Control-Allow-Origin

When I am trying to access data using cross Domain request (from multiple domains). I have added the following codes in php file at back end. header("Access-Control-Allow-Origin: *"); Every time a new session is generated for each request, because of which large number of session files pile up on server....

How to set WebSocket Origin Header from Javascript?

I'm trying to use javascript to make a websocket request from a local page to a server running at ip on behalf of The request goes through, but the server sees the Origin: header in the websocket request and rejects the connection because it wants...

App Crashing on when using ID - Apache Cordova

Edit: I have tried this on multiple APIs and also an actual android device and it still crashes on save. I'm developing a contact based app on android using Tools for Apache Cordova for Visual Studio and the cordova contacts plugin (v2.13). I can currently save and retrieve contacts but...

Visual Studio Tools for Apache Cordova Error

I recently installed Visual Studio Tools for Apache Cordova CTP 3.1 in Visual Studio 2013 running on Windows 8.1. I receive the following error when I try to run a standard new Cordova project (in the Android Emulator or Device). The project is named MyCordova01: OutPut Window show below message:...

Angular cross-domain post: fails using some browsers

I have a cross-domain POST request in Angular (1.4.0), which works using Chrome (43+) and Firefox (37+) after I remove the Content-Type header. But it fails when using Safari, or Safari/Chrome on the iPhone/iPad. The error message then is: Failed to load resource: Request header field Content-Type is not allowed...

Hide referrer header in API request

I need to make requests to Google Translate Text-To-Speech API. I have an enabled key but keep getting blocked by No Access-Control-Allow-Origin. I've posted more about it here: Google Translate API - No Access Control Origin with Text to Speech The following sources, and Request to Google Text-To-Speech API...

How to use cross domain requests using json with disable web security?

I have the below scripts that make a REST / WCF WEBGET call to return a payload. It works perfectly fine when both AppServer and Web Server in the same domain. UI Javascript: model.Source = new{ serverFiltering: true, pageSize: 5, type: 'GET', transport: { serverFiltering: true, serverPaging: true, serverGrouping:...

Getting 404 on vs-mda-remote deploy

I am trying to run the blank default cordova app from VS2013 using the remote device target and I am getting the following output from the OSX-side: Done with currentBuild. Checking for next build in queue. GET /build/tasks/22365 200 1ms - 856b GET /build/tasks/22365/log 200 3ms GET /files/22365/cordovaApp/plugins/ios.json 200 2ms...

dojo.require not loading in recursive order

I'm trying to move some of my dojo 1.7 codebase online. I've enabled CORS on the server, and local/online files are loaded with dojo.require. While this worked fine for local files, http files would fail to load in recursive order. For example, dojo.registermodulepath("my.path", "http://my.path"); dojo.require(my.path.module1); dojo.require(my.path.module2); Now, assuming the module1...

Cordova Tools for VS 2005: iOS app does not display splashscreen and icons

Using VS 2013 Cordova Tools (the current version), my iOS app does not display the given splashscreen and icons unless I set <icon> and <splashscreen> elements in config.xml. However, when config.xml is edited using the visual editor, it simply deletes all <icon> and <splashscreen> elements. Am I missing something? Obs:...

set video to html video tag - cordova app

My app is a cordova hybrid Windows phone 8.1 app. I am capturing a video with media-capture plugin and getting the video url in my callback which is something like this: /VideoCache/Video-7c5eb8ae-5c3d-48ee-9f3b-0805e81ebc06.mp4 How can I set this video to an html video tag. I created a super simple project to...

Error in running Cordova apps in Visual Studio

When I make a new typescript Cordova application in Visual Studio, a page comes open with: Please fix the following issues to ensure that your app builds and runs successfully. Android SDK : The override value set on the Environment Variable Option Page pointed to an invalid or nonexistent location...

Can't create Windows Phone appx bundle from Cordova project

I need to create an appxbundle file for Windows Phone Store but unfortunately, the Visual Studio 2015 RC Cordova Tools build only appxupload with appx file. The Cordova version is 5.0.0. I've found two workarounds from this post. Unfortunately, none of them is working. The first one 1.) Another way...

Cannot get Cordova project building in VS2015 with the facebook connect plugin

I've tried everything, but cannot seem to get it working. I've done the following: 1.Remove the plugins with the variables via the config designer. 2.Update to Cordova 5.0.0 via the config designer (Platforms > Cordova CLI) 3.From the command line: 1.Go to your project directory. 2.Type the following substituting the...

Visual Studio Tools for Cordova - FAILS

Everytime I build I get the below error. I'm new to cordova in Visual Studio. I actually tried installing for VS2013 first. I downloaded VS 2015 RC community and I'm trying to get the project started. However I'm getting the below message. Attempt 1: I tried going into options>VS tools...

How to run Android emulator in VS.NET 2015 when using Parallels on OSX?

I have a Cordova app. When I select the Android emulator and try to run, I get the following errors: PANIC: HOME is defined but could not find AVD_GalaxyNexus_ToolsForApacheCordova.ini file in $HOME\.android\avd (Note: avd is searched in the order of $ANDROID_AVD_HOME,$ANDROID_SDK_HOME\.android\avd and $HOME\.android\avd) If the above are environment variables, they...

Purpose? appBundle.js in TypeScript Apache Cordova

Why does Visual Studio 2015 RC compile TypeScript in the “scripts” folder in the root of your Cordova project and copy them as a single JavaScript file called “appBundle.js” under the “www/scripts” folder? Is this a best practice?Does this just apply to Visual Studio?Is this an Apache Cordova approach? Only...

CordovaModuleLoadError [ '4.3.0' ] - multi device hybird app in visual studio

This is a follow up question after I attempted to fix this issue. I now have Visual Studio 2015 with the associated tools for Apache Cordova, but I am still unable to run multi device hybrid app in ios simulator. I created a new blank Cordova project and I am...

Can't deploy Visual Studio Cordova app to iPhone using remote agent: CordovaModuleLoadError

I am trying to deploy my Cordova app to my iPhone using Visual Studio 2015 RC by Remote Agent > Local Device. I have successfully installed, ran and connect the remote agent to my Visual Studio. According to this link, when I run Local Device, iTunes should pop up on...

how to view network traffic when debugging in visual studio cordova

I'm using VS tool for Cordova to run my app via Remote Device on my iphone (build/deploy from mac using vs-mda-remote). I see there's the DOM Explorer and Javascript Console which let's me do most of what I need for debugging. However, there's one piece missing that I can't find...

Send analytic data to different domain without response

Precondition I own I do not own, but I can embed javascript code there Question How to send analytic data from to ? Expected : client -> server Not expected : client -> server -> server Its principle seems like to...

How to Add AngularJS 1.4 in Visual Studio 2015 RC Cordova TypeScript Project

I have a Visual Studio 2015 RC and create a TypeScript Cordova project. I want to use AngularJS in this project, but after search for a long time, there's no such step by step guide telling me how to apply AngularJS 1.4 in VS2015RC TypeScript Cordova project. Could someone share...

Cordova cordova.plugins is undefined on win8 but not on iOS

I'm using the plugin fileopener2 and to use it, I must call; When I run this on iOS, everything works perfectly. However, when I run the app on win8, I get an error telling me that cordova.plugins is undefined. Also, I double checked that, after 'ondeviceready' is fired, I...

AngularJS app should delay start after read file

My AngularJS app required to read stored settings before it started, but the problem is that the app starts before reading the file from the storege memory. I am using "cordova.file.dataDirectory" inside "onDeviceReady" event.

Visual Studio 2015 RC + RequireJS + jQuery

I'm using Visual Studio 2015RC + Cordova CLI 5.1.1 + TypeScript + RequireJS + jQuery . I'd like to change the location of my jquery.js file from the scripts folder to scripts/lib. I added a requirejs.config and changed the jQuery location. requirejs.config({ baseUrl: 'scripts/lib', paths: { jquery: 'jquery' } });...

Consuming WebService in Cross Domain

It should be very simple. I have read a lot of posts about consuming web service cross domain and the use of JSONP, but there is something I am missing. If I call the following URL in the WebBrowser, I can get my result: To consume it using jQuery,...

XMLHttpRequest to Restivus API

I have got a problem when sending a cross domain XMLHttpRequest to a Restivus API. Here my code for the client side script: var xhrurl = ''; var xhr = createCORSRequest('POST', xhrurl); xhr.withCredentials = true; xhr.setRequestHeader("Content-type","application/json"); xhr.setRequestHeader("X-User-Id",object.apiUser); xhr.setRequestHeader("X-Auth-Token",object.apiKey); xhr.send(); Here the function createCORSRequest function createCORSRequest(method, url) { var xhr =...

Cannot call local web api from cordova android app

I am currently developing a cordova 4.3 android app in Visual Studio 2015 RC. It's an AngularJS app and I use $resource to send requests to an ASP.NET Web Api application running on a different port on the same computer. Debugging the app in Ripple works fine if I disable...

“Publish Android App” in Visual Studio 2015 RC with Apache Cordova is not doing anything

I am attempting to create an Android app using the Visual Studio 2015 RC with Apache Cordova (a multi-platform hybrid app) and for some reason, when I go to: TOOLS -> ANDROID -> PUBLISH ANDROID APP... I get a quick thinking/circling mouse pointer then nothing. Useful Information: -The installation went...

Unable to receive debug messages for cashing cordova app on windows 8.1 phone device

I have VS 2015 Enterprise RC installed and am in the process of porting a Cordova app, deployed on iOS and Android, to Windows 8.1 Phone / Universal After making the necessary changes I have an App that crashes shortly after the splash screen is displayed on device. I don't...

Any sample Cordova Apps available for visual studio developers

i'm new for mobile app development. please post links, sample or any cordova apps for visual studio developers. if any body is willing to answer me please do that. if you don't know please ignore, otherwise don't discourage about it. Thanks...

Can't build Android platform in Cordova 5.0.0 with build.bat: Command failed with exit code 8

My enviroment is Windows 7 + Visual studio 2013 to develop hybrid mobile app, After i upgrade Cordova to 5.0.0, i've already upgrade SDK to newly version, and eliminable Command failed with exit code 2, then deploy to Device and build with Android, i got the compile error: Error 1...

Tools for Apache Cordova - Installed Plugins are skipped in build

i have a cordova app with 6 plugins and the strange behavior that app is not working after i create a new clone of the sources from github. If i install a plugin over the config.xml dialog and build the android version of the app. The native source file (*.java)...

Cordova Content Security Policy

I've got an Cordova app and after upgrading (5.0.0) it I'm unable to call any resource at all. I've added the whitelist plugin and added the following tag to index.html <meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval' * localhost:1337 *"> I got the following errors: Refused...

VS 2015 RC - Trying to fetch local plugin from remote registry

I have a local plugin, which I'm trying to install to a Cordova project. Adding it through VS works like a charm, but when I'm building it, plugman tries to retrieve the plugin from the registry (npm http GET[Plugin]/[Version]) and the build fails, because this plugin only exist locally....

Parsing html table from different domain [closed]

i'm making an iOS app for showing schedule for my college. I'm kinda new in javascript, i thought it's simple until now. I know this task may be simple and trivial, but listen: My application generates link with parameters and then creates a dynamic page with an iframe and opens...

Is there a way around Access-Control-Allow-Origin?

I'm using an API from JIRA to get some information on bugs. Here's an example of the JQuery I'm using to get it: var endpoint = ''; $.get(endpoint, function(data) { do_stuff(data, data['fields']['project']['self']); }); And, I'm getting the ever-terrible Access-Control-Allow-Origin error. It looks like this: XMLHttpRequest cannot load No 'Access-Control-Allow-Origin'...

Visual Studio 2015 Setup Build and Simulate iOS in the Cloud

I am using "Microsoft Build and Simulate iOS in the Cloud" to establish a remote build on I am getting the following errors when I try to build an IOS app Severity Code Description Project File Line Error Not implemented (Exception from HRESULT: 0x80004001 (E_NOTIMPL)) 0 Severity Code Description...

AJAX call following 302 redirect sets origin to null

I'm doing an ajax call From domain A to domain B. My domain B checks if A is in the list of allowed domains and sets the Access-Control-allow-Origin to domain A. So far, so good. Domain B responds to the request by sending a 302 redirect to domain C using...

How to save data from visual studio apache cordova project to sql server throght web api?

I m new to apache cordova project in visual studio, i have doubt that how system can save data in my sql server from this project. I have already created web API to save data to sql server. How can I call that from apache cordova visual studio project. Any...

Show content depending on domain using jQuery javascript

HI Guys I have a site that carries 2 domains one is .com and the other is a .us I am trying to get it to show a flag for the country domain chosen so if it is clicked on a link to direct to a .us I wanted to...

Error CordovaModuleLoadError - multi device hybird app in visual studio

I am following the steps here and here to build and simulate a multi device hybird app in ios. I followed the steps in the articles and I can see that when I run my multi device hybird app in visual studio using iphone simulator as the run target, the...

validation error during uploading of cordova package for certification

I want to publish my windows cordova app on app store but the problem is that after creating successfully package when I upload it on store so it show error validation error we cant read the .appxupload. After rebuild solution of my project visual studio auto create in manifest file...

Visual Studio 2015 Community RC Cordova Javascript Project build error with Orientation=Portrait

Problem description: With Visual Studio 2015 Community RC installed, create a new blank cordova javascript project and build it, it's ok. Now, open config.xml and in the "Common" tag, change the "Orientation" from "Landscape or Portrait (Default)" to "Portrait" and build it. The error is: Command failed with exit code...