Adobe AIR mobile app fails when using HTTPS on Nexus tablet, but works on Kindle

旧巷老猫 提交于 2019-12-23 09:53:32

问题


Ok, 4 hours burned, so I'm turning to SO in hope for help.

Here are the facts so you can understand quick:

  • We have an existing AIR Mobile app that runs fine on my laptop, and every Android device we've tested while in HTTP mode (Kindle, Nexus, Asus A100)

  • As soon as we switched to HTTPS, only the laptop and Kindle devices will connect to the server

  • On the other devices, I'm getting a FaultEvent returned, and the error says: "Send Failed. Channel.Connect.Failed error NetConnection.Call.Failed https://www.example.com/flex2gateway/cfamfsecure/"

  • I can hit the URL above on the Nexus/A100 in a browser and it returns a blank page just as expected

  • Flex-based apps using this same connection have been fine for years without problem - this is the first AIR app to use that HTTPS connection however

  • I'm using the Captive Runtime feature

  • ColdFusion 9 backend

  • I can't debug the web traffic because it only happens on the tablet, and I currently don't know how to capture traffic on a tablet, like I can on my laptop with Fidder (researching now)

I will provide any other info you need, and as quickly as possible - just let me know.

Other than the above, I've also looked at a few other things like: Ensure that the crossdomain.xml file exists and is setup properly, change the setting in CF's services-config.xml file, etc.

My current thought is that maybe it has something to do with chaining in the SSL Cert - like maybe the Root CA isn't trusted on the Nexus or something? (Which is GlobalSign Root CA) Or it has something to do with the default browser like in the Flex days and IE/proxies?

Never seen this before, so I'll take whatever help I can get.

[UPDATED]: I have created a small sample you can use to replicate this issue: https://www.dropbox.com/s/5nmilo3tbwr2k8d/HTTPTestSource.zip

It will contain everything you need: source, compiled .AIR (for desktop), compiled .APK (for android device). The Desktop works fine in HTTP and HTTPS, whereas the mobile APK only works for HTTP. I've also included a sample CFC to put on your own server if you want.

Thanks for reading this far!


回答1:


[RESOLVED]

Well, I got it working for my situation - hope this helps for others.

The problem is the AIR Captive Runtime. It doesn't seem to work when using HTTPS. I had to switch to it because my first development hardware was a Kindle Fire, and the AIR Runtime is pre-installed on the Kindle Fire, but I needed the most recent version of AIR. So, I just turned on the Captive Runtime and went on my merry way.

When we went live, we changed the endpoint to our HTTPS server and the Kindles continued to work, where all other tablets failed.

To fix this, I turned OFF Captive Runtime and recompiled, and now after un/reinstalling it works on all my tablets, except the Kindle Fire, which I'll just have to provide a different install for.

Hopefully this helps others out there having the same problem.




回答2:


PRB,

I will preface this by saying that I am in no way shape or form a flex developer. I came across this information as I was recently researching a crossdomain.xml issue we were having here at work. I found a page on the adobe site that states there is an issue when calling a web service behind an HTTPS connection when the calling flex app is not behind an HTTPS connection as well.

You have to add a secure="false" attribute to the allow-access-from tag.

<cross-domain-policy>
    <allow-access-from domain="*.mydomain.com" secure="false"/>
</cross-domain-policy>

I got this from http://livedocs.adobe.com/flex/3/html/help.html?content=security2_15.html.

There are some additional details in the comments section that might help also. You can call the WSDL over HTTPS but if the location fields in the WSDL have HTTP:// and not HTTPS:// then all of your remaining calls will be over HTTP and not HTTPS.

--

On a side note, it appears that the flash player and flex use the browser's http mechanism for transport, while AIR implements it directly, which could explain why your flex app is failing and the Air app is working. This might also be the issue as to why it works in debug (using the development environment http transport) and release (switching to the host browser http transport).

Tim Sapp




回答3:


Thanks for the update to your question. It certainly helped me track down a solution to the problem. I installed AIR 3.7 along with the Flex 4.10 build from Apache Flex and was able to successfully connect to an https connection (using the Captive runtime after exporting a release build in Flash builder). So anyone running into this issue, should just use one of the newer AIR SDKs and it should solve it.



来源:https://stackoverflow.com/questions/14970148/adobe-air-mobile-app-fails-when-using-https-on-nexus-tablet-but-works-on-kindle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!