john5907412
Posts: 0
Joined: Fri May 31, 2013 3:19 pm

Uncaught SyntaxError: Unexpected token :

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?

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Uncaught SyntaxError: Unexpected token :

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

john5907412
Posts: 0
Joined: Fri May 31, 2013 3:19 pm

Uncaught SyntaxError: Unexpected token :

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

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Uncaught SyntaxError: Unexpected token :

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.

john5907412
Posts: 0
Joined: Fri May 31, 2013 3:19 pm

Uncaught SyntaxError: Unexpected token :

Thanks Marina, I'll talk to the service owner

Return to “Issues”