My favorites | Sign in
Project Home
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 186: Hangs in Safari/Firefox on the Mac
20 people starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  jakerobe...@gmail.com


Sign in to add a comment
 
Reported by herb.gil...@gmail.com, Aug 17, 2009
SWFUpload Version: 2.20
Flash Player Version: 10
Operating System: MacOS
Browser(s): Safari/FF

Description:
Hangs at "uploading..."
Sep 29, 2009
#1 bongok...@gmail.com
confirmed. issue should be renamed to hangs on SAFARI and FIREFOX -

happens here with current version of flash player 10 and mac os 10.6.1 
Oct 23, 2009
Project Member #2 jakerobe...@gmail.com
Need more detail.  Please enable the debug output and post it here
Oct 23, 2009
#3 herb.gil...@gmail.com
I'm no longer near the Mac where this started, but... perhaps bongokarl can talk more
about this.  I believe the player/app itself does not function on a Mac ie: it
doesn't even start.   
Oct 23, 2009
#4 herb.gil...@gmail.com
actually, what I said earler..  (hangs at uploading) .. the instantiation is on the
project pages at Gudagi.com -- sign up and start a project, then click 'upload'
Nov 3, 2009
Project Member #6 jakerobe...@gmail.com
Do you mean hangs as:  The browser locks up and does not respond to input

Or

The uploadSuccess and uploadComplete events do not fire.

Does this happen in the official online demos?
Nov 3, 2009
#7 herb.gil...@gmail.com
what I mean is, it loads the file into the queue and says Uploading.... forever.
Nov 25, 2009
#8 abhibeck...@gmail.com
This happens to me too, and I believe it could be a 10.6 issue (not happening on 10.5, 
but I can't confirm that, it might be my 10.6 mac has newer flash).

The hang occurs after the "choose file" panel is closed by the user, and before the 
"upload_start_handler" javascript callback is fired.

The hang lasts about 20 seconds, and usually doesn't lock up the browser.
Nov 25, 2009
#9 abhibeck...@gmail.com
Just to confirm, it does occur for me in safari 4.0.4 with flash 10.0.32.18 on this demo: http://demo.swfupload.org/v220/simpledemo/index.php

And also occurs on my own test website which is hosted on a local linux server (so it isn't caused by slow internet). As far as I can see the upload works fine 
as long as the user doesn't give up after waiting a long time with no feedback.

A virtual machine running Windows 7 and IE 8 on the same mac does not have any such problems.
Dec 6, 2009
#10 goo...@reboot.ch
I have this problem as well, OSX10.6.2/Safari4.0.4 . the problem is when selecting enough files so that the 
upload button goes below the bottom of the window port, if I scroll down, as soon as I see the upload button, 
the uploads starts.
ps: I would really appreciate an event when clicking the upload button, before opening the file browser, needed 
for checking if session hasen't timed out. Thank you, great stuff 8)
Dec 9, 2009
#11 david.vi...@gmail.com
This occurs on my clients mac but both safari / ff stop after the 1st file is
uploaded.  Here's the debug output.

http://pastebin.com/m6463fe77


Dec 15, 2009
#12 nie...@googlemail.com
Same issue here. 10.6.0, tried with Flash Player v10 r32 and v10 r42, Firefox 3.5.5
and Safari 4.0.3. Also both 2.2 and 2.5 Versions of swfplayer. Also tried the demo at
http://demo.swfupload.org/v220/simpledemo/index.php, same issue.

In Linux with FF 3.5.5 and Flash v10 r42 it worked, difference (found out with tcpdump):

Linux: In the POST request, Connection: keep-alive
MAC: Connection: close


Maybe this helps.
Dec 23, 2009
Project Member #13 jakerobe...@gmail.com
RE #10: You might try fiddling with the WINDOW_MODE setting.  I had this issue back
in v0.8.3 and changing the window mode fixed this for me.
Summary: Hangs in Safari/Firefox on the Mac
Dec 23, 2009
Project Member #14 jakerobe...@gmail.com
RE #11: From your output it looks like you are having the file upload but aren't
getting the uploadSuccess event.  This happens on MAC if you don't return any
content.  We've also added a new setting 'assume_success_timeout' to help work around
this Flash Player bug. See the SWFUpload documentation for v2.2.0.


Dec 30, 2009
#15 bpa...@gmail.com
I thought I should post here too (also commented on #148). The demo at 
http://demo.swfupload.org/v220/simpledemo/index.php seems to get the progress updates. The small blue 
line at the bottom grows from left to right, however, in this case I don't get the completed update. Safari 4.0.4, 
OS X 10.6.2, Flash 10,0,42,34.
Jan 14, 2010
Project Member #16 jakerobe...@gmail.com
@bpauly (and others)
http://demo.swfupload.org/v250beta1/simpledemo/index.php

I've made an update so the upload.php script returns some content after the upload. 
Please test using the link above compared to the v220 demo.

Does it work now?
Jan 14, 2010
Project Member #17 jakerobe...@gmail.com
#15 Your comment on  issue #148  was interesting. A packet capture would be helpful.
(see response on #148).
Status: Accepted
Jan 14, 2010
#18 netric...@gmail.com
i'm having this same issue and just arrived.  

@jakeroberts i checked http://demo.swfupload.org/v250beta1/simpledemo/index.php and it works for me on 
Snow Leopard (osx 10.6).  I will download the beta and see if that corrects this behavior.
Jan 14, 2010
#19 netric...@gmail.com
Actually, all I had to do was echo back a space or whatever, and it works just skippy.

Thanks, this uploader is super cool.
Jan 18, 2010
Project Member #20 jakerobe...@gmail.com
(No comment was entered for this change.)
Labels: FixTargetedFor-2.5.0
Jan 18, 2010
#21 will.ros...@gmail.com
Even with the latest beta I'm still seeing the issue. I've configured the upload url
to return a string ("Complete") with a 200 status code and the success event is still
not triggered when trying any size of image. 

It works however in my IE7 version. As far as I can debug through my PHP (using a
Debug::log() to log to a file) the flash doesn't even get as far into the upload
function. 

The upload URL is protected by a username / password for security. 

I have uploaded the debug logs - http://pastie.org/784234. Your demo however works
fine for me so I am sure its something to do with my setup. Just posting in case the
log provides some more help.
Jan 19, 2010
#22 sheppard...@googlemail.com
Also experiencing the same issue. Works perfectly on Windows machine, however on a Mac 
the success event isn't firing and debugging doesn't return any error codes.

I've tried setting the full urls to both the php script and the flash file, and I've 
modified the PHP file to return something, but neither of these resolves the issue.
Jan 20, 2010
Project Member #23 jakerobe...@gmail.com
#22 - Here are some things to try:

 - Return more than just a couple characters
 - Flush the buffer
 - Don't use URLs with spaces in them

 - Does the assume_success_timeout setting do anything for you?
Jan 21, 2010
#24 heyin...@gmail.com
I have the same issue. it doesn't work on my mbp.
OSX 10.6.2  flash player 10.0.r42
Jan 22, 2010
#25 gmd...@gmail.com
jakeroberts, I tried each of your suggestions on 2.2.0.1 and still had the same issue.
Jan 22, 2010
Project Member #26 jakerobe...@gmail.com
It appears we are having a variety of different bugs that all produce similar symptoms:

Symptom:
uploadSuccess, uploadError, uploadComplete do not fire after the upload is complete.

Known Issues:
- server side upload handler must return content (some cases indicates that a single
character is not enough, it may require 1/2 KB)
- server side upload handler cannot redirect (HTTP status 302)
- upload_url cannot contain spaces (according to some reports)
- time between last uploadProgress (100%) and the server response must be less than
30 seconds.  In other words you cannot perform extensive server side processing while
SWFUpload is waiting.

Other possible issues:
- Flash uses Connection: close in the header -- we cannot work-around or control 


If you are sure you have eliminated all the known issues we can use your help
debugging the issue.  Unfortunately we do not have a MAC Client to test with.

Debug tips:
- Enable SWFUpload debug setting
- Use a tool like Wireshark to capture the client/server transaction
- Install the debug version of the Flash Player and report any messages you get
(note: you will most probably see some from 2.2.0 and 2.5.0 beta 1, also, you might
need to request a Debug build of SWFUpload)
Jan 28, 2010
#27 gmd...@gmail.com
I am experiencing this issue with Firefox 3.5.7 (going to try to upgrade to 3.6 soon)
on Windows 7 so I don't think it's isolated to macs. I tried using Wireshark to
capture the packet and everything looks OK; the server returns OK (HTTP status 200)
with the correct message also.

Here is the IE packet which works:
O$-&Eu
@|q>
W
NPNOFPWHTTP/1.1 200 OK
Date: Thu, 28 Jan 2010 17:38:38 GMT
Server: Apache/2.2.4 (Win32) PHP/5.2.9-1
X-Powered-By: PHP/5.2.9-1
Set-Cookie: PHPSESSID=618ge91jvsqnkbeun3s5d0ju12; path=/sites_dev
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding,User-Agent
Content-Length: 9
Keep-Alive: timeout=20, max=99
Connection: Keep-Alive
Content-Type: text/html

Complete.

And the Firefox packet which does not work:
O$-&E1@|
W
NP;I(~Q3PHTTP/1.1 200 OK
Date: Thu, 28 Jan 2010 17:27:47 GMT
Server: Apache/2.2.4 (Win32) PHP/5.2.9-1
X-Powered-By: PHP/5.2.9-1
Set-Cookie: PHPSESSID=9dknb1c6a8dn6t12iek334b6c2; path=/sites_dev
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Vary: Accept-Encoding,User-Agent
Content-Length: 9
Keep-Alive: timeout=20, max=100
Connection: Keep-Alive
Content-Type: text/html

Complete.

I don't really see a difference.
Feb 7, 2010
#28 gmd...@gmail.com
I enabled the debug setting and I tried to figure out what was happening differently
in Firefox 3.6 from Internet Explorer and Chrome. SWFUpload would reinitialize a few
seconds after starting an upload.

The problem was that I was changing the float position of the button. Before an
upload would start it would be floated to the right. Under the fileQueued handler
function it would change the float to "none":
document.getElementById("buttonContainer").style.cssFloat = "none";

I replaced none with left and it looks the same and it works! (tested under 2.5 beta 2)

Thank you for a great piece of software!
Feb 9, 2010
#29 diego.pa...@gmail.com
How can I expect upload a large file (i.e 100Mb) if the time must be shorter than 30 
seconds ?. Is this gonna solve ?.
I was think to migrate from 2.2.0 to 2.5.0 to solve this issue of 30 seconds.
I was developing in ASP.NET Cassini web server Fwk 3.5 and the 30 seconds problem 
persist. How can I workaround this ?
Thanks
Diego
Feb 10, 2010
#30 diego.pa...@gmail.com
I means, the assume_success_timeout was created with this purpose, right?. And by 
default (assume_success_timeout = 0) this parameter tells to Flash that wait 
indefinitely. The why SWFUpload ends in 30 seconds ?. Or am I missing something ?
Thanks
Feb 11, 2010
Project Member #31 jakerobe...@gmail.com
30 seconds timeout begins after the upload completes (i.e, upload progress is 100%).
 SWFUpload sends all the data then waits for the server to respond.  Flash waits 30
seconds the gives up (without notifying us).

The assume_success_timeout is off by default (0).  If you want SWFUpload to just
assume the upload was successful even though the server never responded you can set
it to a timeout (which begins after the upload is finished (100% progress).
Mar 9, 2010
#32 brian.mo...@gmail.com
We are seeing what MIGHT be this same issue, but only in FF and Safari 4.04, and only
on Snow Leopard. 

The symptoms (for us) are that the user's browser appears 'hung', however the upload
is actually taking place. The progress events, and success events (perhaps events in
general?) are not being fired.

We absolutely can repro this 100%. Again, the file is uploaded. The progress events
are not fired.

Mar 24, 2010
#33 mr.h...@gmail.com
Not sure if related but resolved a problem of Safari's Flash handling of small or invisible flash objects by not 
hiding the swfupload object on the page.
Mar 26, 2010
#34 shoemake...@gmail.com
I confirmed that bug #206 is actually an instance of this bug.  The person who
reported it to me mistakenly stated that he was using Linux when in fact he was using
a Mac.  Three other people have since contacted me, and every single one of them is
using Macs.  It does not seem that whether the page includes Google Analytics or not
or whether there are spaces in the filename is relevant.

I don't have access to any Macs, so that's probably why I tested for 20 hours and was
never able to reproduce the problem from bug #206 myself.  One of the E-Mails I
received from a user is listed below:

----------------

Hi Steve,

Thank for the email.

Yeah, the system kept on saying that it was a duplicate upload or something along
those lines.

> > 1.  What browser do you use?
Firefox 3.6
-Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2) Gecko/20100115
Firefox/3.6

> > 2.  What operating system do you use?
Apple Snow Leopard (OSX 10.6.2)


> > 3.  What type of Internet connection do you have?
Virgin Media Cable - 8MB Broadband


> > 4.  How long did it take for the upload process to complete - just a few
> > seconds, or were you waiting for 30 minutes?
Upload completed in around 10-20 seconds.

The file I was trying to upload it attached to this email.

Hope this information helps.

Best wishes,

Chris

-----------------------------

What occurs is that the file is simply not uploaded.  There is no "partially
uploaded" error or any other message.  swfupload displays a message of success.

The file that Chris was attempting to upload is attached.  This bug is reproducible
at www.gameremixes.com/song/new using the attached file - he encountered it four
times.  If the upload fails, no harm is done to the system, so you can test if you
have a Mac.  I'll leave swfupload on the site for a week so that someone can try to
reproduce it if they wish; after that, I'm going to have to take down the test case
and switch to Uploadify because the site is losing visitors.  Let me know if any code
or system specs are needed and I can provide them.
Chris_Green_Refugee_Theme.mp3
3.6 MB   Download
Mar 29, 2010
Project Member #35 jakerobe...@gmail.com
Well,

I fired up a Mac Mini (OS X 10.5.2) with Safari 3 and Firefox 3.6 and Flash Player 9.
 I cannot upload the test file to your site.  Well, the upload appears to work but
then I get a 'file not found' screen. On Windows I get an 'influences' screen.

However, I can upload successfully using the SWFUpload Demos.  If my upload URL has a
space in it I get an IO error.  Without a space the upload works as expected.

I analyzed the packets for a MAC vs WINDOWS view.  They headers are quite different.
 Both report different User Agents and Cache settings.  Windows set the connection to
Keep Alive and Mac sets the connection to Close.  However the server response is
nearly identical in either case.

I cannot find any SWFUpload issues.  You might need to dig deeper in your upload.php
script.

Also, I checked out Uploadify.  Have you tested it with your Mac clients?  I suspect
you'll have the same issues since we both are using Flash to perform the upload. 
However, if their stuff works and SWFUpload doesn't please let me know.  In that case
I'd like to talk with the Devs and see what we are doing differently.
Mar 30, 2010
#36 shoemake...@gmail.com
Hi Jake,

The "influences" screen is the next step in the upload process, which means that the
upload was successful.  When the "uploaded file not found" error appears, it means
that, for some reason, the file was never created on the webserver.  I tried
attempting to write out data from the upload.php file when this happens, but I never
get any output for this error.  All that happens is that a row is written by symfony
when the sanity check finds that no file exists in the pending songs directory, but
there is no corresponding failure written by the upload.php script, almost as if it
was never run.  When other errors occur, such as the file being too big, error output
is written, so I don't think there's a bug in the error output routine.

I attached upload.php to this post.  This version, while hacked up, is the version
that is running on the site now:

--------------------

<?php
/*
This is an upload script for SWFUpload that attempts to properly handle uploaded files
in a secure way.

Notes:
	
	SWFUpload doesn't send a MIME-TYPE. In my opinion this is ok since MIME-TYPE is no
better than
	 file extension and is probably worse because it can vary from OS to OS and browser
to browser (for the same file).
	 The best thing to do is content sniff the file but this can be resource intensive,
is difficult, and can still be fooled or inaccurate.
	 Accepting uploads can never be 100% secure.
	 
	You can't guarantee that SWFUpload is really the source of the upload.  A malicious user
	 will probably be uploading from a tool that sends invalid or false metadata about
the file.
	 The script should properly handle this.
	 
	The script should not over-write existing files.
	
	The script should strip away invalid characters from the file name or reject the file.
	
	The script should not allow files to be saved that could then be executed on the
webserver (such as .php files).
	 To keep things simple we will use an extension whitelist for allowed file
extensions.  Which files should be allowed
	 depends on your server configuration. The extension white-list is _not_ tied your
SWFUpload file_types setting
	
	For better security uploaded files should be stored outside the webserver's document
root.  Downloaded files
	 should be accessed via a download script that proxies from the file system to the
webserver.  This prevents
	 users from executing malicious uploaded files.  It also gives the developer control
over the outgoing mime-type,
	 access restrictions, etc.  This, however, is outside the scope of this script.
	
	SWFUpload sends each file as a separate POST rather than several files in a single
post. This is a better
	 method in my opinions since it better handles file size limits, e.g., if
post_max_size is 100 MB and I post two 60 MB files then
	 the post would fail (2x60MB = 120MB). In SWFupload each 60 MB is posted as separate
post and we stay within the limits. This
	 also simplifies the upload script since we only have to handle a single file.
	
	The script should properly handle situations where the post was too large or the
posted file is larger than
	 our defined max.  These values are not tied to your SWFUpload file_size_limit setting.
	
*/

set_time_limit(60 * 60 * 24);

// Code for Session Cookie workaround
	if (isset($_POST["PHPSESSID"])) {
		session_id($_POST["PHPSESSID"]);
	} else if (isset($_GET["PHPSESSID"])) {
		session_id($_GET["PHPSESSID"]);
	}

	session_start();

// Check post_max_size (http://us3.php.net/manual/en/features.file-upload.php#73762)
	$POST_MAX_SIZE = ini_get('post_max_size');
	$unit = strtoupper(substr($POST_MAX_SIZE, -1));
	$multiplier = ($unit == 'M' ? 1048576 : ($unit == 'K' ? 1024 : ($unit == 'G' ?
1073741824 : 1)));

	if ((int)$_SERVER['CONTENT_LENGTH'] > $multiplier*(int)$POST_MAX_SIZE &&
$POST_MAX_SIZE) {
		header("HTTP/1.1 500 Internal Server Error"); // This will trigger an uploadError
event in SWFUpload
		echo "POST exceeded maximum allowed size.";
		exit(0);
	}

// Settings - this is a constant that needs to be changed if the site is ever moved
to another server.
  $save_path = '/home/shoem4/www/remixsite/uploads/pending/';
  $upload_name = "Filedata";
	$fileId = $_POST['fileId'];
	$max_file_size_in_bytes = 2147483647;				// 2GB in bytes
	$extension_whitelist = array("mp3", "mpga", "mpg", "wav", "wma", "ogg", "flac",
"jpg", "png", "gif", 'avi', 'wmv', 'flv', 'mp4', 'mov', 'mp2', 'mpg', 'nsv', 'asf',
'mts', 'm2ts');	// Allowed file extensions
//	$valid_chars_regex = ".A-Z0-9_ !@#$%^&()+={}[]',~`-";				// Characters allowed in
the file name (in a Regular Expression format)
	
// Other variables	
	$MAX_FILENAME_LENGTH = 260;
	//$file_name = "";
	$file_extension = "";
	$uploadErrors = array(
        0=>"There is no error, the file uploaded with success",
        1=>"The uploaded file exceeds the upload_max_filesize directive in php.ini",
        2=>"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified
in the HTML form",
        3=>"The uploaded file was only partially uploaded",
        4=>"No file was uploaded",
        6=>"Missing a temporary folder"
	);


// Validate the upload
	if (!isset($_FILES[$upload_name])) {
                HandleError(558);
		//HandleError("No upload found in $_FILES for " . $upload_name);
		exit(0);
	} else if (isset($_FILES[$upload_name]["error"]) && $_FILES[$upload_name]["error"]
!= 0) {
                HandleError(557, $_FILES[$upload_name]["error"]);
		//HandleError($uploadErrors[$_FILES[$upload_name]["error"]]);
		exit(0);
	} else if (!isset($_FILES[$upload_name]["tmp_name"]) ||
!@is_uploaded_file($_FILES[$upload_name]["tmp_name"])) {
                HandleError(556);
		//HandleError("Upload failed is_uploaded_file test.");
		exit(0);
	} else if (!isset($_FILES[$upload_name]['name'])) {
                HandleError(555);
		//HandleError("File has no name.");
		exit(0);
	}
	
// Validate the file size (Warning: the largest files supported by this code is 2GB)
	$file_size = @filesize($_FILES[$upload_name]["tmp_name"]);
	if (!$file_size || $file_size > $max_file_size_in_bytes) {
                HandleError(554);
		//HandleError("File exceeds the maximum allowed size");
		exit(0);
	}
	
	if ($file_size <= 0) {
                HandleError(553);
		//HandleError("File size outside allowed lower bound");
		exit(0);
	}


/* Validate file name (for our purposes we'll just remove invalid characters)
	$file_name = preg_replace('/[^'.$valid_chars_regex.']|.+$/i', "",
basename($_FILES[$upload_name]['name']));
	if (strlen($file_name) == 0 || strlen($file_name) > $MAX_FILENAME_LENGTH) {
		HandleError(552);
                //HandleError("Invalid file name");
		exit(0);
	}
*/

// Validate that we won't over-write an existing file 
/*
	if (file_exists($save_path . $file_name)) {
		HandleError("File with this name already exists");
		exit(0);
	} */

// Validate file extension
	$path_info = pathinfo($_FILES[$upload_name]['name']);
	$file_extension = $path_info["extension"];
	$is_valid_extension = false;
	foreach ($extension_whitelist as $extension) {
		if (strcasecmp($file_extension, $extension) == 0) {
			$is_valid_extension = true;
			break;
		}
	}
	if (!$is_valid_extension) {
		HandleError(551);
                //HandleError("Invalid file extension");
		exit(0);
	}

// Validate file contents (extension and mime-type can't be trusted)
	/*
		Validating the file contents is OS and web server configuration dependant.  Also,
it may not be reliable.
		See the comments on this page: http://us2.php.net/fileinfo
		
		Also see
http://72.14.253.104/search?q=cache:3YGZfcnKDrYJ:www.scanit.be/uploads/php-file-upload.pdf+php+file+command&hl=en&ct=clnk&cd=8&gl=us&client=firefox-a
		 which describes how a PHP script can be embedded within a GIF image file.
		
		Therefore, no sample code will be provided here.  Research the issue, decide how
much security is
		 needed, and implement a solution that meets the needs.
	*/


// Process the file
	/*
		At this point we are ready to process the valid file. This sample code shows how to
save the file. Other tasks
		 could be done such as creating an entry in a database or generating a thumbnail.
		 
		Depending on your server OS and needs you may need to set the Security Permissions
on the file after it has
		been saved.
	*/
	if (!move_uploaded_file($_FILES[$upload_name]["tmp_name"],
$save_path.$fileId.'.'.strtolower($file_extension))) {
                HandleError(550);
//		HandleError("File could not be saved.");
		exit(0);
	}

	exit(0);


/* Handles the error output. This error message will be sent to the uploadSuccess
event handler.  The event handler
will have to check for any error messages and react as needed. */
function HandleError($code, $errorText = '') {
        $dbhost = 'localhost';
        $dbuser = 'root';
        $dbpass = '[censored]';
        $dbname = 'remixsite';

        $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to
mysql');
        mysql_select_db($dbname);

        $messageToInsert = 'Error code "'.mysql_escape_string($code).'" occurred
while uploading.';

       if ($errorText != '')
         $messageToInsert .= '  '.$errorText;

        $sql = "INSERT into error_log(code, stack_trace, referer, action, username,
ip_address, message, line_number, filename, created_at)
                   VALUES(570, '',
'".mysql_escape_string(isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] :
'')."', 'upload.php', '[unknown]',
'".mysql_escape_string($_SERVER['REMOTE_ADDR'])."', '".$messageToInsert."', null,
'upload.php', '".mysql_escape_string(date('Y-m-d H:i:s'))."')";
 
        mysql_query($sql);  //insert the error record into the database.
        if (mysql_error() != '') echo $sql.'   <br />'.mysql_error();
        header("HTTP/1.1 ".$code." Internal Server Error"); // This will trigger an
uploadError event in //echo $message;
        exit (0);
}
?>

------------------------------

I don't think that the problem is related to caching.  I was able to reproduce this
error this morning on the Dev server at http://svillage.mine.nu.  The Dev server has
caching disabled, while the production server uses caching, and the error occurs in
both locations.  Likewise, the error does not seem to be dependent on Flash version,
because people using Flash 10 have also reported the error, while you're using Flash 9.

It does seem that it is more likely for the first upload to fail than it is for
subsequent uploads to fail.  When a "missing file upload error" occurs, if I click
"Back" and retry, the success rate is much higher than the first time around.  Rarely
are more than two tries necessary.

Perhaps there is some PHP configuration setting that I and the other people reporting
this error have that is different than the demo site's configuration.  If you'd like,
I can copy the demo site to one of the two servers that have this problem if that
would help you debug.

Thanks,

-Steve
Mar 30, 2010
#37 shoemake...@gmail.com
Also, are you using the 2.5 demos, or the 2.2 demos?  These sites used version 2.2,
until about five minutes ago when I uploaded the beta version.  Perhaps someone with
a Mac can test uploading with this new version and see if the bug still exists.
Mar 30, 2010
#38 massimil...@gmail.com
Unfortunately the problem is still there.
Tested on Snow Leopard and Safari 4.0.5.

http://demo.swfupload.org/v250beta3/
If the button "Hello" falls below the page the upload queue is not executed.

As soon as you scroll down until the end of the page, the queue starts (not always).
snif.gif
55.6 KB   View   Download
Mar 30, 2010
#39 massimil...@gmail.com
I've done a screencast to explain the bug. As you could see at the end of the video 
(when i move the mouse left-right) if I scroll down the page the queue starts.

http://www.screencast.com/t/NjZkZWZj
Apr 1, 2010
#40 massimil...@gmail.com
known that this demo: http://demo.swfupload.org/v250beta3/resizedemo/index.php
does not seem affected by the bug, Mac OS X Snow Leopard + Safari 4 works perfectly.
Apr 9, 2010
#41 shoemake...@gmail.com
Would it be possible for Jake to post the upload.php code that these samples that
work are using?  If possible, I want to compare it to what I have.

Also, if someone with a Mac could try again at http://www.gameremixes.com/song/new, I
attempted several workarounds, including what some people have suggested that
something needs to be echoed to the page even on success.
Apr 12, 2010
Project Member #42 jakerobe...@gmail.com
All the sample code is available on this site.  We use the demos to perform much of
our testing.
May 1, 2010
#43 hinewwi...@gmail.com
IS there update on this issue?

I tried to output debug and I found that on Mac I get,

SWF DEBUG: 
SWF DEBUG: Event: fileDialogStart : Browsing files. Multi Select. Allowed file types: *.*
SWF DEBUG: Event: fileDialogStart : Browsing files. Multi Select. Allowed file types: *.*
SWF DEBUG: Exception: Error: Error #2041
SWF DEBUG: Select Handler: Received the files selected from the dialog. Processing the 
file list...
SWF DEBUG: Event: fileQueued : File ID: SWFUpload_0_0
SWF DEBUG: Event: fileDialogComplete : Finished processing selected files. Files 
selected: 1. Files Queued: 1
SWF DEBUG: StartUpload: First file in queue
SWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0
SWF DEBUG: Global Post Item: vid=testcafe
SWF DEBUG: Global Post Item: PHPSESSID=3cf78b13acd39be8f81564c31e5765ef
SWF DEBUG: Global Post Item: act=procFileUpload
SWF DEBUG: Global Post Item: editor_sequence=1
SWF DEBUG: Global Post Item: uploadTargetSrl=
SWF DEBUG: Global Post Item: mid=notice
SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for 
upload.  Starting upload to http://beta.ksan2.net/ for File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 131072. Total: 
162283
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 134064. Total: 
162283
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 136800. Total: 
162283
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 139536. Total: 
162283
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 142272. Total: 
162283
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 146376. Total: 
162283
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 151848. Total: 
162283
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 154584. Total: 
162283
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 160056. Total: 
162283
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 162283. Total: 
162283
SWF DEBUG: Event: uploadSuccess: File ID: SWFUpload_0_0 Response Received: true 
Data: 

and in non-mac, I get  

SWF DEBUG: Event: fileDialogStart : Browsing files. Multi Select. Allowed file types: *.*
SWF DEBUG: Select Handler: Received the files selected from the dialog. Processing the 
file list...
SWF DEBUG: Event: fileQueued : File ID: SWFUpload_0_0
SWF DEBUG: Event: fileDialogComplete : Finished processing selected files. Files 
selected: 1. Files Queued: 1
SWF DEBUG: StartUpload: First file in queue
SWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0
SWF DEBUG: Global Post Item: vid=testcafe
SWF DEBUG: Global Post Item: PHPSESSID=d7e3b47a30a6f0e8e5fbcdc9860fe37a
SWF DEBUG: Global Post Item: act=procFileUpload
SWF DEBUG: Global Post Item: editor_sequence=1
SWF DEBUG: Global Post Item: uploadTargetSrl=
SWF DEBUG: Global Post Item: mid=notice
SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for 
upload.  Starting upload to http://beta.ksan2.net/ for File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 20423. Total: 
20423
SWF DEBUG: Event: uploadSuccess: File ID: SWFUpload_0_0 Response Received: true 
Data: 


I am not sure what is wrong with mine....  Can anyone help me on this?
May 3, 2010
Project Member #44 jakerobe...@gmail.com
According to your debug messages both uploads are working fine.

In the MAC logs you are getting a 2041 Flash error.  This means that it's trying to
open more than one File Dialog window.  Are you clicking the button more than once?
May 7, 2010
#45 Ryan.Pil...@gmail.com
Also seem to be having this issue, see log here: http://pastebin.com/eQcvij6J

Seems to work fine in Chrome on Mac, but not in Firefox, if you look at the log the
upload is complete  but doesnt seem to finish off, and therefore just hangs on
Uploading ...

Any suggestions to get this fixed?
May 7, 2010
#46 Ryan.Pil...@gmail.com
Just to add, when SWFUpload is still hanging on Uploading and I try to upload another
file, the debug window says waiting on another upload to complete, when I cancel all
uploads and then try again, the upload completes.
May 7, 2010
#47 Ryan.Pil...@gmail.com
Flash bug? Having upgraded to Flash 10.1 (not currently released but available for
download here http://labs.adobe.com/downloads/flashplayer10.html - scroll down page),
I cannot seem to replicate the error I was getting, and all uploads are working
perfectly.

Anyone care to try upgrading and test to see if we can pinpoint the error.
Jun 9, 2010
#48 WebBr...@gmail.com
I think this is what's going on:
http://support.mozilla.com/en-US/forum/1/369466
Jun 11, 2010
#49 scootkl...@gmail.com
Strange anomaly of events tonight...not sure if they'll help

I have a development virtual machine (Ubuntu 9.10) with client side Mac OSX 10.6. I modify a hosts file to allow me to access the machine via some fake hostname (ex. "server1").

Ran across a cookie issue where browser wouldn't let me set a multiple-subdomain cookie of ".server1" so i needed to change the VM hostname in my hosts file to "server1.com". Everything went well, but it introduced this very bug on both Chrome and Firefox.

I tried to echo "1" on success in the POST file that handles the upload, that didn't fix it.

Eventual fix was to echo a large string of characters as suggested.

My symptoms were the same as others, no final firing of uploadSuccess or uploadComplete.

Whats even more strange is that the SWFUpload.swf file on my production server still works fine and does not see this bug.



---DEBUG OUTPUT OF HANG---

---SWFUpload Instance Info---
Version: 2.2.0 2009-03-25
Movie Name: SWFUpload_0
Settings:
	upload_url:               http://autopilot.soundaround1.com/upload/
	flash_url:                /include/swfupload.swf?preventswfcaching=1276238546671
	use_query_string:         false
	requeue_on_error:         false
	http_success:             
	assume_success_timeout:   0
	file_post_name:           upload_file
	post_params:              [object Object]
	file_types:               *.jpg;*.bmp;*.jpeg;*.png
	file_types_description:   Photo Files
	file_size_limit:          25 MB
	file_upload_limit:        100
	file_queue_limit:         1
	debug:                    true
	prevent_swf_caching:      true
	button_placeholder_id:    uploadImageButton
	button_placeholder:       Not Set
	button_image_url:         /images/swfupload_upload.png
	button_width:             81
	button_height:            28
	button_text:              
	button_text_style:        color: #000000; font-size: 16pt;
	button_text_top_padding:  0
	button_text_left_padding: 0
	button_action:            -110
	button_disabled:          false
	custom_settings:          [object Object]
Event Handlers:
	swfupload_loaded_handler assigned:  false
	file_dialog_start_handler assigned: false
	file_queued_handler assigned:       true
	file_queue_error_handler assigned:  true
	upload_start_handler assigned:      true
	upload_progress_handler assigned:   true
	upload_error_handler assigned:      true
	upload_success_handler assigned:    true
	upload_complete_handler assigned:   true
	debug_handler assigned:             true

SWF DEBUG: SWFUpload Init Complete
SWF DEBUG: 
SWF DEBUG: ----- SWF DEBUG OUTPUT ----
SWF DEBUG: Build Number:           SWFUPLOAD 2.2.0
SWF DEBUG: movieName:              SWFUpload_0
SWF DEBUG: Upload URL:             http://autopilot.soundaround1.com/upload/
SWF DEBUG: File Types String:      *.jpg;*.bmp;*.jpeg;*.png
SWF DEBUG: Parsed File Types:      jpg,bmp,jpeg,png
SWF DEBUG: HTTP Success:           0
SWF DEBUG: File Types Description: Photo Files (*.jpg;*.bmp;*.jpeg;*.png)
SWF DEBUG: File Size Limit:        26214400 bytes
SWF DEBUG: File Upload Limit:      100
SWF DEBUG: File Queue Limit:       1
SWF DEBUG: Post Params:
SWF DEBUG:                         upload_uuid=5EED240B-BE19-4CC2-BE36-69876F824EE7
SWF DEBUG:                         application_uuid=4F0FD6B6-71FC-4744-A561-1932A3A881AB
SWF DEBUG: ----- END SWF DEBUG OUTPUT ----
SWF DEBUG: 
SWF DEBUG: Event: fileDialogStart : Browsing files. Multi Select. Allowed file types: *.jpg;*.bmp;*.jpeg;*.png
SWF DEBUG: Select Handler: Received the files selected from the dialog. Processing the file list...
SWF DEBUG: Event: fileQueued : File ID: SWFUpload_0_0
SWF DEBUG: Event: fileDialogComplete : Finished processing selected files. Files selected: 1. Files Queued: 1
SWF DEBUG: StartUpload: First file in queue
SWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0
SWF DEBUG: Global Post Item: upload_uuid=5EED240B-BE19-4CC2-BE36-69876F824EE7
SWF DEBUG: Global Post Item: application_uuid=4F0FD6B6-71FC-4744-A561-1932A3A881AB
SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload.  Starting upload to http://autopilot.soundaround1.com/upload/ for File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 130320. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 176656. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 196608. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 243264. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 260640. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 327680. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 561024. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 589824. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 655360. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 669464. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 720896. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 736072. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 786432. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 802680. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 869288. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 935896. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 1138616. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 1349429. Total: 1349429
---END DEBUG OUTPUT OF HANG


---DEBUG OUTPUT OF SUCCESS WITH LARGE ECHO---

---SWFUpload Instance Info---
Version: 2.2.0 2009-03-25
Movie Name: SWFUpload_0
Settings:
	upload_url:               http://autopilot.soundaround1.com/upload/
	flash_url:                /include/swfupload.swf?preventswfcaching=1276239111220
	use_query_string:         false
	requeue_on_error:         false
	http_success:             
	assume_success_timeout:   0
	file_post_name:           upload_file
	post_params:              [object Object]
	file_types:               *.jpg;*.bmp;*.jpeg;*.png
	file_types_description:   Photo Files
	file_size_limit:          25 MB
	file_upload_limit:        100
	file_queue_limit:         1
	debug:                    true
	prevent_swf_caching:      true
	button_placeholder_id:    uploadImageButton
	button_placeholder:       Not Set
	button_image_url:         /images/swfupload_upload.png
	button_width:             81
	button_height:            28
	button_text:              
	button_text_style:        color: #000000; font-size: 16pt;
	button_text_top_padding:  0
	button_text_left_padding: 0
	button_action:            -110
	button_disabled:          false
	custom_settings:          [object Object]
Event Handlers:
	swfupload_loaded_handler assigned:  false
	file_dialog_start_handler assigned: false
	file_queued_handler assigned:       true
	file_queue_error_handler assigned:  true
	upload_start_handler assigned:      true
	upload_progress_handler assigned:   true
	upload_error_handler assigned:      true
	upload_success_handler assigned:    true
	upload_complete_handler assigned:   true
	debug_handler assigned:             true

SWF DEBUG: SWFUpload Init Complete
SWF DEBUG: 
SWF DEBUG: ----- SWF DEBUG OUTPUT ----
SWF DEBUG: Build Number:           SWFUPLOAD 2.2.0
SWF DEBUG: movieName:              SWFUpload_0
SWF DEBUG: Upload URL:             http://autopilot.soundaround1.com/upload/
SWF DEBUG: File Types String:      *.jpg;*.bmp;*.jpeg;*.png
SWF DEBUG: Parsed File Types:      jpg,bmp,jpeg,png
SWF DEBUG: HTTP Success:           0
SWF DEBUG: File Types Description: Photo Files (*.jpg;*.bmp;*.jpeg;*.png)
SWF DEBUG: File Size Limit:        26214400 bytes
SWF DEBUG: File Upload Limit:      100
SWF DEBUG: File Queue Limit:       1
SWF DEBUG: Post Params:
SWF DEBUG:                         upload_uuid=F4CFBC31-F325-4BF0-85A0-E53ADCB1F767
SWF DEBUG:                         application_uuid=4F0FD6B6-71FC-4744-A561-1932A3A881AB
SWF DEBUG: ----- END SWF DEBUG OUTPUT ----
SWF DEBUG: 
SWF DEBUG: Event: fileDialogStart : Browsing files. Multi Select. Allowed file types: *.jpg;*.bmp;*.jpeg;*.png
SWF DEBUG: Select Handler: Received the files selected from the dialog. Processing the file list...
SWF DEBUG: Event: fileQueued : File ID: SWFUpload_0_0
SWF DEBUG: Event: fileDialogComplete : Finished processing selected files. Files selected: 1. Files Queued: 1
SWF DEBUG: StartUpload: First file in queue
SWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0
SWF DEBUG: Global Post Item: upload_uuid=F4CFBC31-F325-4BF0-85A0-E53ADCB1F767
SWF DEBUG: Global Post Item: application_uuid=4F0FD6B6-71FC-4744-A561-1932A3A881AB
SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload.  Starting upload to http://autopilot.soundaround1.com/upload/ for File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 65536. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 393216. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 655360. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 720896. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 851968. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 983040. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 1179648. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 1310720. Total: 1349429
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 1349429. Total: 1349429
SWF DEBUG: Event: uploadSuccess: File ID: SWFUpload_0_0 Response Received: true Data: 
SWF DEBUG: Hello ladies and gentlemen. SWFUpload, for some reason, requires that we return a few bytes in order to trigger an uploadSuccess() event.
SWF DEBUG: 
SWF DEBUG: Event: uploadComplete : Upload cycle complete.
---END DEBUG OUTPUT OF SUCCESS---
Jul 9, 2010
#50 aaron.um...@gmail.com
I am not sure if this will be helpful but this is how I was able to get the script working on my mac machines.

When I was creating my script I ended up resizing and adding the image locations to a DB.
I noticed that the script was working fine on my windows machines, but as soon as people started testing on mac machines I started having the problems that people are reporting in this post.

Basically the way I fixed the problem was at the end of my "if statements" that I needed to add a "break;"

I will show an example below. At the very end of the upload.php example just after:

	if (!@move_uploaded_file($_FILES[$upload_name]["tmp_name"], $save_path.$file_name)) {
		HandleError("File could not be saved.");
		exit(0);
	}


/** My example starts here */

	/** Check to see if the file is a valid jpg or png */
	$image_exts = array(".jpg", ".png");
	
	if(in_array($ext, $image_exts)) $is_image = true;

	if($is_image == true){
		/** Resize image */
		
		/** Add information to DB */
		
		
		/** 
		 * Last but not least... when break; was NOT in the script it worked 
		 * on windows machines, but wouldn't work on my mac testing machines.
		 * Now the script works on both machines.
		 */
		
		break; // The secret sauce to get my scripts working.
	}


	exit(0);

Aug 10, 2010
#52 jzwo...@gmail.com
I had the same problem on my Mac with Safari and Firefox.  The files uploaded but the text "Uploading..." remained and "upload complete" was never displayed.  I used http://demo.swfupload.org/v220/simpledemo/index.php for testing.

I upgraded to Flash player 10.1... and swfuploader now works.
Jun 26, 2012
#53 Dominik....@gmail.com
Same problem with FF and Safari on Lion.

Have you got any update for this plugin?
Sep 26, 2012
#54 supp...@freshfully.com
I'm getting the same errors on all my Macs. I would love an update.
Sign in to add a comment

Powered by Google Project Hosting