'Failed to parse JSON' occuring only on Android APK

0 favourites
  • 2 posts
  • Hi,

    I'm using a JSON script loaded in with AJAX to determine positions and spawn times for enemies. It works as expected on desktop browser, desktop nw.js export, and remote preview on android. But when exporting the game to APK and testing it, the json won't load and none of the enemies appear. JSON files I used for other parts of the game still worked as intended, though, so it seems to be an issue with just that one file.

    When using PC-mobile debugging, this is the error I found:

    What could be done to fix this? Does array size affect whether or not they work on mobile?

    Any help or advice on how to potentially troubleshoot this would be life-saving 🙏

    Tagged:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Coming back to this now, I think the problem had to do with the naming used to call the JSON. I used 'request URL' and then checked a variable to determine which sheet to grab. It worked fine when I used 'request project file' and manually chose the file instead. Less efficient, but it did fix it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)