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


Internet not accessible from ripple emulator

Question:

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 ...


Answer:

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 www.bing.com would look something like this:

http://localhost:4400/ripple/xhr_proxy?tinyhippos_apikey=ABC&tinyhippos_rurl=http%3A//www.bing.com

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

    var xmlhttp = new XMLHttpRequest();
    xmlhttp.open("GET", "http://www.bing.com", true);
    xmlhttp.send();

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.


Related:


Error in running Cordova apps in Visual Studio


android,visual-studio,cordova,visual-studio-2013,visual-studio-cordova
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...

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


cordova,visual-studio-2015,visual-studio-cordova
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...

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


node.js,npm,cordova-plugins,visual-studio-cordova,plugman
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 http://registry.cordova.io/[Plugin]/[Version]) and the build fails, because this plugin only exist locally....

Show content depending on domain using jQuery javascript


javascript,jquery,cross-domain,subdomain,business-catalyst
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...

Tools for Apache Cordova - Installed Plugins are skipped in build


cordova,github,git-branch,visual-studio-2015,visual-studio-cordova
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)...

Send analytic data to different domain without response


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

Parsing html table from different domain [closed]


javascript,jquery,html,dom,cross-domain
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...

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


angularjs,cordova,typescript,visual-studio-2015,visual-studio-cordova
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...

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


apache,visual-studio,cordova,web-api,visual-studio-cordova
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...

how to view network traffic when debugging in visual studio cordova


visual-studio-2015,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...

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


facebook,cordova,cordova-plugins,visual-studio-2015,visual-studio-cordova
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...

How to set WebSocket Origin Header from Javascript?


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

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


visual-studio,visual-studio-cordova,parallels
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...

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


ios,cordova,npm,visual-studio-cordova
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...

Cordova tool for Visual Studio 2015 RC


visual-studio-2015,visual-studio-cordova
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...

validation error during uploading of cordova package for certification


javascript,html5,cordova,visual-studio-2013,visual-studio-cordova
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...

Any sample Cordova Apps available for visual studio developers


cordova,cordova-plugins,visual-studio-2015,visual-studio-cordova
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...

Hide referrer header in API request


javascript,api,google-api,cross-domain,referrer
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, http://weston.ruter.net/2009/12/12/google-tts/ and Request to Google Text-To-Speech API...

set video to html video tag - cordova app


javascript,cordova,windows-phone,visual-studio-cordova
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...

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


ios,cordova,visual-studio-cordova
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...

Unique session issue with Access-Control-Allow-Origin


php,ajax,session,cross-domain,access-control
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....

Angular cross-domain post: fails using some browsers


javascript,angularjs,post,cross-domain
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...

Visual Studio Cordova app runs in Ripple not on device


android,cordova,visual-studio-2013,visual-studio-cordova,vs-2015-preview
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 CLI 5.0.0 - JavaScript error BlankCordovaApp


visual-studio-cordova
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"....

Visual Studio Tools for Cordova - FAILS


android,cordova,visual-studio-2015,visual-studio-cordova
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...

Getting 404 on vs-mda-remote deploy


ios,visual-studio-cordova
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...

Cordova Content Security Policy


cordova,ionic-framework,azure-mobile-services,visual-studio-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' *.azure-mobile.net localhost:1337 *.ajax.aspnetcdn.com"> I got the following errors: Refused...

Visual Studio 2015 Setup Build and Simulate iOS in the Cloud


ios,visual-studio-2015,visual-studio-cordova
I am using "Microsoft Build and Simulate iOS in the Cloud" to establish a remote build on Macincloud.com. 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...

XMLHttpRequest to Restivus API


javascript,meteor,xmlhttprequest,cross-domain,cors
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 = 'http://example.com:3000/api/test'; 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 change screen orientation on VS2015 RC Apache Cordova Tools


visual-studio-2015,visual-studio-cordova,vs-2015-preview
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')....

Cannot call local web api from cordova android app


android,angularjs,cordova,asp.net-web-api,visual-studio-cordova
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...

Handling cross domain preflight AJAX OPTIONS requests with Spring MVC 4


ajax,spring-mvc,cross-domain,preflight,http-options-method
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...

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


javascript,jquery,api,cross-domain
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 = 'https://jira.cyanogenmod.org/rest/api/latest/issue/CYAN-2631'; $.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 https://jira.cyanogenmod.org/rest/api/latest/issue/CYAN-2631. No 'Access-Control-Allow-Origin'...

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


android,cordova,visual-studio-2015,visual-studio-cordova
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...

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


javascript,cordova,cordova-plugins,visual-studio-cordova
I'm using the plugin fileopener2 and to use it, I must call cordova.plugins.fileopener2.open(...); 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...

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


ajax,json,asp.net-mvc,cross-domain,jsonp
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 kendo.data.DataSource({ serverFiltering: true, pageSize: 5, type: 'GET', transport: { serverFiltering: true, serverPaging: true, serverGrouping:...

dojo.require not loading in recursive order


javascript,dojo,cross-domain
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...

AngularJS app should delay start after read file


angularjs,visual-studio-cordova
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.

App Crashing on contact.save() when using ID - Apache Cordova


android,angularjs,cordova,visual-studio-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...

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


ios,cordova,visual-studio-2013,visual-studio-cordova
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:...

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


debugging,windows-phone-8.1,visual-studio-2015,visual-studio-cordova
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...

Visual Studio 2015 RC + RequireJS + jQuery


jquery,requirejs,typescript,visual-studio-cordova
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' } });...

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


android,cordova,visual-studio-2013,visual-studio-cordova
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...

Error CordovaModuleLoadError - multi device hybird app in visual studio


ios,git,cordova,npm,visual-studio-cordova
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...

Purpose? appBundle.js in TypeScript Apache Cordova


visual-studio-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...

Does sencha touch supports windows8


windows,sencha-touch,visual-studio-cordova
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...

Can't create Windows Phone appx bundle from Cordova project


cordova,windows-phone,windows-phone-8.1,visual-studio-cordova,windows-phone-store
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...

AJAX call following 302 redirect sets origin to null


ajax,http,redirect,cross-domain,cors
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...

Visual Studio Tools for Apache Cordova Error


android,cordova,visual-studio-2013,typescript,visual-studio-cordova
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:...

Consuming WebService in Cross Domain


javascript,jquery,web-services,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: http://benfaniz.com.br/WebService.asmx/AAA_Buscar_Nome_Condominio?callback=? To consume it using jQuery,...