Android 2.2 HTTP Errors

We are getting various HTTP errors on the Only Android 2.2 device we have to test (Moto Droid). The first is an SSL error. If we turn off SSL, there are other errors that pop up such as:

06-13 14:38:26.044: W/System.err(2155): com.naef.jnlua.LuaRuntimeException: Session establishment didn’t return a [wfn-session] cookie.

We do not have this problem on any of our other 10 android test devices.  I am thinking it is related directly to either Android 2.2 or the Droid itself. I would like to be able to just  set the minimum SDK version to 2.3 since there are very few 2.2 devices out there anymore.  But the Corona SDK build interface does not let you change this parameter from 2.2 … Is there an easy way to accomplish this?  2.2 is so old now I can imagine that Corona developers might want to not include it just because some games would not run well on such old hardware.  

Any ideas either about the errors, or setting the minimum version to 2.3? 

Thanks,

Mike

Corona, Can you please respond to this?

HTTP works on Android 2.2 (as does HTTPS). See the AsynchHTTP sample code which fetches Google’s home page over HTTPS.

If you have a case in which it doesn’t, we’d love to see a sample app that reproduces the problem so we can fix it.

Currently it isn’t possible to set the minimum supported version of Android but we will look at supporting that in the future.

Perry, Thanks we only have one 2.2 phone to test on, so we are mystified. It works on every other android device we have had tested (about 20 different devices) . Do you guys have a 2.2 device you can try the app on? You can download the open BETA at https://play.google.com/store/apps/details?id=com.mycroft.wfn  It would be nice to narrow it down, if it seems specific to the Droid then I can just take the Droid off of the supported device list…

If you do download it, it will fail when you are trying to create an account.

Thanks,

Mike

BTW, if anyone else feels like trying it on a 2.2 device and letter me know it would be greatly appreciated :slight_smile:

Mike

I tried this on a htc EVO 4G running Android 2.2 and saw the SSL error you alluded to using adb logcat:

E/NativeCrypto(10122): Unknown error 5 during connect I/System.out(10122): ERROR: SSL handshake failure: I/O error during system call, Unknown error: 0 I/Corona (10122): Server errored for [https://api.wordsfornerds.com/news/recent?for=android], retrying.

I then took the failing URL and entered it into the device’s web browser and got an error which says:

Data connectivity problem A secure connection could not be established

I then went to https://encrypted.google.com and it loaded successfully (as it also does in Corona’s AsynchHTTP sample).

From the above I surmise that there’s something odd about your HTTPS implementation.  Searching Google for the SSL error message produces lots of possibilities.

Loading your link as HTTP (not HTTPS) works fine in the Corona AsynchHTTP sample:

I/Corona (10549): RESPONSE: [{"id":"aglzfndmbi1hcGlyEAsSCE5ld3NJdGVtGOfiKAw","authorId":"aglzfndmbi1hcGlyGgsSBVVzZXJzIgVVc2VycwwLEgRVc2VyGAEM","forAndroid":true,"forIos":true,"forWeb":false,"link":"https://www.wordsfornerds.com/rules","timestamp":1371768673818,"text":"Check out the game rules at wordsfornerds.com/rules."},{"id":"aglzfndmbi1hcGlyEAsSCE5ld3NJdGVtGNzBJgw","authorId":"aglzfndmbi1hcGlyGgsSBVVzZXJzIgVVc2VycwwLEgRVc2VyGAEM","forAndroid":true,"forIos":true,"forWeb":false,"link":"","timestamp":1371507114249,"text":"Need help finding a lexicon word? Use the coin icon at the top of the screen to search for words (among other fun things)!"},{"id":"aglzfndmbi1hcGlyEAsSCE5ld3NJdGVtGI61JQw","authorId":"aglzfndmbi1hcGlyGgsSBVVzZXJzIgVVc2VycwwLEgRVc2VyGAEM","forAndroid":true,"forIos":true,"forWeb":false,"link":"","timestamp":1371335693349,"text":"Don\u0027t like constant notifications? Turn them off in the options menu!"},{"id":"aglzfndmbi1hcGlyFQsSCE5ld3NJdGVtGICAgICA0NcLDA","authorId":"aglzfndmbi1hcGlyGgsSBVVzZXJzIgVVc2VycwwLEgRVc2VyGAEM","forAndroid":true,"forIos":true,"forWeb":false,"link":"http://www.wordsfornerds.com","timestamp":1371238365183,"text":"Visit wordsfornerds.com to check out your statistics and rating!"}]

As referenced in the original post, if we turn off HTTPS and go to HTTP we still get errors _(_06-13 14:38:26.044: W/System.err(2155): com.naef.jnlua.LuaRuntimeException: Session establishment didn’t return a [wfn-session] cookie) so it is not HTTPS specific… I’m not sure how else we could implement HTTP on the server.  The simplest answer would seem to be just to allow us to set the minimum android version… This does not seem like it would take long to implement. Is there a chance that this can be put in soon?

Thanks,

Mike

As I mentioned in my post, both HTTPS and HTTP work fine in apps other than yours.  The HTTP error message you refer to comes from your own APK.  If you can supply a minimum reproducible case that demonstrates the problem we can see where the differences are and suggest a workaround or implement a fix. 

Adding support for setting the minimum Android version isn’t requested very often but I’ve noted it and we’ll likely add it in the future.  I can’t commit to any particular availability.

Corona, Can you please respond to this?

HTTP works on Android 2.2 (as does HTTPS). See the AsynchHTTP sample code which fetches Google’s home page over HTTPS.

If you have a case in which it doesn’t, we’d love to see a sample app that reproduces the problem so we can fix it.

Currently it isn’t possible to set the minimum supported version of Android but we will look at supporting that in the future.

Perry, Thanks we only have one 2.2 phone to test on, so we are mystified. It works on every other android device we have had tested (about 20 different devices) . Do you guys have a 2.2 device you can try the app on? You can download the open BETA at https://play.google.com/store/apps/details?id=com.mycroft.wfn  It would be nice to narrow it down, if it seems specific to the Droid then I can just take the Droid off of the supported device list…

If you do download it, it will fail when you are trying to create an account.

Thanks,

Mike

BTW, if anyone else feels like trying it on a 2.2 device and letter me know it would be greatly appreciated :slight_smile:

Mike

I tried this on a htc EVO 4G running Android 2.2 and saw the SSL error you alluded to using adb logcat:

E/NativeCrypto(10122): Unknown error 5 during connect I/System.out(10122): ERROR: SSL handshake failure: I/O error during system call, Unknown error: 0 I/Corona (10122): Server errored for [https://api.wordsfornerds.com/news/recent?for=android], retrying.

I then took the failing URL and entered it into the device’s web browser and got an error which says:

Data connectivity problem A secure connection could not be established

I then went to https://encrypted.google.com and it loaded successfully (as it also does in Corona’s AsynchHTTP sample).

From the above I surmise that there’s something odd about your HTTPS implementation.  Searching Google for the SSL error message produces lots of possibilities.

Loading your link as HTTP (not HTTPS) works fine in the Corona AsynchHTTP sample:

I/Corona (10549): RESPONSE: [{"id":"aglzfndmbi1hcGlyEAsSCE5ld3NJdGVtGOfiKAw","authorId":"aglzfndmbi1hcGlyGgsSBVVzZXJzIgVVc2VycwwLEgRVc2VyGAEM","forAndroid":true,"forIos":true,"forWeb":false,"link":"https://www.wordsfornerds.com/rules","timestamp":1371768673818,"text":"Check out the game rules at wordsfornerds.com/rules."},{"id":"aglzfndmbi1hcGlyEAsSCE5ld3NJdGVtGNzBJgw","authorId":"aglzfndmbi1hcGlyGgsSBVVzZXJzIgVVc2VycwwLEgRVc2VyGAEM","forAndroid":true,"forIos":true,"forWeb":false,"link":"","timestamp":1371507114249,"text":"Need help finding a lexicon word? Use the coin icon at the top of the screen to search for words (among other fun things)!"},{"id":"aglzfndmbi1hcGlyEAsSCE5ld3NJdGVtGI61JQw","authorId":"aglzfndmbi1hcGlyGgsSBVVzZXJzIgVVc2VycwwLEgRVc2VyGAEM","forAndroid":true,"forIos":true,"forWeb":false,"link":"","timestamp":1371335693349,"text":"Don\u0027t like constant notifications? Turn them off in the options menu!"},{"id":"aglzfndmbi1hcGlyFQsSCE5ld3NJdGVtGICAgICA0NcLDA","authorId":"aglzfndmbi1hcGlyGgsSBVVzZXJzIgVVc2VycwwLEgRVc2VyGAEM","forAndroid":true,"forIos":true,"forWeb":false,"link":"http://www.wordsfornerds.com","timestamp":1371238365183,"text":"Visit wordsfornerds.com to check out your statistics and rating!"}]

As referenced in the original post, if we turn off HTTPS and go to HTTP we still get errors _(_06-13 14:38:26.044: W/System.err(2155): com.naef.jnlua.LuaRuntimeException: Session establishment didn’t return a [wfn-session] cookie) so it is not HTTPS specific… I’m not sure how else we could implement HTTP on the server.  The simplest answer would seem to be just to allow us to set the minimum android version… This does not seem like it would take long to implement. Is there a chance that this can be put in soon?

Thanks,

Mike

As I mentioned in my post, both HTTPS and HTTP work fine in apps other than yours.  The HTTP error message you refer to comes from your own APK.  If you can supply a minimum reproducible case that demonstrates the problem we can see where the differences are and suggest a workaround or implement a fix. 

Adding support for setting the minimum Android version isn’t requested very often but I’ve noted it and we’ll likely add it in the future.  I can’t commit to any particular availability.