Find Jobs
Hire Freelancers

Help me Overcome Same Origin Policy problem (I think) in Simple Working Mobile App Developed with Cordova, Node.js, Express

$3-10 SGD / hour

Mbyllur
Postuar over 6 years ago

$3-10 SGD / hour

Hi. I am Philip Lam and I have just started learning mobile app development. I am trying to develop a basic mobile app which can get and post data to a server. I have managed to get a very simple mobile app working. Briefly, the mobile app moves some Jsonp and Json around. The back end is an Express Node.js server ([login to view URL]). The data is sent between the front end and the back end by way of jQuery JSON GETs and POSTs. So far, I have successfully gotten the server side to launch and work. The server also correctly tracks and sends information. Furthermore, the browser on my PC is also able to detect the server's performance. All this is working fine. The problem is that when the mobile app is launched into the Android emulation, it does not respond at all to any clicks on the mobile app. On the other hand, the browser on the Android emulation (when directed to [login to view URL]) does show the correct response from the server. That is, clicking on the Test JSONP button sends the Jsonp message to the console log and clicking on the Test JSON button sends the Json message to the console log. (BTW, [login to view URL] is the loopback IP address for the Android emulation to access the server which is on the same PC as the emulation whereas 3000 is the port where the server is listening.) I strongly suspect that the problem lies with the Same-Policy Origin and if I am correct, I wish to use whatever means to overcome the problem. From the code, you wills see that I have already tried JSONP and CORS. Please debug the code and show me the correct code. The code "works" perfectly in that the server is clearly working (since my PC browser and also the Android emulation browser can both "see" and track the server). The problem is that the mobile app itself does not detect or "see" the server's responses at all. In fact, clicking on the buttons in the mobile app results in no response at all. There is a limit to the number of words I can type here so I have put all the code into a word document for your reference. Thanks and I look forward to hearing from you. Regards, Philip Lam
ID e Projektit: 15402624

Rreth projektit

8 propozime
Projekt në distancë
Aktive 6 yrs ago

Po kërkoni të fitoni para?

Përfitimet e ofertës për Freelancer

Vendosni buxhetin dhe afatin tuaj
Paguhuni për punën tuaj
Përshkruani propozimin tuaj
Është falas të regjistrohesh dhe të bësh oferta për punë
8 freelancers are bidding on average $10 SGD/orë for this job
Avatari i Përdoruesit
Hello Liam. the problem is the whitelisting of the ips thats why it is not coming on android. lets discuss this thanks.
$11 SGD në 40 ditë
4,9 (93 përshtypje)
6,0
6,0
Avatari i Përdoruesit
A proposal has not yet been provided
$11 SGD në 8 ditë
5,0 (1 review)
2,9
2,9
Avatari i Përdoruesit
Hi.. I saw your proposal and understood completely . I complete your task on time and in budget with great accuracy. Waiting for your reply  Thanks   Ajay Dhangar
$13 SGD në 40 ditë
0,0 (1 review)
0,0
0,0
Avatari i Përdoruesit
Hi, Let me have a look at the problem. As you pointed out, it might be an issue with CORS. We can setup a reverse proxy on your machine to solve the issue. Thanks
$10 SGD në 2 ditë
0,0 (0 përshtypje)
0,0
0,0

Rreth klientit

Flamuri i SINGAPORE
Singapore
0,0
0
Anëtar që nga sht 16, 2017

Verifikimi i klientit

Faleminderit! Ne ju kemi dërguar me email një lidhje për të kërkuar kredinë tuaj falas.
Ndodhi një gabim gjatë dërgimit të email-it tuaj. Ju lutemi provoni përsëri.
Përdorues të regjistruar Punë të postuara
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Po ngarkohet shikimi paraprak
Leja u dha për Geolocation.
Seanca e hyrjes ka skaduar dhe ke dalë. Hyr sërish.