Yes indeed, Catalysts has moved, but that doesn’t mean we are gone, we just moved to our new website cloudflight.io
together with our partners from Crisp Research to do the same things we used to do in an improved way. We still do great software and we are still great people, more or less only the color has changed except from our domain ­čśë

Flex File I/O Error #2038 on Mac Clients

Wissenswertes
5 Comments

The list of reasons for the infamous i/o error #2038 seems to be endless and considering the huge number of google hits [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] a lot of people are struggling with it. One of the reasons for this is that error #2038 is a very generic i/o error and doesn’t provide any further details that would help to track down the root problem. It even doesn’t state whether the error was client or server side.

In our case the error seemed to be client side, Mac only to be specific – “seemed to be” because we were proven different in the end. It happened that any file upload attempts initiated from Mac clients aborted with that particular error. Since we were able to upload the very same files with any Windows client we concluded that it can neither by the file size or type, nor any permission problems on the server. And since it only happened on Mac clients we further concluded that it has to be a bug in the Mac version of the Flash player.

We started to find the least complex setup to trace down the bug and finally file a bug report – and guess what, the very basic file upload example that can be found on so many tutorial pages worked. Well, that on the other hand proved that it is not a sole Mac player bug.

So if it’s neither a client bug nor a server bug, what else can it be? To solve that puzzle we set up Wireshark and started to compare the network traffic between our not working web application and our working test environment and the respective client. The first interesting thing we discovered was that in the failing case the client not even attempted to upload something. Why the heck can something fail that was not even tried to be done?

After further investigation of the network traffic we finally found the problem! It turned out to indeed be a Mac player bug that only arises with certain webserver configurations. More specifically, our webserver had some redirection rules in place that aimed to correct broken links, enforce https, and such. The problematic rule was the one that appended a slash to all requests that addressed a directory but ommited the trailing slash, and the upload request turned out to be such a request. While the Windows version of the Flash player understood that redirect and re-uploaded the file to the new location the Mac player just dropped the connection and bailed out with that ominous i/o error.

The fix was an easy one, we just added a trailing slash to the upload URL specified in the Actionscript code and everything worked fine.

Previous Post
3. Wispri: Integration bringt mehr
Next Post
Dependency Management with Ivy

Related Posts

20. Wissensspritze: Leistungsstarke UIs

pureMVC ist ein Framework zur Umsetzung des Model – View – Controller Architekturmusters, mit dem sich leistungsstarke RIA Applikationen entwickeln lassen.
Die Referenzimplementierung ist in Actionscript, pureMVC ist mittlerweile jedoch in sehr vielen Programmiersprachen verf├╝gbar.

Read More

5 Comments. Leave new

Thanks for the post, we’re having the same issue – you said you put a slash at the end of your URL, could you be more specific?

was it as simple as : “http://www.someURL.com/somepage.jspx/”

?

Thanks again – john

Reply

    That was for the case when the webserver handles uploading and you are just pointing to the upload location (folder). If uploads are handled by a server-side script (as in your example) the trailing slash is bogus of course.

    Try to figure out if you script actually gets any requests to process, if it is the mentioned redirect issue the client will fail before actually transmitting something.

    Reply

2 other things you need to do:
– encode the special characters
– echo at least one thing in your php file (if you use php), I just had to add echo ” “; and it worked!!

Reply

Thank you Harald,
your post just saved my team a couple of days of debugging ­čÖé
extremely good vibes from Rome
Filippo

Reply

Just want to add that our soulution was to remove spaces in url parameters :
http://www.someURL.com/somepage.php?parameter=En vrac replaced by http://www.someURL.com/somepage.php?parameter=En_vrac and now it works on Mac so !
Thanks for your post

Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Menu