Weird URLLoader behavior on iOS

Hi,

I’m working on a mulit-platform app, all platforms are working perfectly except iOS (again haha, I’m really having a hard time doing anything on iOS, but it’s a different story)

The problem is that any subsequent URLLoader.load() call on the same server produces absolutely no result, errors, anything at all. The first call succeeds, but anything beyond that just radio silence. Not a single error, progress, any event at all.

Some code parts

private function new() {
		
		super();
		
		__loader = new URLLoader();
		__loader.addEventListener( Event.COMPLETE, __loaderComplete );
		__loader.addEventListener( Event.OPEN, __loaderOpen );
		__loader.addEventListener( ProgressEvent.PROGRESS, __loaderProgress );
		__loader.addEventListener( IOErrorEvent.IO_ERROR, __loaderError );
		__loader.addEventListener( HTTPStatusEvent.HTTP_STATUS, __loaderStatus );
		__loader.addEventListener( SecurityErrorEvent.SECURITY_ERROR, __loaderSecurityError );
		
		__request = new URLRequest();
		
	}

This works:

public function loadLanguageList():Void {
		
		var vars = new URLVariables();
		vars.VendorID = vendorId;
		vars.VersionNo = version;
		vars.r = Math.random();
		trace( "###", vars );
		__action = Remote.LANGUAGES;
		__request.url = Remote.LANGUAGES;
		__request.data = vars;
		trace( "$$$", __request.url, __request.data );
		__loader.load( __request );
		
	}

This doesn’t ( a subsequent call after I successfully loaded the list of available languages in the previous function)

public function loadMessages( language:String ):Void {
		
		var vars = new URLVariables();
		vars.VendorID = vendorId;
		vars.VersionNo = version;
		vars.LanguageCode = language;
		vars.r = Math.random();
		trace( "###", vars );
		__action = Remote.MESSAGES;
		__request.url = Remote.MESSAGES;
		__request.data = vars;
		trace( "$$$", __request.url, __request.data );
		__loader.load( __request );
		
	}

The console displays the last trace line with proper values, and nothing happens beyond that point. No crash, no error, no event, nothing. (Yes, I checked the the request URL in a browser and the response is fine).

Notes

  • The app first calls loadLanguageList() and after a COMPLETE event it calls loadMessages()
  • I tried reinitialising __loader and __request variables as well within the functions instead of reusing them, result is the same
  • Address is HTTPS so it’s not a security issue on iOS
  • If I ignore loadLanguageList() (which is the first function call in the queue) and call directly loadMessages(), then it works, so it’s not a faulty parameter or variable.
  • Device: iPad pro, latest iOS

Anyone ever experienced anything like this before? I’m not saying it’s a bug, but can be something specific on iOS, because Windows, mac, html5, android are all working perfectly.

Thank you

You are using latest lime 7.0.0. I have the same bug in my app on iOS. This happens because there was a refactoring from curl to curl multi from lime 6.4.0 to 7.0.0. I mentioned it in discord chat but @singmajesty needed a way to reproduce it in a simple project. There is also a related issue on github https://github.com/openfl/lime/issues/1225.

1 Like

Is it possible to reproduce, (perhaps) hitting Google’s servers or another public source in a simple test?