Highlighted

Why is URLLoader in Adobe Air (iOS App) no more working?

Contributor ,
Nov 09, 2018

Copy link to clipboard

Copied

Hi,

I've been working on a project a few months ago. Back then I was able to load data via URLLoader to my Game (I made it for iOS, Android and Flash(Web)). Now I wanted to update my Game but it's no longer working. I'm always getting an IOError

ioErrorHandler noweb[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://www.questioneverything.de/frei3/" errorID=2032]

Why is that? What changed?

Can anybody help please?

Best regards

Jan

  public var link:String = "http://www.questioneverything.de/frei3/";

  public var hs:String = "frei3_hs.php";

  var re:URLRequest;

  var vars:URLVariables;

  var loader:URLLoader;

  var resultVars:URLVariables;

  re = new URLRequest(link + hs);

  loader = new URLLoader  ;

  loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);

  loader.addEventListener(Event.OPEN,oeffnen);

  loader.addEventListener(Event.COMPLETE,fertig);

  loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);

  vars = new URLVariables ();

  vars.g_zahl = g_zahl;

  resultVars = new URLVariables ();

  re.data = vars;

  re.method = URLRequestMethod.POST;

  loader.load(re);

TOPICS
Development

Views

573

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

Why is URLLoader in Adobe Air (iOS App) no more working?

Contributor ,
Nov 09, 2018

Copy link to clipboard

Copied

Hi,

I've been working on a project a few months ago. Back then I was able to load data via URLLoader to my Game (I made it for iOS, Android and Flash(Web)). Now I wanted to update my Game but it's no longer working. I'm always getting an IOError

ioErrorHandler noweb[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://www.questioneverything.de/frei3/" errorID=2032]

Why is that? What changed?

Can anybody help please?

Best regards

Jan

  public var link:String = "http://www.questioneverything.de/frei3/";

  public var hs:String = "frei3_hs.php";

  var re:URLRequest;

  var vars:URLVariables;

  var loader:URLLoader;

  var resultVars:URLVariables;

  re = new URLRequest(link + hs);

  loader = new URLLoader  ;

  loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);

  loader.addEventListener(Event.OPEN,oeffnen);

  loader.addEventListener(Event.COMPLETE,fertig);

  loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);

  vars = new URLVariables ();

  vars.g_zahl = g_zahl;

  resultVars = new URLVariables ();

  re.data = vars;

  re.method = URLRequestMethod.POST;

  loader.load(re);

TOPICS
Development

Views

574

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
Nov 09, 2018 0
Advocate ,
Nov 09, 2018

Copy link to clipboard

Copied

You can't use http protocol anymore, Ios only allows https. There are workarounds (permissions) but they won't work forever.

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...
Nov 09, 2018 0
Enthusiast ,
Nov 09, 2018

Copy link to clipboard

Copied

search the forum for the similar question
for ex: URLLoader error #2032 with AIR 20 (AIR 19 works)

in short iOS allow only to load HTTPS URL and you try to load over HTTP
either support HTTPS on your server or add in your manifest the NSAppTransportSecurity key

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...
Nov 09, 2018 0
Contributor ,
Nov 11, 2018

Copy link to clipboard

Copied

Thanks a lot for the reply! ASWC & @zwetan_uk

I've seen the Post above, but it didn't solve the Problem. Not for the iOS Version and not for the Flash version.

You can check the Flashversion of the game here: Quest for Truth

In the upper left corner is a small  Icon that opens the Highscore List... ... which is no longer loaded / working. It just shows the mask for the Hisghore List as it is not able to access the .php file..

... so the only way to make this work again (for iOS, Flash etc) is to change my Website/Server to HTTPS, correct?

And then it should be working fine again (same AS§ Script etc) and also in iOS, Android, Flash and in the Future, right!?

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...
Nov 11, 2018 0
Enthusiast ,
Nov 11, 2018

Copy link to clipboard

Copied

well... if I try opening this page

http://www.questioneverything.de/frei3/frei3_hs.php

I obtain a 500 error with chrome

here the details when I try with cURL

$ curl -v http://www.questioneverything.de/frei3/frei3_hs.php

*   Trying 2a01:488:42:1000:50ed:840f:7f:709b...

* TCP_NODELAY set

* Connected to www.questioneverything.de (2a01:488:42:1000:50ed:840f:7f:709b) port 80 (#0)

> GET /frei3/frei3_hs.php HTTP/1.1

> Host: www.questioneverything.de

> User-Agent: curl/7.60.0

> Accept: */*

>

< HTTP/1.1 500 Internal Server Error

< Date: Mon, 12 Nov 2018 00:36:36 GMT

< Content-Type: text/html

< Content-Length: 0

< Connection: keep-alive

< Server: Apache

<

* Connection #0 to host www.questioneverything.de left intact

with that I would say something is wrong on the server-side


your code

loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler);

should catch that 500 with AIR (not with Flash)

I would start to fix that first but the HTTPS is also a thing under iOS so everything said above is still valid

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...
Nov 11, 2018 1
Advocate ,
Nov 12, 2018

Copy link to clipboard

Copied

No the HTTPS rule is only for Ios (IPhone, IPad) and you can bypass it, it has nothing to do directly with URLLoader. Now in other situation URLLoader does work (I can confirm still does work) for HTTP or HTTPS. If it doesn't in a "non Ios" situation then there's another problem going on.

To start putting you on the right track we can all confirm this:

- URLLoader does work (still) for HTTP and HTTPS unless restricted by OS (like in the case of Ios device).

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...
Nov 12, 2018 0
Explorer ,
Nov 12, 2018

Copy link to clipboard

Copied

The temporary fix is below. Apple has not stated when they will disallow bypassing of HTTPS, which is what this code does.

This should be added within the ,iPhone. tags as shown in manifest document your-app.xml in your project root directory.

    <iPhone>

        <assetsCar>Assets.car</assetsCar>

        <requestedDisplayResolution>high</requestedDisplayResolution>

        <InfoAdditions><![CDATA[

     <key>CFBundleIconName</key>

            <string>AppIcon</string>

        <key>UIDeviceFamily</key>

    <array><string>1</string></array>

    <key>NSAppTransportSecurity</key>

  <dict>

  <key>NSAllowsArbitraryLoads</key><true/>

  </dict>

]]></InfoAdditions>

    </iPhone>

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...
Nov 12, 2018 0
Adobe Community Professional ,
Nov 13, 2018

Copy link to clipboard

Copied

I'm working on an update to an app that plays videos that are online, at http addresses. I tried the NSAllowsArbitraryLoads line, but may not have included the NSAppTransportSecurity part. It didn't fix the videos (probably would have done with the NSAppTransportSecurity part included). Fortunately the client has a certificate on that site now, so I just switched my code to use https instead.

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...
Nov 13, 2018 0