Page 1 of 1

Uncaught SyntaxError: Unexpected token :

Posted: Fri May 31, 2013 3:19 pm
by john5907412

I'm trying to consume output from a simple service, I'm specifying jsonp.
When I call the live service from the app in test mode, the above error occurs in chrome developer tools console.
When I test the service in the IDE I get good data back.
When I use the returned data as an echo response, the app functions correctly.
The data passes jsonlint when pasted into it.

What can I do to track the problem down?


Uncaught SyntaxError: Unexpected token :

Posted: Fri May 31, 2013 3:22 pm
by maxkatz

Instead of using jsonp (use json), try with the proxy enabled. Does it work then?


Uncaught SyntaxError: Unexpected token :

Posted: Fri May 31, 2013 3:28 pm
by john5907412

Success!

Thanks for the quick response Max

(I tried to use the proxy earlier, but it was greyed out when jsonp was selected and I didn't think to specify json.)

What do I have to do to the service to make it work without the proxy?
John


Uncaught SyntaxError: Unexpected token :

Posted: Fri May 31, 2013 3:37 pm
by Maryna Brodina

Hello! Here is more information http://docs.appery.io/documentation/a.... You can disable proxy when you test on device or use Google Chrome with security disabled.


Uncaught SyntaxError: Unexpected token :

Posted: Fri May 31, 2013 3:42 pm
by john5907412

Thanks Marina, I'll talk to the service owner