[SOLVED] Web Interface Javascript error preventing upload

help

#1

Hello,

I tried to post all the information requested in logs. The forum only gives bad gateway when posting.

How can I post what is necessary to troubleshoot if the forum won’t take it?


I have a clean install of ownCloud 10.1.0. I get Javascript errors when trying to upload files via the web interface on both Mac and Windows.

Below is all the info I could gather.

I’m not sure how to address the JS issue. I’ve tested with Mac sync client and that works well.

The only issue I have so far the web interface file upload JS error prevent file uploads.

Any direction would be appreciated.


Truncated

Steps to reproduce

1.Clean install of 10.1.0
2.basic default configuration
3. Login with user, attempt to upload any file small or large to folder using the web interface using either ‘+’ icon or drag and drop to window.

Expected behaviour

The file should be uploaded to the fold active in the web interface.

Actual behaviour

The progress flashes and no file is uploaded. JS console in browser shows:

h-t-t-p-s://xxxxxxx.com/remote.php/dav/files/uername/Documents/file.pdf 403 (Forbidden) jquery.js:8630

Then:
Uncaught TypeError: Cannot read property ‘documentElement’ of undefined file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:411

I tried current versions chrome, Safari and Firefox on Mac OS 10.13.6. All failed.

I then tried with FireFox 44 and the uploaded process worked. However, ownCload has a message saying to update the browser. When I updated the browser firefox 65 , I received the same failure as the other uploads with current browsers on the Mac.

Server configuration

Operating system:
Centos 7.6

Web server:
Apache 2.4

Database:
MariaDB 10.1

PHP version:
PHP 7.2

ownCloud version: (see ownCloud admin page)
System Status
installed 1
maintenance
needsDbUpgrade
version 10.1.0.4
versionstring 10.1.0
edition Community
productname ownCloud

Updated from an older ownCloud or fresh install:
Fresh clean install

Where did you install ownCloud from:
h-t-t-p-s://owncloud.org/download/

Signing status (ownCloud 9.0 and above):
No errors have been found.

Are you using external storage, if yes which one: local/smb/sftp/…
No local file system only

Are you using encryption: yes/no
No

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…
No

Client configuration

Browser:
Safari 12.0.3 Mac OS 10.3.6
Chrome 71.0.3578.98 Mac OS 10.3.6
FireFox 65 Mac OS 10.3.6
FireFox 65 Windows Server 2012R2 - Tested with RDP client

Operating system:
Mac OS 10.3.6
Windows Server 2012R2 - Tested with RDP client

jquery-migrate.min.js?v=0e09350b2949899f5968b3d22dc1e131:2 JQMIGRATE: Migrate is installed, version 1.4.0
js.js?v=0e09350b2949899f5968b3d22dc1e131:2311 Deprecation warning: tipsy is deprecated. Use tooltip instead.
jQuery.fn.tipsy @ js.js?v=0e09350b2949899f5968b3d22dc1e131:2311
(anonymous) @ backgroundjobs.js?v=0e09350b2949899f5968b3d22dc1e131:26
j @ jquery.js:3099
fireWith @ jquery.js:3211
ready @ jquery.js:3417
I @ jquery.js:3433
js.js?v=0e09350b2949899f5968b3d22dc1e131:2311 Deprecation warning: tipsy is deprecated. Use tooltip instead.
jQuery.fn.tipsy @ js.js?v=0e09350b2949899f5968b3d22dc1e131:2311
(anonymous) @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:1292
dispatch @ jquery.js:4435
r.handle @ jquery.js:4121
trigger @ jquery.js:4350
a.event.trigger @ jquery-migrate.min.js?v=0e09350b2949899f5968b3d22dc1e131:2
(anonymous) @ jquery.js:4901
each @ jquery.js:374
each @ jquery.js:139
trigger @ jquery.js:4900
_trigger @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:787
_beforeSend @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:826
(anonymous) @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:405
_onSend @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:941
(anonymous) @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:405
data.submit @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:674
(anonymous) @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:286
(anonymous) @ jquery.js:3256
j @ jquery.js:3099
add @ jquery.js:3145
(anonymous) @ jquery.js:3255
each @ jquery.js:374
(anonymous) @ jquery.js:3252
a.Deferred @ jquery-migrate.min.js?v=0e09350b2949899f5968b3d22dc1e131:2
then @ jquery.js:3251
submit @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:285
(anonymous) @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:650
.each..forEach @ underscore.js?v=0e09350b2949899f5968b3d22dc1e131:153
submitUploads @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:648
onNoConflicts @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:1098
checkExistingFiles @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:858
add @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:1120
_trigger @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:789
(anonymous) @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:1037
each @ jquery.js:374
_onAdd @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:1030
(anonymous) @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:405
(anonymous) @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:1276
j @ jquery.js:3099
add @ jquery.js:3145
always @ jquery.js:3246
_onDrop @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:1269
(anonymous) @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:405
handlerProxy @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:706
dispatch @ jquery.js:4435
r.handle @ jquery.js:4121
js.js?v=0e09350b2949899f5968b3d22dc1e131:2311 Deprecation warning: tipsy is deprecated. Use tooltip instead.
jQuery.fn.tipsy @ js.js?v=0e09350b2949899f5968b3d22dc1e131:2311
start @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:1133
_trigger @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:789
_beforeSend @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:826
(anonymous) @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:405
_onSend @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:941
(anonymous) @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:405
data.submit @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:674
(anonymous) @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:286
(anonymous) @ jquery.js:3256
j @ jquery.js:3099
add @ jquery.js:3145
(anonymous) @ jquery.js:3255
each @ jquery.js:374
(anonymous) @ jquery.js:3252
a.Deferred @ jquery-migrate.min.js?v=0e09350b2949899f5968b3d22dc1e131:2
then @ jquery.js:3251
submit @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:285
(anonymous) @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:650
.each..forEach @ underscore.js?v=0e09350b2949899f5968b3d22dc1e131:153
submitUploads @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:648
onNoConflicts @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:1098
checkExistingFiles @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:858
add @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:1120
_trigger @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:789
(anonymous) @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:1037
each @ jquery.js:374
_onAdd @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:1030
(anonymous) @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:405
(anonymous) @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:1276
j @ jquery.js:3099
add @ jquery.js:3145
always @ jquery.js:3246
_onDrop @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:1269
(anonymous) @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:405
handlerProxy @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:706
dispatch @ jquery.js:4435
r.handle @ jquery.js:4121
jquery.js:8630 PUT h-t-t-p-s://example.net/remote.php/dav/files/admin/Documents/file.pdf 403 (Forbidden)
send @ jquery.js:8630
ajax @ jquery.js:8166
send @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:906
(anonymous) @ jquery.js:3256
j @ jquery.js:3099
add @ jquery.js:3145
(anonymous) @ jquery.js:3255
each @ jquery.js:374
(anonymous) @ jquery.js:3252
a.Deferred @ jquery-migrate.min.js?v=0e09350b2949899f5968b3d22dc1e131:2
then @ jquery.js:3251
_onSend @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:950
(anonymous) @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:405
data.submit @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:674
(anonymous) @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:286
(anonymous) @ jquery.js:3256
j @ jquery.js:3099
add @ jquery.js:3145
(anonymous) @ jquery.js:3255
each @ jquery.js:374
(anonymous) @ jquery.js:3252
a.Deferred @ jquery-migrate.min.js?v=0e09350b2949899f5968b3d22dc1e131:2
then @ jquery.js:3251
submit @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:285
(anonymous) @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:650
.each..forEach @ underscore.js?v=0e09350b2949899f5968b3d22dc1e131:153
submitUploads @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:648
onNoConflicts @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:1098
checkExistingFiles @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:858
add @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:1120
_trigger @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:789
(anonymous) @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:1037
each @ jquery.js:374
_onAdd @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:1030
(anonymous) @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:405
(anonymous) @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:1276
j @ jquery.js:3099
add @ jquery.js:3145
always @ jquery.js:3246
_onDrop @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:1269
(anonymous) @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:405
handlerProxy @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:706
dispatch @ jquery.js:4435
r.handle @ jquery.js:4121
file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:411 Uncaught TypeError: Cannot read property ‘documentElement’ of undefined
at OC.FileUpload.getResponse (file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:411)
at HTMLInputElement.fail (file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:1217)
at .(/index.php/apps/files/anonymous function).(anonymous function)._trigger (h-t-t-p-s://example.net/core/vendor/jquery-ui/ui/jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:789:13) at .(/index.php/apps/files/anonymous function).(anonymous function)._onFail (h-t-t-p-s://example.net/apps/files/js/jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:876:18)
at $.(/index.php/apps/files/anonymous function).(anonymous function)._onFail (h-t-t-p-s://example.net/core/vendor/jquery-ui/ui/jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:405:25)
at Object. (jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:910)
at j (jquery.js:3099)
at Object.fireWith [as rejectWith] (jquery.js:3211)
at x (jquery.js:8266)
at XMLHttpRequest. (jquery.js:8605)
getResponse @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:411
fail @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:1217
_trigger @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:789
_onFail @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:876
(anonymous) @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:405
(anonymous) @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:910
j @ jquery.js:3099
fireWith @ jquery.js:3211
x @ jquery.js:8266
(anonymous) @ jquery.js:8605
load (async)
send @ jquery.js:8622
ajax @ jquery.js:8166
send @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:906
(anonymous) @ jquery.js:3256
j @ jquery.js:3099
add @ jquery.js:3145
(anonymous) @ jquery.js:3255
each @ jquery.js:374
(anonymous) @ jquery.js:3252
a.Deferred @ jquery-migrate.min.js?v=0e09350b2949899f5968b3d22dc1e131:2
then @ jquery.js:3251
_onSend @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:950
(anonymous) @ jquery-ui.custom.js?v=0e09350b2949899f5968b3d22dc1e131:405
data.submit @ jquery.fileupload.js?v=0e09350b2949899f5968b3d22dc1e131:674
(anonymous) @ file-upload.js?v=0e09350b2949899f5968b3d22dc1e131:286
(anonymous) @ jquery.js:3256
End truncated logs

Thanks,
Mike


#2

Hello,

As I continue testing, It seems that the Web UI will upload any size 'TXT file with a ‘TXT’ Extension, 70 byte or 24 Megabyte. However, trying to upload any other file type e.g. RTF of 6.5 KB results in the upload error.

It seems like clue, I’m unsure what to do with it.

  • Mike

#3

Hello,

I have figured out my web interface upload issue.

It seems that Mod_security apache module was the conflict.

When I disabled the Mod_security apache module the web interface uloads started working as you’d expect.

Holy moly that took a while to squeeze out.

Hope this helps someone else in the future.

  • Mike

Can't upload any file - PUT is forbidden (Owncloud 10.0.8)
#4

Hey,

it seems to me that mod_security (and various other modules) are known to cause such troubles:

https://doc.owncloud.org/server/administration_manual/issues/general_troubleshooting.html


#5

Hello,

Yes, I saw that after poking at this for a few days. When I disabled mod_security at the suggestion of the article Web UI uploads started working correctly.

  • Mike