Network.request stops working from 2nd session onwards on Kindle

Very odd bug here, will try and reproduce it in a sample project in the morning, but for now wondered if anyone has had this happen before or knows why it’s happening to me.

On first install the network.request functions work fine. Then I kill the app, reopen it…and all network.request calls fail. It only seems to be happening on my Kindle, if I use the same build on another Amazon device it works fine.

I’m totally out of ideas as to why it stops working, even if I make a request to Google it fails to get any response back from the second session onwards so it can’t be my server.

Any suggestions would be greatly appreciated.

Found the cause, it was an odd one.

Our CoronaApplication.java file had a call to load GameThrive:

System.loadLibrary("plugin.GameThrivePushNotifications");

but afaik gamethrive doesn’t support kindle, and so the lib wasn’t present in the project. Still not sure why it only affected network.request, and only from the second session onwards, but that was the cause.

Hello,

The GameThrive SDK for Corona doesn’t support ADM push notifications yet but we plan on rolling it out soon.

That is a very odd issue. Are you able to easily able to comment out GameThrive for Amazon builds to work around this issue? Do you get any odd errors or warning in the logcat from the device? Feel free to send us your full LogCat to support@gamethrive.com.

Thanks.

I should have mentioned in my last part that I removed the offending line from my have file and that fixed the problem. My lua code already if statements to prevent gamethrive calls on Amazon builds, so that part was fine. It would seem that calling system.loadlibrary for a file that doesn’t exist causes weird errors. I would expect a ‘missing library’ error or something, but instead it carries on as normal and then breaks something else the next time it runs. Very odd.

Hello Alan,

We just released support for Amazon ADM notifications. Just follow the new step 4 in our setup guide for builds from the Corona Simulator or step 7 in our Corona Enterprise guide if your building using the ant process. Make sure to replace “COM.YOUR.PACKAGE_NAME” with your full package name in step 8 of the Corona Enterprise guide.

Thanks.

Found the cause, it was an odd one.

Our CoronaApplication.java file had a call to load GameThrive:

System.loadLibrary("plugin.GameThrivePushNotifications");

but afaik gamethrive doesn’t support kindle, and so the lib wasn’t present in the project. Still not sure why it only affected network.request, and only from the second session onwards, but that was the cause.

Hello,

The GameThrive SDK for Corona doesn’t support ADM push notifications yet but we plan on rolling it out soon.

That is a very odd issue. Are you able to easily able to comment out GameThrive for Amazon builds to work around this issue? Do you get any odd errors or warning in the logcat from the device? Feel free to send us your full LogCat to support@gamethrive.com.

Thanks.

I should have mentioned in my last part that I removed the offending line from my have file and that fixed the problem. My lua code already if statements to prevent gamethrive calls on Amazon builds, so that part was fine. It would seem that calling system.loadlibrary for a file that doesn’t exist causes weird errors. I would expect a ‘missing library’ error or something, but instead it carries on as normal and then breaks something else the next time it runs. Very odd.

Hello Alan,

We just released support for Amazon ADM notifications. Just follow the new step 4 in our setup guide for builds from the Corona Simulator or step 7 in our Corona Enterprise guide if your building using the ant process. Make sure to replace “COM.YOUR.PACKAGE_NAME” with your full package name in step 8 of the Corona Enterprise guide.

Thanks.