Fluid Infusion

Attempting to upload files throws an uncaught exception: using FF 3.5

Details

  • Type: Sub-issue Sub-issue
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 0.8, 0.8.1, 1.0, 1.1, 1.1.1
  • Fix Version/s: 1.1.2
  • Component/s: Uploader
  • Labels:
    None
  • Environment:
    FF 3.5 (Mac OS 10.5, Win XP, Win Vista) Flash 10

Description

Attempting to upload files throws an uncaught exception

Steps to reproduce:

1) Open the uploader demo page
http://build.fluidproject.org/infusion/components/uploader/html/Uploader.html

2) Add some files to the file queue

3) Attempt to upload the files

Notice that an uncaught exception occurs

Error message:

uncaught exception: Call to SetButtonDisabled failed
anonymous("SetButtonDisabled", [true 0=true])swfupload.js (line 449)
anonymous(true)swfupload.js (line 685)
anonymous()SWFUploa...anager.js (line 118)
anonymous()Fluid.js (line 594)
anonymous()FileQueue.js (line 152)
anonymous()DemoUplo...anager.js (line 130)
anonymous()Uploader.js (line 557)
anonymous(Object originalEvent=Event click type=click)jquery.js (line 2693)
anonymous()jquery.js (line 2468)
[Break on this error] (no source for )
Firebug's log limit has been reached. %S entries not shown. Preferences

Issue Links

Activity

Hide
Justin Obara added a comment -
Seems like something changed between FF3 and FF3.5.

Not sure exactly what that was yet though. Here are some links from the swfupload forum about issues people have had with FF 3.5

http://swfupload.org/forum/generaldiscussion/1672

http://swfupload.org/forum/generaldiscussion/1641

Show
Justin Obara added a comment - Seems like something changed between FF3 and FF3.5. Not sure exactly what that was yet though. Here are some links from the swfupload forum about issues people have had with FF 3.5 http://swfupload.org/forum/generaldiscussion/1672 http://swfupload.org/forum/generaldiscussion/1641
Hide
Colin Clark added a comment -
The error is occurring in SWFUpload's code: setButtonDisabled(). We invoke this method inside our SWFUploadSetupDecorator, which is responsible for setting up a Flash 10-specific configuration of SWFUpload. This code is responsible for disabling the Flash-based "Browse Files" button, using a public API provided by SWFUpload.

This has become a pretty familiar scenario with SWFUpload: whenever a browser of Flash upgrade comes along, SWFUpload breaks. In this case, their setButtonDisabled() method is exploding. I haven't had a chance to fully triage the problem, but there is a temporary workaround:

If you're okay with the fact that users will be able to open the file dialog while an upload is in progress, removing lines 118 and 121 of SWFUploadManager.js--or better yet, wrapping those lines in a try/catch will squelch the error. This is quite a hack, and we'll make sure we find a reasonable fix that doesn't involve patching code directly.
Show
Colin Clark added a comment - The error is occurring in SWFUpload's code: setButtonDisabled(). We invoke this method inside our SWFUploadSetupDecorator, which is responsible for setting up a Flash 10-specific configuration of SWFUpload. This code is responsible for disabling the Flash-based "Browse Files" button, using a public API provided by SWFUpload. This has become a pretty familiar scenario with SWFUpload: whenever a browser of Flash upgrade comes along, SWFUpload breaks. In this case, their setButtonDisabled() method is exploding. I haven't had a chance to fully triage the problem, but there is a temporary workaround: If you're okay with the fact that users will be able to open the file dialog while an upload is in progress, removing lines 118 and 121 of SWFUploadManager.js--or better yet, wrapping those lines in a try/catch will squelch the error. This is quite a hack, and we'll make sure we find a reasonable fix that doesn't involve patching code directly.
Hide
Matt Zumwalt added a comment -
FYI, when I comment out the lines that call setButtonDisabled, I just get another error "Call to StartUpload failed". Upload still works fine in Safari with the hack in place.:

uncaught exception: Call to StartUpload failed
anonymous("StartUpload", [undefined])Infusion...251482117 (line 14610)
anonymous(Object name=fileID)Infusion...251482117 (line 14651)
anonymous()Infusion...251482117 (line 16240)
anonymous()Infusion...251482117 (line 16824)
anonymous(Object originalEvent=Event click type=click)Infusion...251482117 (line 2693)
anonymous()Infusion...251482117 (line 2468


PS - alternate hack - edit the function definition for SWFUpload.prototype.setButtonDisabled so that it skips calling the Flash method.

SWFUpload.prototype.setButtonDisabled = function (isDisabled) {
this.settings.button_disabled = isDisabled;
// this.callFlash("SetButtonDisabled", [isDisabled]);
};

... though this still gives me the "Call to StartUpload failed" error on my machine :(
Show
Matt Zumwalt added a comment - FYI, when I comment out the lines that call setButtonDisabled, I just get another error "Call to StartUpload failed". Upload still works fine in Safari with the hack in place.: uncaught exception: Call to StartUpload failed anonymous("StartUpload", [undefined])Infusion...251482117 (line 14610) anonymous(Object name=fileID)Infusion...251482117 (line 14651) anonymous()Infusion...251482117 (line 16240) anonymous()Infusion...251482117 (line 16824) anonymous(Object originalEvent=Event click type=click)Infusion...251482117 (line 2693) anonymous()Infusion...251482117 (line 2468 PS - alternate hack - edit the function definition for SWFUpload.prototype.setButtonDisabled so that it skips calling the Flash method. SWFUpload.prototype.setButtonDisabled = function (isDisabled) { this.settings.button_disabled = isDisabled; // this.callFlash("SetButtonDisabled", [isDisabled]); }; ... though this still gives me the "Call to StartUpload failed" error on my machine :(
Hide
Justin Obara added a comment - - edited
Bug Parade Infusion 1.1.2
Show
Justin Obara added a comment - - edited Bug Parade Infusion 1.1.2
Hide
Eli Cochran added a comment -
I've reviewed the code for this bug and it looks good. Also tested in FF3.5 using the demo version of the uploader.
Show
Eli Cochran added a comment - I've reviewed the code for this bug and it looks good. Also tested in FF3.5 using the demo version of the uploader.
Hide
Eli Cochran added a comment -
Resolved per Colin's code and my review
Show
Eli Cochran added a comment - Resolved per Colin's code and my review

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: