timed out errors on Android

Hi Julius,

I have been working through a transfer script and it is a bit more complicated (with my apologies, the info I gave you about Mongo will not give the output we need). Some of the data is stored in the MySQL database, as well as a few config files that have to be moved. 

Let me look at the code first, I have a couple Coronium boxes running to do some comparisons. It could be a simple client issue since the core and the client have fragmented some. 

I’m running the corona sdk code for appOpen and addEvent in particular. Using http://docs.coronium.io/en/latest/client/Analytics/

The code in question works as desired in both the simulator and ios devices. I also used identical code on another app and it also works on android there. Although my build settings are described in my initial post, it makes me wonder if there is some obscure setting in Android that won’t let me make an API call from the client to my AWS cloud based (ubuntu) server where I’m running coronium.

@loyola - I have started on a massive quest to figure this out, and appreciate your input. And, I too suspect something with Android, but have nothing concrete to back it up with yet.

These are the harder ones to debug, because if it works on other platforms, it should work on all the platforms. And nothing has really changed in that area of the code base.

I’ve got my phone all tethered up to the Android monitor (Wi-Fi off) and can get a successful round-trip on Android 6.0.1 with Coronium 1.92 (which it should), I was watching the device logs and the data is returned.

[lua]

05-09 10:08:58.457: I/Corona(31616): result:

05-09 10:08:58.458: I/Corona(31616):    user:

05-09 10:08:58.458: I/Corona(31616):       profile:

05-09 10:08:58.458: I/Corona(31616):          accessId: 

… (and so on)

[/lua]

I don’t have any other Android versions to test on, so there could be something there. My test is also imperfect because what I really need is a compiled APK that throws the error. Because it could also be caused by some other element that the Coronium client isn’t playing nice with.

@loyola - Julius is on DigitalOcean, and your on AWS so it’s probably not a host issue.

@develephant, appreciate you looking into this. I can zip or tarball either my project code or a compiled APK and give you the url to it if you’re able to email me offline. Are you able to access my email in the system?

@loyola - That would be great if I could get an APK to test, I don’t even need any of the code. I just need to get some clue when it happens.

I don’t have access to accounts, but you can send it to chris at coronalabs dot com.

That would be much appreciated.

Cheers

Hi,

The error has been captured (thanks @loyola for APK) and forwarded to Engineering. We will see what they say.

Cheers.

Hi Chris.
What’s the news on this? Did you manage to get to the bottom of the Android timed out errors?
I’m also really keen to update my Coronium instance to your newest version if you have news on that?
_____________________

This is a different issue but there’s a problem on iOS9… I’m getting this :

ERROR: network request failed: http://XXX.XXX.XX.X/1/code/createUser [-1022: The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.]

( Where XXX.XXX.XX.X is my Coronium instance IP )
I’m guessing it’s an  iOS App Transport Security issue. I tried adding an entry in the build.settings to whitelist this but it seems we’re not allowed to add IP addresses as NSExceptionDomains.

NSAppTransportSecurity = { NSExceptionDomains = { ["XXX.XXX.XX.X"] = { NSIncludesSubdomains = true, NSExceptionRequiresForwardSecrecy = false, NSExceptionAllowsInsecureHTTPLoads = true, } }, },

Any suggestions on this?

I should probably start a new thread for this iOS9 ATS problem but for now I have two workarounds which are both not ideal …

  1. use **http://xip.io/**to provide wildcard DNS for my Coronium instance IP

  2. Add  NSAllowsArbitraryLoads = true to the NSAppTransportSecurity table in build.settings.

I’m concerned the first workaround will slow stuff down and compromise security and the second workaround will almost certainly cause Apple to reject my app. What do you suggest doing?

Hi,

Please start a new thread on Apple issue. Also be sure to understand the underlying changes that are happening everywhere right now.

https://developer.apple.com/news/?id=05042016a

Thank you for your patience. 

@develephant, thanks for the info.
I’ve moved this iOS9 Apple issue to a new thread. Please have a look if you get a moment :
https://forums.coronalabs.com/topic/63216-coronium-setup-and-ios-app-transport-security-policy/

Thanks again for your work and support on Coronium.