I'm trying to get a simple web project running via PhoneGap. The site uses RequireJS to load modules asynchronously. It also has Handlebars templates which I'm loading via the RequireJS text plugin.
The site works fine when served from a local HTTP server. However on the device it fails to render. Debugging on PhoneGap is tricky (though can be done to some extent), but as far as I can tell, the issue is related to the loading of these templates using the RequireJS text plugin.
The weinre-based debugger provided by PhoneGap shows an error string in the console:
JSCallback Error: Request failed.
Can anyone recommend a solution?
!=
200 or 404, which will probably be either a 500(internal error) or a 403(unauthenticated). Are the templates on a remote server or are they included in your PGwww
folder? I've seen these errors before, where someone forgot to grantINTERNET
-permission on Android.. – Rotative