No files shown in the web interface and many JavaScript errors in the console after fresh ownCloud 9.0.0 installation #23199

Closed
perohen opened this Issue Mar 13, 2016 · 24 comments

Projects

None yet

5 participants

@perohen
perohen commented Mar 13, 2016

Steps to reproduce

  1. Install ownCloud from zip file
  2. Run the Installation Wizard
  3. Log in

Expected behaviour

I should be able to start using the application and upload my files and directories.

Actual behaviour

After logging in neither skeleton files nor upload functions are shown in the web interface. I also see many JavaScript errors in the Google Chrome's JavaScript console.

kuva 4

Server configuration

Operating system:
CentOS Linux 7.2.1511 / Linux 3.10.0-229.7.2.el7.x86_64 on x86_64

Web server:
Apache 2.4.6

Database:
MySQL 5.5.44

PHP version:
5.6.5 / rh-php56 2.0-6.el7.centos

ownCloud version: (see ownCloud admin page)
ownCloud 9.0.0 (stable)

Updated from an older ownCloud or fresh install:
Fresh install

Where did you install ownCloud from:
https://download.owncloud.org/community/owncloud-9.0.0.zip

Signing status (ownCloud 9.0 and above):

No errors have been found.

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder

The content of config/config.php:

<?php
$CONFIG = array (
  'instanceid' => '<removed>',
  'passwordsalt' => '<removed>',
  'secret' => '<removed>',
  'trusted_domains' => 
  array (
    0 => '<removed>',
  ),
  'datadirectory' => '/home/test/owncloud_data',
  'overwrite.cli.url' => '<removed>',
  'dbtype' => 'mysql',
  'version' => '9.0.0.19',
  'dbname' => '<removed>',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_beta-yllapito',
  'dbpassword' => '<removed>',
  'logtimezone' => 'UTC',
  'installed' => true,
);

Are you using external storage, if yes which one: local/smb/sftp/...
No

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:
Google Chrome 48.0.2564.116 m

Operating system:
Windows 7

Logs

Web server error log

Empty

ownCloud log (data/owncloud.log)

Empty

Browser log

The javascript console log:

GET http://xxxx/owncloud/core/js/oc.js?v=2283f8413653a56b24f06ec30a36f55b 
Uncaught ReferenceError: oc_appconfig is not defined
Uncaught TypeError: Cannot read property 'substring' of undefined
Uncaught ReferenceError: oc_isadmin is not defined
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
GET http://xxxx/owncloud/core/js/oc.js?v=2283f8413653a56b24f06ec30a36f55b&_=1457879632794 404 (Not Found)
Uncaught SyntaxError: Unexpected identifier
Uncaught TypeError: Cannot read property 'meta' of undefined
@perohen
perohen commented Mar 13, 2016

I just noticed that if I open the oc.js file on my browser it says: "No input file specified." But if I change the url from http://mydomain/owncloud/core/js/oc.js?v=2283f8413653a56b24f06ec30a36f55b to http://mydomain/owncloud/**index.php**/core/js/oc.js?v=2283f8413653a56b24f06ec30a36f55b the file opens normally.

Maybe this problem is caused by the new .htaccess file, because I don't have this problem with ownCloud 8.2?

Still I don't know what those other error messages are and what should I change in the .htaccess file to get oc.js file working.

@ghost
ghost commented Mar 13, 2016

Can you try the patch in #23029

@perohen
perohen commented Mar 13, 2016

I made new installation where I changed those two edited files to new ones in patch #23029, but now I get "500 Internal Server Error" message and nothing is working. However, it might be that I did something wrong as I'm new to Github.

@PVince81
Collaborator

@perohen if you could explain how you patched it and post the error from the log, we might be able to help you

@perohen
perohen commented Mar 14, 2016

@PVince81

  1. I downloaded https://raw.githubusercontent.com/owncloud/core/bc4a043a7645efe207e3f1208ac3dea41b056384/.htaccess and https://raw.githubusercontent.com/owncloud/core/bc4a043a7645efe207e3f1208ac3dea41b056384/lib/private/setup.php files
  2. Then I overwrote the original ones in the owncloud-9.0.0.zip file that I downloaded from https://download.owncloud.org/community/owncloud-9.0.0.zip
  3. I made new installation
  4. I got "500 Internal Server Error" message
  5. Error in the server log was: .htaccess: Expected </IfModule> but saw </IfModule>###>
  6. I fixed that and now I can see the web interface, but still I can't see any files or folders (see the screenshot on the opening post) so I'm back to square one
@olimination

Hi,

I tried to remove the line (mentioned in the patch #23029):

RewriteRule .* index.php [PT,E=PATH_INFO:$1]

but this did not solve the problem on my shared hosting.

The following .htaccess change was successfull for me. I changed the lines:

From:

RewriteRule ^core/js/oc.js$ index.php/core/js/oc.js [PT,E=PATH_INFO:$1]
RewriteRule ^core/preview.png$ index.php/core/preview.png [PT,E=PATH_INFO:$1]

To:

  RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]
  RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]

But I'm not familiar with the code in overall, so maybe @LukasReschke could review this.

For the moment this fix works for me what I've seen so far...

@LukasReschke
Member

@olimination @perohen Please try again with the files from https://download.owncloud.org/community/owncloud-daily-stable9.tar.bz2 and report whether a complete reinstall worked for you

@olimination

Unfortunately I still face the same issue (core/js/oc.js file not found) after a complete reinstall with your mentioned download above.
Version installed now: ownCloud 9.0.0 (daily) Build:2016-03-17T03:46:56+00:00 ed4ed0e

@LukasReschke
Member

@olimination Can you post what kind of environment you use so I can reproduce this locally? Thanks a lot.

(e.g. install CentOS XYZ, execute yum …, do xyz, open bar)

@LukasReschke LukasReschke self-assigned this Mar 17, 2016
@LukasReschke
Member

This was btw. the case before a936107 as changed in #20879. Given the recent changes done to .htaccess this may not be required anymore… Let me see…

@olimination

I have installed in on my Shared Hosting (hostpoint.ch, FreeBSD 10.2, Apache 2.2, PHP 5.6.18) account with the following steps:

  1. Downloaded https://download.owncloud.org/community/owncloud-daily-stable9.tar.bz2
  2. Copy it to my document root
  3. Unpacked it to the root level of my docroot
  4. Accessed my.domain.org to start the Installation wizard
  5. Entered my installation configuration: Admin user, mysql database configs, etc.
  6. Clicked on "Finish" button
  7. After installation, reloaded same page
  8. Checked Browser Console and saw the Not Found request for the core/js/oc.js file
  9. That's it

Could it be that the current .htaccess is optimized for handling Upgrades properly but not fresh installations?

@LukasReschke
Member

Could it be that the current .htaccess is optimized for handling Upgrades properly but not fresh installations?

Nah. Should work for both, also works fine for all the other users out there. So there seems to be something different here. I'll try to see whether changing this back would work 😕

@LukasReschke LukasReschke added bug and removed needs info labels Mar 17, 2016
@perohen
perohen commented Mar 17, 2016

@LukasReschke

I made new installation with the files from https://download.owncloud.org/community/owncloud-daily-stable9.tar.bz2 and I still have the same problem.

@olimination

The following .htaccess change was successfull for me. I changed the lines:

From:

RewriteRule ^core/js/oc.js$ index.php/core/js/oc.js [PT,E=PATH_INFO:$1]
RewriteRule ^core/preview.png$ index.php/core/preview.png [PT,E=PATH_INFO:$1]

To:

RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]
RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]

This solution worked. Thank you!

@LukasReschke
Member

This solution worked. Thank you!

This will break other stuff. That's not the proper solution 😉

@perohen
perohen commented Mar 17, 2016

@LukasReschke

This solution worked. Thank you!

This will break other stuff. That's not the proper solution 😉

Okay. At least I can see the files, but I will use ownCloud 8.2.3 on my production sites until this is fixed.

@olimination

If I access the oc.js directly like: http://my.domain/core/js/oc.js I receive a "No input file specified" message.

@LukasReschke LukasReschke added a commit that referenced this issue Mar 17, 2016
@LukasReschke LukasReschke Use raw PATH_INFO
PATH_INFO will be empty at this point and thus the logic in base.php did not catch this. Changing this to "getRawPathInfo" will ensure that the path info is properly read.

Fixes #23199
24abe1e
@LukasReschke
Member

@olimination @perohen Can I ask you to test the patch from #23369?

@perohen
perohen commented Mar 17, 2016

@LukasReschke

How I can test patch #23369 and how I notice difference between @olimination's solution and your solution?

@olimination

Is it enough if I just adapt these two changed files according to your changes? Or should I do again a fresh installation?

@LukasReschke
Member

How I can test patch #23369 and how I notice difference between @olimination's solution and your solution?

The difference basically happens when you try to update ownCloud. So try @olimination's change without my base.php adjustment and then increase $OC_Version in version.php (the last number) by 1. Then load ownCloud again and you see that the update will be broken. With my changes it should work.

Is it enough if I just adapt these two changed files according to your changes? Or should I do again a fresh installation?

I'd go with a fresh install for testing. Would also be interesting to see you test the update scenario as written above.

@PVince81 PVince81 added the sev2-high label Mar 17, 2016
@olimination

I have tested now a fresh installation and the update scenario, both worked so far.

How did I test?

  1. Used the same daily-stable9 package mentioned above
  2. Before calling the Installation Wizard, I adapted the lib/base.php and the .htaccess according to #23369
  3. Finished Installation wizard
  4. Worked (had code integrity issue, but because of the manual file changes)

Thank you for the help so far. I assume you still need to do some further tests before the fix will be available in the mainline right?

I would like to finalize my owncloud setup. Is it ok if I install again the stable 9.0 version and patch the files manually? Or does this then make problem during next point release update? What would you recommend? Thanks.

@LukasReschke
Member

@olimination THX for testing. Can you comment that on the PR as well?

stable9 with those adjustments should work fine :)

@LukasReschke LukasReschke added a commit that referenced this issue Mar 18, 2016
@LukasReschke LukasReschke Use raw PATH_INFO
PATH_INFO will be empty at this point and thus the logic in base.php did not catch this. Changing this to "getRawPathInfo" will ensure that the path info is properly read.

Fixes #23199
d9b632c
@perohen
perohen commented Mar 18, 2016

@LukasReschke

Sorry that I didn't had time to test this yesterday. Now I made test and everything seems to be working.

Thank you I really appreciate your help!

Should I now close this issue or is this still in progress?

@LukasReschke
Member

Should I now close this issue or is this still in progress?

Please leave it open and also comment at #23383 and #23369, thanks a lot 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment