• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

URLLoader bug with AIR SDK

Explorer ,
Mar 08, 2013 Mar 08, 2013

Copy link to clipboard

Copied

Environment:

Flash Builder 4.7

AIR SDK 3.4

Mobile ActionScript project

Problem severity:

Use URLLoader class to get data from server; use URLVariables to send data containing a single field (Note, this issue happens only when you're sending only one field), as:

var urlVariables : URLVariables = new URLVariables();

urlVariables.contactid = "mycontactid";

var request : URLRequest = new URLRequest();

request.data = urlVariables;

request.url = "https://myserver.com/flex/GetContactDocument?OpenAgent";

var loader : Loader = new URLLoader();

loader.addEventListener( Event.COMPLETE, onSuccess );

loader.addEventListener( IOErrorEvent.IO_ERROR, onIOError );

loader.load( request );

Everytime it turns into IOErrorEvent returning stream error with the used URL path. I eventually noticed it didn't add any "&" after the URL! So what was supposed to be is this:

https://myserver.com/flex/GetContactDocument?OpenAgent&contactid=mycontactid

But instead URLLoader seeing this as:

https://myserver.com/flex/GetContactDocument?OpenAgentcontactid=mycontactid

Note, there's no & sign after OpenAgent word!

This doesn't happens when there are more then 1 fields in URLVariables class! This is strange, and looks like a bug to me!

Any suggestion would be appreciated. Thanks!

TOPICS
Performance issues

Views

1.7K

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
community guidelines
Explorer ,
Mar 09, 2013 Mar 09, 2013

Copy link to clipboard

Copied

(Update) The problem found persistent in AIR SDK 3.6 as well.

Votes

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
community guidelines
Adobe Employee ,
Mar 10, 2013 Mar 10, 2013

Copy link to clipboard

Copied

Thanks for reporting, this is for iOS or Android?

-Pahup

Votes

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
community guidelines
Explorer ,
Mar 10, 2013 Mar 10, 2013

Copy link to clipboard

Copied

Hello,

Though my project is targeted for all 3 platforms (iOS, Android & BB) but at this point I'm mainly concentrating on iOS release - so it was with iOS AIR simulator. I'm just curious, is that really supposed to be important (platform) because the class should work indifferently whichever the platform is

Thank you.

Votes

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
community guidelines
Adobe Employee ,
Mar 12, 2013 Mar 12, 2013

Copy link to clipboard

Copied

Hello,

1 . If you used more then 1 field in URLVariable, then is this ever worked for you with any of the AIR SDK version.Could you please share the use of OpenAgent here in the url.

2.  One should not used “?” without assigning any value in the url for the specified field which is incorrect ("https://myserver.com/flex/GetContactDocument?OpenAgent") , please try to implement like (“https://myserver.com/flex/GetContactDocument?OpenAgent=”+value+””) as url schema needs “?” before the first parameter and “&” before the following ones. OR  Try to use (https://myserver.com/flex/GetContactDocument”) and then pass the url variable through which “?” and “&” is append by the request automatically.

Please update if this will work for you.

-Nimit

Votes

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
community guidelines
Explorer ,
Mar 12, 2013 Mar 12, 2013

Copy link to clipboard

Copied

Hello Nimit,

1. Yes, I've noticed if I use more than 1 field in URLVariable then it doesn't give any problem (Why? If your statement 2. is correct?) OpenAgent is the part of our agent and that is fixed.

2. I can not agree with the usage rule as you described. If that is so then Lotus wouldn't produce such agent URL. And moreover, if you would use HTTPService, believe me it works pretty with the following usage:

myHTTPService.send ({singleField:"Hello!"});

The truth is we can't cut down the agent as per my need, the whole is a part of the URL path. If HTTPService can make this right, why URLLoader can't? If URLLoader can do it right when there are more than 1 URLVariables, then why not for one?

Votes

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
community guidelines
Adobe Employee ,
Mar 12, 2013 Mar 12, 2013

Copy link to clipboard

Copied

Thanks for the promt reply and confirming the behaviour with more than 1 field. Please go ahead and log a defect at https://bugbase.adobe.com/

-Nimit

Votes

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
community guidelines
Explorer ,
Mar 12, 2013 Mar 12, 2013

Copy link to clipboard

Copied

Votes

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
community guidelines
New Here ,
Jul 11, 2013 Jul 11, 2013

Copy link to clipboard

Copied

LATEST

I had the same problem.

But I did request to the php-script: 

  var req:URLRequest = new URLRequest( Constants.ServerURL + "action.php" );

I set the permissions to the action.php to 666.

Run Test Movie

Problem was solved.

Then I set back the permissions to the 644 and the problem does not appear.

AIR for iOS

AIR 3.8 beta SDK

Tested in CS5.5 and iPad2

Votes

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
community guidelines