core icon indicating copy to clipboard operation
core copied to clipboard

[OC6Beta4] Windows: Upload file spins

Open ser72 opened this issue 13 years ago • 6 comments

Expected Results File to be uploaded and browser to come back

Actual Results File is uploaded but browser hangs

Steps Configure OC6 Beta 4 on WINDOWS 2008 Server Drag and drop a file to the browser The progress bar will fill up and remain filled The cancel upload button will remain forever

capture

The file never appears on the file list

Attempt to refresh the page shows the following:

capture

Selecting LEAVE PAGE results in the page spinning forever

The only way to recover is to stop IIS, wait for the page to timeout, then start IIS (a pure restart of IIS will not recover)

Once this procedure is done, you can see the file you uploaded to ownCloud in the file list, and it appears in the data directory

SPECS ownCloud 6 Beta 4 {"installed":"true","version":"6.0.0.5","versionstring":"6.0 beta 3","edition":"}

Windows 2008 R2 server PHP 5.4.14 MS SQL Database

ownCloud log {"app":"PHP","message":"opendir(C:\Windows\temp/owncloud-oc178a713c19/,C:\Windows\temp/owncloud-oc178a713c19/): Access is denied. (code: 5) at C:\inetpub\wwwroot\owncloud\lib\private\cache\fileglobal.php#93","level":2,"time":"2013-11-13T20:11:03+00:00"} {"app":"PHP","message":"opendir(C:\Windows\temp/owncloud-oc178a713c19/): failed to open dir: No such file or directory at C:\inetpub\wwwroot\owncloud\lib\private\cache\fileglobal.php#93","level":2,"time":"2013-11-13T20:11:03+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T20:11:05+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T20:11:05+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T20:11:05+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T20:11:05+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T20:11:05+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T20:11:05+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T20:39:36+00:00"} {"app":"PHP","message":"opendir(C:\Windows\temp/owncloud-oc178a713c19/,C:\Windows\temp/owncloud-oc178a713c19/): Access is denied. (code: 5) at C:\inetpub\wwwroot\owncloud\lib\private\cache\fileglobal.php#93","level":2,"time":"2013-11-13T20:42:23+00:00"} {"app":"PHP","message":"opendir(C:\Windows\temp/owncloud-oc178a713c19/): failed to open dir: No such file or directory at C:\inetpub\wwwroot\owncloud\lib\private\cache\fileglobal.php#93","level":2,"time":"2013-11-13T20:42:23+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T20:46:46+00:00"} {"app":"PHP","message":"session_start(): ps_files_cleanup_dir: opendir(C:\Windows\temp) failed: No such file or directory (2) at C:\inetpub\wwwroot\owncloud\lib\private\session\internal.php#21","level":2,"time":"2013-11-13T20:47:16+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T20:47:34+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T20:47:48+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T20:50:39+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T20:51:39+00:00"} {"app":"PHP","message":"opendir(C:\Windows\temp/owncloud-oc178a713c19/,C:\Windows\temp/owncloud-oc178a713c19/): Access is denied. (code: 5) at C:\inetpub\wwwroot\owncloud\lib\private\cache\fileglobal.php#93","level":2,"time":"2013-11-13T20:51:42+00:00"} {"app":"PHP","message":"opendir(C:\Windows\temp/owncloud-oc178a713c19/): failed to open dir: No such file or directory at C:\inetpub\wwwroot\owncloud\lib\private\cache\fileglobal.php#93","level":2,"time":"2013-11-13T20:51:42+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T20:51:48+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T20:53:34+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T20:54:12+00:00"} {"app":"PHP","message":"opendir(C:\Windows\temp/owncloud-oc178a713c19/,C:\Windows\temp/owncloud-oc178a713c19/): Access is denied. (code: 5) at C:\inetpub\wwwroot\owncloud\lib\private\cache\fileglobal.php#93","level":2,"time":"2013-11-13T20:59:26+00:00"} {"app":"PHP","message":"opendir(C:\Windows\temp/owncloud-oc178a713c19/): failed to open dir: No such file or directory at C:\inetpub\wwwroot\owncloud\lib\private\cache\fileglobal.php#93","level":2,"time":"2013-11-13T20:59:26+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T20:59:33+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T20:59:38+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T21:04:00+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T21:04:00+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T21:04:04+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T21:04:04+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T21:04:53+00:00"} {"app":"PHP","message":"Undefined offset: 1 at C:\inetpub\wwwroot\owncloud\lib\private\files\cache\cache.php#514","level":2,"time":"2013-11-13T21:05:04+00:00"}

ser72 avatar Nov 13 '13 21:11 ser72

Is this a regression from beta2/3 ?

PVince81 avatar Nov 13 '13 21:11 PVince81

        510 $sql = 'SELECT SUM(`size`), MIN(`size`) FROM `*PREFIX*filecache` '.
        511 'WHERE `parent` = ? AND `storage` = ?';
        512 $result = \OC_DB::executeAudited($sql, array($id, $this->getNumericStorageId()));
        513 if ($row = $result->fetchRow()) {
        514     list($sum, $min) = array_values($row);
        515     $sum = (int)$sum;
        516     $min = (int)$min;

@ringmaster @DeepDiver1975 any clue ?

I suspect that MS SQL isn't returning the values in the format we are expecting? Or there were no results but fetchRow() still returned an empty array instead of null.

PVince81 avatar Nov 13 '13 21:11 PVince81

That query is not returning two values as expected but only one. Needs some love ....

DeepDiver1975 avatar Nov 13 '13 23:11 DeepDiver1975

Aliasing the fields (... SUM(size) as f1 ...) solves this problem, but does not seem to entirely fix the upload issue. Also, I didn't test its effect on MySQL/SQLite.

ringmaster avatar Nov 14 '13 13:11 ringmaster

Aliasing the fields (... SUM(size) as f1 ...) solves this problem, but does not seem to entirely fix the upload issue. Also, I didn't test its effect on MySQL/SQLite.

autotest.sh will help - that method is implicit unit tested :wink:

DeepDiver1975 avatar Nov 14 '13 14:11 DeepDiver1975

:+1: Fixed with #5874

ser72 avatar Nov 15 '13 14:11 ser72