Oc.js not accessible

help

#1

Please help us by providing the following info. Before posting please also check the pinned "Known issues" threads and make sure that you're running the latest available version for your oC release: https://owncloud.org/changelog/

Steps to reproduce
1. Browse to the login page.
2. Console shows Refused to execute script from 'https://baucum.me:8081/core/js/oc.js?v=b4f9a72e5516d3e34a08b43395f1bd8f' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
3. Browse to that file, see it show the login page again.

Expected behaviour
The login page should load and I should be able to login.

Actual behaviour
I got the error mentioned above.

Server configuration
Operating system: Ubuntu 16.04 64-bit
Web server: Nginx 1.10.0
Database: MySQL 5.7.13
PHP version: 7.0.8
ownCloud version (see ownCloud admin page): 9.0.1
Updated from an older ownCloud or fresh install: Updated from 8.x
ownCloud log (data/owncloud.log, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808): {"reqId":"iGW3T+9ZSsoAxIGPDBqt","remoteAddr":"","app":"cron","message":"Not installed","level":4,"time":"2016-05-02T03:00:01+00:00","method":"--","url":"--","user":"--"}

Special configuration (external storage, external authentication, reverse proxy, server-side-encryption): Nothing extraordinary.

Integrity status for oC9+
The integrity route just keeps redirecting to the login page over and over again.

My owncloud instance was working. I think it broke after running upgrades on my server which did a point upgraded of PHP7. I am not running PHP with any special PPAs.


#2

This doesn't look good. Can you check your owncloud-folder, if there is a config/config.php-file and the data/-folder is not empty. Do you use the owncloud-repository (apt-cache policy owncloud)?

If you find the data-folder, the config.php, and the database, make a backup before you proceed.


#3

Yes, my config file is there.

➜  owncloud ls config/config.php
config/config.php

I have my datadirectory configured at /var/owncloud/data. I didn't think about this when making the above post. Here's the tail of the owncloud.log file.

{"reqId":"ITZkKPSTIo\/\/UkUmm\/ts","remoteAddr":"98.230.108.71","app":"PHP","message":"stream_copy_to_stream() expects parameter 3 to be integer, string given at \/usr\/share\/nginx\/owncloud_9_0_1\/3rdparty\/sabre\/http\/lib\/Sapi.php#78","level":3,"time":"2016-07-22T13:18:06+00:00","method":"GET","url":"\/remote.php\/webdav\/emulation\/Sega%20Saturn\/roms\/Enemy%20Zero%20(1996)(Sega)(JP).zip","user":"maxolasersquad"}
{"reqId":"mcW2ewPJT2RwnuOT1gZ4","remoteAddr":"98.230.108.71","app":"PHP","message":"stream_copy_to_stream() expects parameter 3 to be integer, string given at \/usr\/share\/nginx\/owncloud_9_0_1\/3rdparty\/sabre\/http\/lib\/Sapi.php#78","level":3,"time":"2016-07-22T13:20:41+00:00","method":"GET","url":"\/remote.php\/webdav\/emulation\/Sega%20Saturn\/roms\/Enemy%20Zero%20(1996)(Sega)(JP).zip","user":"maxolasersquad"}
{"reqId":"4NFRLHaYm5iRzbDFXqRQ","remoteAddr":"98.230.108.71","app":"PHP","message":"stream_copy_to_stream() expects parameter 3 to be integer, string given at \/usr\/share\/nginx\/owncloud_9_0_1\/3rdparty\/sabre\/http\/lib\/Sapi.php#78","level":3,"time":"2016-07-22T13:23:07+00:00","method":"GET","url":"\/remote.php\/webdav\/emulation\/Sega%20Saturn\/roms\/Enemy%20Zero%20(1996)(Sega)(JP).zip","user":"maxolasersquad"}
{"reqId":"HhP552GGU1xPUjNPk840","remoteAddr":"98.230.108.71","app":"PHP","message":"stream_copy_to_stream() expects parameter 3 to be integer, string given at \/usr\/share\/nginx\/owncloud_9_0_1\/3rdparty\/sabre\/http\/lib\/Sapi.php#78","level":3,"time":"2016-07-22T15:25:06+00:00","method":"GET","url":"\/remote.php\/webdav\/emulation\/Sega%20Saturn\/roms\/Enemy%20Zero%20(1996)(Sega)(JP).zip","user":"maxolasersquad"}
{"reqId":"SCwGL3xo3YNZJTMQYlUD","remoteAddr":"98.230.108.71","app":"PHP","message":"stream_copy_to_stream() expects parameter 3 to be integer, string given at \/usr\/share\/nginx\/owncloud_9_0_1\/3rdparty\/sabre\/http\/lib\/Sapi.php#78","level":3,"time":"2016-07-22T17:27:06+00:00","method":"GET","url":"\/remote.php\/webdav\/emulation\/Sega%20Saturn\/roms\/Enemy%20Zero%20(1996)(Sega)(JP).zip","user":"maxolasersquad"}
{"reqId":"\/YVZJZW\/Q62MT5eAWMja","remoteAddr":"98.230.108.71","app":"PHP","message":"stream_copy_to_stream() expects parameter 3 to be integer, string given at \/usr\/share\/nginx\/owncloud_9_0_1\/3rdparty\/sabre\/http\/lib\/Sapi.php#78","level":3,"time":"2016-07-22T19:29:15+00:00","method":"GET","url":"\/remote.php\/webdav\/emulation\/Sega%20Saturn\/roms\/Enemy%20Zero%20(1996)(Sega)(JP).zip","user":"maxolasersquad"}
{"reqId":"mxmQRbdzkQHmdCM6ZajG","remoteAddr":"98.230.108.71","app":"PHP","message":"stream_copy_to_stream() expects parameter 3 to be integer, string given at \/usr\/share\/nginx\/owncloud_9_0_1\/3rdparty\/sabre\/http\/lib\/Sapi.php#78","level":3,"time":"2016-07-22T21:31:19+00:00","method":"GET","url":"\/remote.php\/webdav\/emulation\/Sega%20Saturn\/roms\/Enemy%20Zero%20(1996)(Sega)(JP).zip","user":"maxolasersquad"}
{"reqId":"2U833xjATcbkRINvzjXl","remoteAddr":"","app":"PHP","message":"Exception: The requested uri() cannot be processed by the script '\/ocs\/v1.php') at \/usr\/share\/nginx\/owncloud_9_0_1\/lib\/private\/appframework\/http\/request.php#621","level":3,"time":"2016-08-03T22:04:40+00:00","method":"GET","url":"--","user":"--"}
{"reqId":"BvAM0wZu1J2sYIICTi0x","remoteAddr":"","app":"PHP","message":"Error: Call to undefined function OC\App\simplexml_load_file() at \/usr\/share\/nginx\/owncloud_9_0_1\/lib\/private\/app\/infoparser.php#60","level":3,"time":"2016-08-25T01:35:47+00:00","method":"GET","url":"--","user":"--"}
{"reqId":"BvAM0wZu1J2sYIICTi0x","remoteAddr":"","app":"PHP","message":"PHP Startup: Unable to load dynamic library '\/usr\/lib\/php\/20151012\/zip.so' - \/usr\/lib\/php\/20151012\/zip.so: cannot open shared object file: No such file or directory at Unknown#0","level":3,"time":"2016-08-25T01:35:47+00:00","method":"GET","url":"--","user":"--"}

➜  ls -l /usr/lib/php/20151012/zip.so
-rw-r--r-- 1 root root 54844 Jul 27 15:49 /usr/lib/php/20151012/zip.so

#4

You have a 64bit system. Anyway, before doing any research and further debugging, use the current 9.0.4 version.

Also note that the nginx configuration template has changed between versions 8.2.x and 9.0.x (see documentation).


#5

I went line-by-line through the example nginx configuration and made many updates. I will pull in 9.0.4 and report back.


#6

I tried 9.0.4 but it won't even get me to the login page. It returns a 500 error. Nginx logs are as follows.

Stack trace:
#0 /usr/share/nginx/owncloud_9_0_4/lib/base.php(529): OC_Response::setStatus(503)
#1 /usr/share/nginx/owncloud_9_0_4/lib/base.php(1137): OC::init()
#2 /usr/share/nginx/owncloud_9_0_4/index.php(37): require_once('/usr/share/ngin...')
#3 {main}
  thrown in /usr/share/nginx/owncloud_9_0_4/lib/private/response.php on line 77" while reading response header from upstream, client: 98.230.108.71, server: baucum.me:8081, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "baucum.me:8081"