Hey guys,

So I upgraded on a test site to the latest SWFUpload and man it's really awesome how it is integrating into CCK now. Thanks for putting all the effort into putting that together.

One thing I did notice is that by returning TRUE from the swfupload_access() at the top it allows me to be able to actually upload the files (although I'm having an issue later down the track).

I'll try and determine what line of code this is being caused by in the access call, but overall the settings are set up for everyone to properly upload files. So I'm not sure why a 2038 would be returned. Also, the file is being completely uploaded ...?

Your help or a solution to this bug would be great. Or let me know if there is any other debug information I can provide.

CommentFileSizeAuthor
#17 853904-swfupload-issues.patch1.51 KBwiifm

Comments

shaneonabike’s picture

Also, I discovered that it's reporting that there is no session id associated to the current user I am logged in as. Would this be causing the issue of the upload because when I return TRUE from the function it seems to work ok.

eugenmayer’s picture

Status: Active » Postponed (maintainer needs more info)

please try this with beta7, could be a problem with retaining the session which we could have fixed there due to rework of swfupload_acess

eugenmayer’s picture

Status: Postponed (maintainer needs more info) » Active

Hi, we finally found out that it can depend on and SSL issue.

When you use a non-official certificate, flash most probably cant upload due the missing certificate root. In addition be sure to give the user the "use swuupload permission"

shaneonabike’s picture

I downloaded the latest version to test it out. I tested it out and still seem to be having issues. I also added the following as per the README documentation.

So I tried to apply the following:

     SecFilterEngine Off
     SecFilterScanPOST Off

The errors that I am getting are the following:

SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 76635. Total: 76635
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 76635. Total: 76635
SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 76635. Total: 76635
SWF DEBUG: Event: uploadError: HTTP ERROR : File ID: SWFUpload_0_0. HTTP Status: 403.
SWF DEBUG: Event: uploadComplete : Upload cycle complete.
SWF DEBUG: StartUpload: First file in queue
SWF DEBUG: StartUpload(): No files found in the queue.

In our case we aren't using an SSL certificate. Simply HTTP... I even tried providing access to anonymous users through swfupload to see if that would make a difference. Is there some place i could debug a further message to see what is happening.

It's strange that it woul dbe getting a 403 error??

Your help would be greatly appreciated as this feature (which is totally awesome btw) is used all over a pretty major site I am working on.

shaneonabike’s picture

Hey @EugenMayer,

Sorry for the massive posts... I noticed one more really interesting issue (and would love to chat about it over IRC to further debug).

I have managed to figure out that there is some issue with the verification of the token being passed for my current session with those in the database - which is strange. It's failing here..

   if (in_array($token, $valid_sids) && flood_is_allowed('swfupload_restore_session', 5)) {

I could verify that it is the proper UID data being retrieved... but not entirely sure why the md5 isn't generating a proper match.

Thoughts?

eugenmayer’s picture

Well we are now mixing up issues, as this issue is for 2038, and your is about 403 ( permissions denied). 403 indicates that you session could not be restored, as you sugessted, please open a new issue and cross post here, i will try to help you there

Fidelix’s picture

I am having a problem uploading. My upload works fine (user 1), but for other writers not.

Watchdog shows "Access denied", and "User" is Anonymous.

shaneonabike’s picture

Yeah same thing here too. Now to get it to work I actually had to grant permission to Anonymous users for swfupload in order for the uploads to be made. I think this has something to do with the md5 token issue.

deafsheep’s picture

Any updates on this issue? getting same 2038 error

And I am doing it from admin user

shaneonabike’s picture

Status: Active » Closed (fixed)

This has now been resolved in the latest beta8 version. I think it had lots to do with teh SSID issues that they worked on. Great work thanks!

As If’s picture

This error just started occurring for me on a site running beta8. No SSL. What exactly is a 2038?

UPDATE: Although I still don't know exactly what 2038 means, my problem is solved. My soft firewall was blocking Firefox's damned Plugin-Container. Once I let it connect, the upload succeeded.

ranx’s picture

I have two separate drupal 6 installations running in localhost. Beta 8 is working just fine in one but in the other I get the error #2038. I am confused as I don't use ssl nor any tokens and have the cck fields configured identically.

wiifm’s picture

I was having the same issue here, managed to resolve it be getting a signed (and trusted) SSL certificate for my local development box (from CACert). Just thought I would post this in case someone else is having similiar issues.

eugenmayer’s picture

@13: as stated in the other issue, this is something i can confirm. flashupload needs a proper SSL cert when used with SSL.

wiifm’s picture

@EugenMayer - Would it be worth updating the README file for this known reason for the module to not work?

eugenmayer’s picture

I guess we rather need something like http://drupal.org/node/809612 which is actively maintained, rather then a readme file. But iam not a friend of "readme" files anyway....nobody can search in them on drupal.org ... they are mostly out of date .. you cannot collaborate working on the content properly

wiifm’s picture

Status: Closed (fixed) » Needs review
Issue tags: +Documentation
StatusFileSize
new1.51 KB

The readme file is only as up to date as you want it to be. Here is a patch that attempts to articulate my findings with this 2038 error.

Also the readme file can be linked to from the main project page using drupalcode.org - e.g. http://drupalcode.org/project/swfupload.git/blob/refs/heads/master:/READ...

On a side note, any 6.x-2.x releases should be under a 6.x-2.x branch (I first rolled the patch against 6.x-1.x which is not used as far as I can tell). This will enable other features such as --dev releases on a 6.x-2.x branch.

eugenmayer’s picture

If you are running your website over HTTPS, ensure that your browser has
+ the root CA trusted (self signed certificates will not work). For
+ development CACert is a freeioption (http://www.cacert.org/)
+

This is not completely correct. Adobe Flash does not use the Firefox-Cert manager when connecting to HTTPS. Under Linux / Windows you have to include the root-cert into your OS, not browser. Otherwise it will not work, garanteed :)

This also will mostly fail for Chrome and Safari in OSX and most commonly also Chrome under Linux. And no, it does not help importing the root-cert in the browser at all (neither importing the cert..but that was not the question i guess)

wiifm’s picture

I am currently running under firefox 5.0 on Ubuntu 11.04 using apache, and my findings:

* HTTPS using a self signed SSL certificate, error 2038
* HTTPS using a CACert signed SSL certificate AND the CACert root CA certificate imported into firefox == working

I see now that I research it, there is a repo for CACerts for ubunutu - https://wiki.ubuntu.com/CAcert - but all this does is download them, so that you can add them by hand into firefox (i.e. not the OS)

In any case, I am not hung up on the wording of the readme, so long as there is mention of Flash and HTTPS potentially being an issue, as this cost me a few hours of searching, and I would hope this could help others ;)

bala_28’s picture

Installing the Shockwave Flash plugin fixed this problem for me.