You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by "Erik J. Thomas" <er...@linqto.com> on 2017/05/11 18:59:49 UTC

2032 StreamError from URLRequest on older devices

Hey all:

Tried testing my Flex app on iPhone 4S and iPad 2 and URLRequests are failing on both of them, though they work perfectly on iPhone 5, 6, and iPad AIR 2.

The error is a 2032 StreamError. 

App descriptor supports v9:

<key>MinimumOSVersion</key>
    <string>9.0</string>

Both the iPhone 4S and iPad 2 are running v9.3.5 (last supported version for these older devices).
Captured AIR (v23)
Flex SDK v4.15

It seems really strange that this code would only work on iPhone 5 and later devices...

var address:String = _controller.baseUrl + "/auth";
var urlRequest:URLRequest = new URLRequest(address);
urlRequest.method = URLRequestMethod.POST;
                
urlRequest.idleTimeout = 16000;
URLRequestDefaults.idleTimeout = 16000;
                
var header:URLRequestHeader = new URLRequestHeader("email", username.text);
urlRequest.requestHeaders.push(header);
header = new URLRequestHeader("password", password.text);
urlRequest.requestHeaders.push(header);
header = new URLRequestHeader("eventId", _controller.brandedProperties.eventId);
urlRequest.requestHeaders.push(header)

var urlLoader:URLLoader = new URLLoader();
urlLoader.addEventListener(Event.COMPLETE, loginSucceeded);
urlLoader.addEventListener(IOErrorEvent.IO_ERROR, loginFailed);
urlLoader.load(urlRequest);

Thought it could be timeout issue on slow devices so I set the idleTimeout values to be sure. Makes no difference.

Searched the web, found some references to 2032, but not this issue.

Any ideas greatly appreciated.

Erik


Re: 2032 StreamError from URLRequest on older devices

Posted by Nemi <ne...@gmail.com>.
Try listen to all  events
<http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/URLLoader.html#eventSummary> 
, maybe more info will appear do debug the problem.



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/2032-StreamError-from-URLRequest-on-older-devices-tp15222p15229.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: 2032 StreamError from URLRequest on older devices

Posted by "Erik J. Thomas" <er...@linqto.com>.
Thanks, Cliff. Was worth a try but no change. iPhone 5 and 6 works, iPhone 4 fails. We're going to just drop older devices from our supported versions.

Erik

> On May 11, 2017, at 12:59 PM, Clint M <cm...@gmail.com> wrote:
> 
> Add this to your descriptor file to talk to http…
> 
> <InfoAdditions>
>    <![CDATA[
>    <key>NSAppTransportSecurity</key>
>    <dict>
>        <key>NSExceptionDomains</key>
>        <dict>
>            <key>yourapiurl.com</key>
>            <dict>
>                <key>NSIncludesSubdomains</key>
>                <true/>
>                <key>NSExceptionAllowsInsecureHTTPLoads</key>
>                <true/>
>            </dict>
>        </dict>
>    </dict>
>    ]]>
> </InfoAdditions>
> 
> 
> On Thu, May 11, 2017 at 11:59 AM, Erik J. Thomas <er...@linqto.com> wrote:
> 
>> Hey all:
>> 
>> Tried testing my Flex app on iPhone 4S and iPad 2 and URLRequests are
>> failing on both of them, though they work perfectly on iPhone 5, 6, and
>> iPad AIR 2.
>> 
>> The error is a 2032 StreamError.
>> 
>> App descriptor supports v9:
>> 
>> <key>MinimumOSVersion</key>
>>    <string>9.0</string>
>> 
>> Both the iPhone 4S and iPad 2 are running v9.3.5 (last supported version
>> for these older devices).
>> Captured AIR (v23)
>> Flex SDK v4.15
>> 
>> It seems really strange that this code would only work on iPhone 5 and
>> later devices...
>> 
>> var address:String = _controller.baseUrl + "/auth";
>> var urlRequest:URLRequest = new URLRequest(address);
>> urlRequest.method = URLRequestMethod.POST;
>> 
>> urlRequest.idleTimeout = 16000;
>> URLRequestDefaults.idleTimeout = 16000;
>> 
>> var header:URLRequestHeader = new URLRequestHeader("email", username.text);
>> urlRequest.requestHeaders.push(header);
>> header = new URLRequestHeader("password", password.text);
>> urlRequest.requestHeaders.push(header);
>> header = new URLRequestHeader("eventId", _controller.brandedProperties.
>> eventId);
>> urlRequest.requestHeaders.push(header)
>> 
>> var urlLoader:URLLoader = new URLLoader();
>> urlLoader.addEventListener(Event.COMPLETE, loginSucceeded);
>> urlLoader.addEventListener(IOErrorEvent.IO_ERROR, loginFailed);
>> urlLoader.load(urlRequest);
>> 
>> Thought it could be timeout issue on slow devices so I set the idleTimeout
>> values to be sure. Makes no difference.
>> 
>> Searched the web, found some references to 2032, but not this issue.
>> 
>> Any ideas greatly appreciated.
>> 
>> Erik
>> 
>> 


Re: 2032 StreamError from URLRequest on older devices

Posted by Clint M <cm...@gmail.com>.
Add this to your descriptor file to talk to http…

<InfoAdditions>
    <![CDATA[
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSExceptionDomains</key>
        <dict>
            <key>yourapiurl.com</key>
            <dict>
                <key>NSIncludesSubdomains</key>
                <true/>
                <key>NSExceptionAllowsInsecureHTTPLoads</key>
                <true/>
            </dict>
        </dict>
    </dict>
    ]]>
</InfoAdditions>


On Thu, May 11, 2017 at 11:59 AM, Erik J. Thomas <er...@linqto.com> wrote:

> Hey all:
>
> Tried testing my Flex app on iPhone 4S and iPad 2 and URLRequests are
> failing on both of them, though they work perfectly on iPhone 5, 6, and
> iPad AIR 2.
>
> The error is a 2032 StreamError.
>
> App descriptor supports v9:
>
> <key>MinimumOSVersion</key>
>     <string>9.0</string>
>
> Both the iPhone 4S and iPad 2 are running v9.3.5 (last supported version
> for these older devices).
> Captured AIR (v23)
> Flex SDK v4.15
>
> It seems really strange that this code would only work on iPhone 5 and
> later devices...
>
> var address:String = _controller.baseUrl + "/auth";
> var urlRequest:URLRequest = new URLRequest(address);
> urlRequest.method = URLRequestMethod.POST;
>
> urlRequest.idleTimeout = 16000;
> URLRequestDefaults.idleTimeout = 16000;
>
> var header:URLRequestHeader = new URLRequestHeader("email", username.text);
> urlRequest.requestHeaders.push(header);
> header = new URLRequestHeader("password", password.text);
> urlRequest.requestHeaders.push(header);
> header = new URLRequestHeader("eventId", _controller.brandedProperties.
> eventId);
> urlRequest.requestHeaders.push(header)
>
> var urlLoader:URLLoader = new URLLoader();
> urlLoader.addEventListener(Event.COMPLETE, loginSucceeded);
> urlLoader.addEventListener(IOErrorEvent.IO_ERROR, loginFailed);
> urlLoader.load(urlRequest);
>
> Thought it could be timeout issue on slow devices so I set the idleTimeout
> values to be sure. Makes no difference.
>
> Searched the web, found some references to 2032, but not this issue.
>
> Any ideas greatly appreciated.
>
> Erik
>
>