Highlighted

new URLLoader() broken in AIR 21 + [HELP]

Engaged ,
Apr 14, 2016

Copy link to clipboard

Copied

Any idea why line 6 is crashing in AIR 21 but works fine in AIR 20 and below ?

    sendHeader = new URLRequestHeader("Content-type","application/octet-stream");

    sendReq = new URLRequest(phpPath);

    sendReq.requestHeaders.push(sendHeader);

    sendReq.method = URLRequestMethod.POST;

  

    sendLoader = new URLLoader();

    sendLoader.addEventListener(Event.COMPLETE,imageSentHandler);

  sendLoader.addEventListener(ErrorEvent.ERROR, onError);

Have you added

<key>NSAppTransportSecurity</key>

<dict>

  <key>NSAllowsArbitraryLoads</key>

  <true/>

</dict>

to InfoAdditions?

TOPICS
Development

Views

572

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

new URLLoader() broken in AIR 21 + [HELP]

Engaged ,
Apr 14, 2016

Copy link to clipboard

Copied

Any idea why line 6 is crashing in AIR 21 but works fine in AIR 20 and below ?

    sendHeader = new URLRequestHeader("Content-type","application/octet-stream");

    sendReq = new URLRequest(phpPath);

    sendReq.requestHeaders.push(sendHeader);

    sendReq.method = URLRequestMethod.POST;

  

    sendLoader = new URLLoader();

    sendLoader.addEventListener(Event.COMPLETE,imageSentHandler);

  sendLoader.addEventListener(ErrorEvent.ERROR, onError);

Have you added

<key>NSAppTransportSecurity</key>

<dict>

  <key>NSAllowsArbitraryLoads</key>

  <true/>

</dict>

to InfoAdditions?

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
Apr 14, 2016 0
Engaged ,
Apr 14, 2016

Copy link to clipboard

Copied

Have you added

<key>NSAppTransportSecurity</key>

<dict>

  <key>NSAllowsArbitraryLoads</key>

  <true/>

</dict>

to InfoAdditions?

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 14, 2016 0
Engaged ,
Apr 14, 2016

Copy link to clipboard

Copied

Bingo!  Thanks!

When was this introduced? It worked fine for me in AIR 20

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 14, 2016 0
Engaged ,
Apr 14, 2016

Copy link to clipboard

Copied

This fixes it for AIR 21 but now crashes my app completely in the latest AIR 22

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 14, 2016 0
Engaged ,
Apr 14, 2016

Copy link to clipboard

Copied

La last version that works fine for me is 19.
Past that to much issues...

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 14, 2016 0
Engaged ,
Apr 14, 2016

Copy link to clipboard

Copied

Does it work for you in AIR 22 Beta ?

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 14, 2016 0
Engaged ,
Apr 14, 2016

Copy link to clipboard

Copied

Not perfectly. I stick with 19.

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 14, 2016 0
Engaged ,
Apr 14, 2016

Copy link to clipboard

Copied

But we can't use AIR 19 anymore for Android builds. They will soon cut this off. Have to use 21 or higher

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 14, 2016 0
Engaged ,
Apr 14, 2016

Copy link to clipboard

Copied

For android it should be fine. It was more with ios that I had issues.

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 14, 2016 0
Adobe Employee ,
Apr 19, 2016

Copy link to clipboard

Copied

Hi,

Thanks for the report.

We tried the issue at our end with the latest AIR 22 Beta and were not able to reproduce on both iOS and Android.

Please find the attached project link:

Dropbox - URLRequestHeaderExample.zip

Could you please try the same at your end as well with the latest AIR 22 Beta and let us know in case you still face any issue.

Regards,

Adobe AIR Team

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 19, 2016 0
Engaged ,
Apr 20, 2016

Copy link to clipboard

Copied

Crashes for me in 22 Beta

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 20, 2016 0
Shweta_B LATEST
Adobe Employee ,
Apr 20, 2016

Copy link to clipboard

Copied

Hi,

Is this issue reproducible on iOS and android both?

Could you please share a sample project with us. This would help us in reproducing the issue at our end as well.

Thanks,

Adobe AIR Team

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 20, 2016 0