Highlighted

AMFPHP not working on iOS 10.3.1 on LIVE server only

Community Beginner ,
Apr 26, 2017

Copy link to clipboard

Copied

Our iPad application is not loading any data on iOS 10.3.1. We had the same problem when 9.3.5 was released and added the NSArbitraryLoads solution in our application descriptor under infoAdditions. I can't find anything about a recent change, is there another adjustment that needs to be made now since iOS 10.3.1 (or a few versions before)

Narrowed it down .. the issue is only there for AMFPHP (RemoteObject) calls , all other http services are working ... anyone got a clue?

It works on our DEV environment but not on LIVE. If I remove

<key>NSAppTransportSecurity</key>

<dict>

<key>NSAllowsArbitraryLoads</key>

<true/>

</dict>

from the application descriptor the DEV environment is not working either (which is expected then) but it seems the NSAllowArbitraryLoads it not affecting AMFPHP on our LIVE server. I have forwarded this issue to our server guys to check the differences in our DEV/LIVE environment but if anyone here can give a clue which might help them please share. Strange issue!

TOPICS
Development

Views

776

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

AMFPHP not working on iOS 10.3.1 on LIVE server only

Community Beginner ,
Apr 26, 2017

Copy link to clipboard

Copied

Our iPad application is not loading any data on iOS 10.3.1. We had the same problem when 9.3.5 was released and added the NSArbitraryLoads solution in our application descriptor under infoAdditions. I can't find anything about a recent change, is there another adjustment that needs to be made now since iOS 10.3.1 (or a few versions before)

Narrowed it down .. the issue is only there for AMFPHP (RemoteObject) calls , all other http services are working ... anyone got a clue?

It works on our DEV environment but not on LIVE. If I remove

<key>NSAppTransportSecurity</key>

<dict>

<key>NSAllowsArbitraryLoads</key>

<true/>

</dict>

from the application descriptor the DEV environment is not working either (which is expected then) but it seems the NSAllowArbitraryLoads it not affecting AMFPHP on our LIVE server. I have forwarded this issue to our server guys to check the differences in our DEV/LIVE environment but if anyone here can give a clue which might help them please share. Strange issue!

TOPICS
Development

Views

777

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 26, 2017 0
Community Beginner ,
Apr 27, 2017

Copy link to clipboard

Copied

It works on 10.2.1 but not on 10.3.1 ..

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 27, 2017 0
Community Beginner ,
Apr 28, 2017

Copy link to clipboard

Copied

Device log shows:

Apr 28 20:02:38 iPad Mercurius(CFNetwork)[500] <Notice>: TIC TCP Conn Start [12:0x1467a280]

Apr 28 20:02:38 iPad Mercurius(CFNetwork)[500] <Notice>: TIC TCP Conn Event [12:0x1467a280]: 1 Err(0)

Apr 28 20:02:38 iPad Mercurius(CFNetwork)[500] <Notice>: TIC TCP Conn Connected [12:0x1467a280]: Err(0)

Apr 28 20:02:38 iPad Mercurius(CFNetwork)[500] <Notice>: TIC Enabling TLS [12:0x1467a280]

Apr 28 20:02:38 iPad Mercurius(CFNetwork)[500] <Notice>: TIC TLS Event [12:0x1467a280]: 2, Pending(0)

Apr 28 20:02:38 iPad Mercurius(CFNetwork)[500] <Notice>: TIC TLS Event [12:0x1467a280]: 20, Pending(0)

Apr 28 20:02:38 iPad Mercurius(CFNetwork)[500] <Notice>: TIC TCP Conn Event [12:0x1467a280]: 8 Err(0)

Apr 28 20:02:38 iPad Mercurius(CFNetwork)[500] <Notice>: TIC TLS Handshake Complete [12:0x1467a280]

Apr 28 20:02:38 iPad Mercurius(CFNetwork)[500] <Notice>: TIC TCP Conn Event [12:0x1467a280]: 2 Err(0)

Apr 28 20:02:38 iPad Mercurius(CFNetwork)[500] <Error>: TIC Read Error [12:0x1467a280]: 1:57

Apr 28 20:02:38 iPad Mercurius(CFNetwork)[500] <Notice>: TIC TCP Conn Cancel [12:0x1467a280]

Apr 28 20:02:38 iPad Mercurius(CFNetwork)[500] <Notice>: TIC TCP Conn Destroyed [12:0x1467a280]

Apr 28 20:02:38 iPad Mercurius(CFNetwork)[500] <Error>: HTTP load failed (error code: -1005 [1:57])

Apr 28 20:02:38 iPad Mercurius(CFNetwork)[500] <Error>: NSURLConnection finished with error - code -1005

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Apr 28, 2017 0
Enthusiast ,
May 02, 2017

Copy link to clipboard

Copied

the thing is with a bit of XML plist settings and some errors message its pretty hard to know what's going on

I would say there must be a difference between your DEV and LIVE server setup

and/or the code probably call an IP address instead of a fully qualified domain name

and/or maybe the plist config is not applied to the app or at the wrong place ?

etc.

under a mac you can use the following to debug

nscurl --ats-diagnostics $URL

verbose will show the different ATS dictionary settings
nscurl --verbose --ats-diagnostics $URL

also a good read in depth of
Information Property List Key Reference
for the keys NSAppTransportSecurity and other ATS Configuration Basics

That said, enabling HTTPS on your web site would not take long and would be free
with something like Let's Encrypt

"NSURLConnection finished with error - code -1005"
indicate that the connection was lost so could also be a connection problem,

a firewall problem, mac going to sleep for a long time, etc.

"as is" it is impossible to know as you don't give any details or context

like AIR SDK version, URL called, how do you test (emulator, hardware, etc.)

and plenty of tiny details ...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 02, 2017 0
Community Beginner ,
May 02, 2017

Copy link to clipboard

Copied

It looks to be a very detailed server issue and my knowledge about that is not good enough. I appreciate your answer but all I can give you is this:

- DEV runs on Apache, LIVE runs on Nginx

- Currently we are looking if NSI can be the problem, our hosting partner thinks this is a possible cause for the connections to drop

- Using keepAlive we are getting responses which tells us the connection drops are the issue, probably due to NSI or some other difference

- Using AIR SDK 20 and testing on the actual device

Before asking this question I was hoping it could be a simple setting or thingy but these past days I've learned we are dealing with a very specific issue that has something do to with our setup. Googling the errors is not showing a lot of results so I think only our server engineers and a lot of trial & error can solve this annoying issue.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 02, 2017 0
Enthusiast ,
May 03, 2017

Copy link to clipboard

Copied

FredericCox  wrote

- DEV runs on Apache, LIVE runs on Nginx


yep that's probably where the issue is

NSI? you must mean SNI as "Server name Indication" right ?

but I don't see how it could be the problem, SNI is supported by both Apache and Nginx

indeed the tricky part would be to setup an Apache and Nginx to behave exactly the same

not that one is better than the other (even if I prefer apache in general)
but they will differ in very specific way (like keepAlive) so it's hard to configure them in some cases

still I would say that nscurl mentioned above can help debug the ATS part

not to criticize or anything but usually between a test and prod server

you would want to have the exact same server setup
eg. if DEV runs Apache then LIVE should run Apache too

a workaround could be to run Apache as the front-end HTTP server on LIVE
and redirect some of the traffic to Nginx with mod_balancer
mod_proxy_balancer - Apache HTTP Server Version 2.5

but yeah all that is more server/back-end config problem than a problem with AIR itself

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 03, 2017 0