Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade from stable45 to master broken #1520

Closed
schiessle opened this issue Feb 7, 2013 · 43 comments
Closed

Upgrade from stable45 to master broken #1520

schiessle opened this issue Feb 7, 2013 · 43 comments
Labels

Comments

@schiessle
Copy link
Contributor

I started with a fresh installation based on the stable45 branch. Than I upgraded to master. The browser shows "Updating ownCloud to version 5.0 pre alpha, this may take a while." forever.

no apache error_log messages, owncloud.log:

{"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1360230185}
{"app":"core","message":"starting upgrade from 4.90.7 to 4.91.9","level":0,"time":1360230185}
{"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1360230185}
{"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1360230185}
{"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1360230186}
{"app":"files","message":"starting app upgrade from 1.1.6 to 1.1.7","level":0,"time":1360230186}
{"app":"contacts","message":"starting app upgrade from 0.2.4 to 0.2.5","level":0,"time":1360230187}
{"app":"gallery","message":"starting app upgrade from 0.5.1 to 0.5.2","level":0,"time":1360230190}
@eMerzh
Copy link
Member

eMerzh commented Feb 7, 2013

No idea if it's related or not, could you give us the DB server and the web server ?(type and version)

(and maybe DB logs? )

@schiessle
Copy link
Contributor Author

I'm using sqlite and the Apache web server

@MTRichards
Copy link
Contributor

Also a problem here, I can't make the Alpha 5.0.0 release from today update. I get a blank screen . No error logs for me though, I am looking at nothing happening in the browser.

Steps to repeat:
Take ownCloud 4.5.6 with MySQL or SQLite (I tested both)
Rename the oencloud folder to owncloud old
Copy the 5.0.0 release to the ownCloud folder
Copy the config file and the data directory over to the new ownCloud directory
Set permissions correctly
Open browser and get the splash screen for upgrade happening, and enterring maintenance, listing the updates (happened so fast I couldn't get the list of what it did)
Then a blank screen shows up at this URL: http://192.168.1.33/owncloud/index.php/post-setup-check

NEXT:
Delete config.php
Go to /owncloud in the browser and re-enter setup data
Click ok
get a blank screen (http://192.168.1.33/owncloud/index.php/post-setup-check)

So now I am stuck.

No entries in ownCloud.log

Ubuntu 12.04
Firefox
ownCloud 5.0.0 alpha 1

@bartv2
Copy link
Contributor

bartv2 commented Feb 22, 2013

I tested this with 4.5.5 and then updating to master (2184473) works for me with sqlite.

@MTRichards that page does the webdav check. can you create a new issue for that? This is about something else.

edit: this is with a plain core install

@BernhardPosselt
Copy link
Contributor

Does this still happen? Possibly related to #999 ?

@schiessle
Copy link
Contributor Author

I just tried it again. It seems like the problem I experience is related to webdav mounts. If I upgrade from OC4.5.6 to master without an external webdav mount everything works fine.

But if a webdav mount is configured I get at page which only says "Updating ownCloud to version 5.0 beta 2, this may take a while."

If I edit my config.php and remove "'maintenance' => true" and reload the web page the update routine will finish successfully.

@MTRichards
Copy link
Contributor

I was also testing DropBox mounts with external storage, so this is very likely the cause for me too.

MTGap pushed a commit that referenced this issue Mar 2, 2013
@MTRichards
Copy link
Contributor

snapshot8
Didn't upgrade. Tested with 4.5.7 and the latest March 2 2013 master as of 4PM ET (US). Stuck in maintenance mode. Note: I had external storage activated during the upgrade.

@LukasReschke
Copy link
Member

@MTRichards Remove the maintenance from config/config.php

@MTRichards
Copy link
Contributor

I did, and it works - as suggested above. Problem is simply that this shouldn't be necessary.

@MTGap
Copy link
Contributor

MTGap commented Mar 3, 2013

@LukasReschke @MTRichards Irrelevant to fixing the issue. Maintenance mode is turned on during the update process, something is causing it not to run completely the first time.

@MTRichards The change I made in #2035 is not in master. We need to get you setup with git ;) Skype me when you have the time.

@karlitschek
Copy link
Contributor

It would be great if you guys would find a way how to reproduce and fix this. We can't ship ownCloud 5 with a broken upgrade path.

@BernhardPosselt
Copy link
Contributor

Is this fixed?

@BernhardPosselt
Copy link
Contributor

What ive done:

  • Installed 4.5.7, created some stuff
  • cloned apps, core and 3rdparty
  • moved owncloud to owncloudold
  • copied data and config directory into core
  • copied apps into core/apps

Refreshed browser and i got: Updating ownCloud to version 5.0 RC 2, this may take a while.

Nothing happens. After refresh im in maintainenance mode.

Remove the maintenance mode from the config.php, refresh page again: im now again in maintenance mode, it upgrades and redirects me. Everything works correctly. Except the wheels keep spinning in the contacts app.

@MTGap
Copy link
Contributor

MTGap commented Mar 7, 2013

Can you check the javascript console? #2120 should have cleared the cache.

@BernhardPosselt
Copy link
Contributor

@MTGap you're right, clearing the cache fixed it. Tried it with both firefox and chromium

@MTGap
Copy link
Contributor

MTGap commented Mar 7, 2013

No. I didn't ask you to clear the cache. The code is supposed to clear the cache before the update starts.

@MTGap MTGap reopened this Mar 7, 2013
@BernhardPosselt
Copy link
Contributor

I think this clears the server side cache only, not the client side cache (your update). I've cleared the clientside cache.

@MTGap
Copy link
Contributor

MTGap commented Mar 7, 2013

It resolved it for me when I saw that Chromium was using an old javascript file.

@bartv2 Can you look into it? Is OCP\Response::disableCaching(); also required?

@bartv2
Copy link
Contributor

bartv2 commented Mar 8, 2013

We ask the browser to check the etag of the core.js and core.css files with every request. Maybe we aren't doing that correctly.

@MTGap
Copy link
Contributor

MTGap commented Mar 8, 2013

@bartv2 So, you're saying clearing the cache of both core.js and core.css should force the browser to clear its own cache?

It was the solution for me on Chromium so are other browsers not working correctly with the update?

@bartv2
Copy link
Contributor

bartv2 commented Mar 8, 2013

@MTGap we can't force the browser to clear the cache from the server, we could look for a js solution. But I don't know if it is possible with js.

@VicDeo
Copy link
Member

VicDeo commented Mar 8, 2013

The simplest solution is to add OC version or some version-dependent flavor to the core.* files, e.g. core.4.5.7.js, but it's too late for OC 5.

@MTGap
Copy link
Contributor

MTGap commented Mar 8, 2013

Can anyone confirm that changing the name of core.js resolves the problem. I'm having no issues with Chromium.

@Raydiation @MTRichards

lib/templatelayout.php line 47 Change:
$this->append( 'jsfiles', OC_Helper::linkToRemoteBase('core.js', false));
to:
$this->append( 'jsfiles', OC_Helper::linkToRemoteBase('core.js', false).'?5');

@BernhardPosselt
Copy link
Contributor

@VicDeo im against that solution, this is very, very likely to cause other breakage.

@MTGap will test tomorrow

@tanghus
Copy link
Contributor

tanghus commented Mar 9, 2013

I thought about @MTGap s solution as well. It's very simple, can't break anything that I can think of, and would reduce non-issue bug reports significantly (many issues are sorted by telling users to Shift-reload). It should be appliead to all other styles and scripts too.

@MTGap
Copy link
Contributor

MTGap commented Mar 10, 2013

@tanghus I think it just needs to be applied there because everything gets minimized into core.js.

@karlitschek your opinion?

@Raydiation did it work?

@tanghus
Copy link
Contributor

tanghus commented Mar 10, 2013

@MTGap Hmm, on my installation only core stuff seems to go into core js. DEBUG not defined:

<script type="text/javascript" src="/owncloud/remote.php/core.js"></script>
<script type="text/javascript" src="/owncloud/apps/files/js/jquery.iframe-transport.js"></script>
<script type="text/javascript" src="/owncloud/apps/files/js/jquery.fileupload.js"></script>
<script type="text/javascript" src="/owncloud/apps/files/js/jquery-visibility.js"></script>
<script type="text/javascript" src="/owncloud/apps/files/js/filelist.js"></script>
<script type="text/javascript" src="/owncloud/apps/files/js/fileactions.js"></script>
<script type="text/javascript" src="/owncloud/apps/files/js/files.js"></script>
<script type="text/javascript" src="/owncloud/apps/files/js/keyboardshortcuts.js"></script>

Am I missing anything?

@MTGap
Copy link
Contributor

MTGap commented Mar 10, 2013

Oh, I didn't realize that. The important file during the update is eventsource.js which is in core.

I was also thinking about just copying eventsource.js directly into the update template.

@MTGap
Copy link
Contributor

MTGap commented Mar 16, 2013

@karlitschek What are we going to do...?

@tanghus
Copy link
Contributor

tanghus commented Mar 16, 2013

I've already had several bug reports where a Shift-reload was the solution, so adding the version as parameter to js and css would really be helpful - both for users and issue triagers ;)

@BernhardPosselt
Copy link
Contributor

@MTGap what about appending a GET parameter to the url that does nothing and does not break compability

for instance core.js?version=5.0

@karlitschek
Copy link
Contributor

Sounds like a good idea. Should work, no?

@danimo
Copy link
Contributor

danimo commented Mar 19, 2013

yes. That's common practice to trick caches. If we have files that are more dynamic (i.e. also change within versions because they can contains custom content), the get parameter is usually a hash over the contents.

@tanghus
Copy link
Contributor

tanghus commented Mar 19, 2013

We should just use the full version number for the parameter. If people update from git they should know to empty the cache, but it is crucial that all js gets refreshed, and as mentioned above not all js is delivered by core.js

@tanghus
Copy link
Contributor

tanghus commented Mar 19, 2013

PR at #2440

BernhardPosselt added a commit that referenced this issue Mar 19, 2013
Add hashed version parameter to js and css. Ref #1520 and many more ;)
@davidak
Copy link
Member

davidak commented Mar 19, 2013

i had installed 4.5.8 with sqlite and added some files (ca. 2000) ... then making a manually update to 5.0 ... getting maintenance mode every time!

php 5.3.10

{"app":"core","message":"starting upgrade from 4.90.9 to 5.0.0","level":0,"time":1363705444} {"app":"PHP","message":"xcache_unset_by_prefix(): xcache.var_size is either 0 or too small to enable var data caching at \/var\/www\/oc\/lib\/cache\/xcache.php#53","level":2,"time":1363705444} {"app":"PHP","message":"xcache_unset_by_prefix(): xcache.var_size is either 0 or too small to enable var data caching at \/var\/www\/oc\/lib\/cache\/xcache.php#53","level":2,"time":1363705444} {"app":"PHP","message":"xcache_unset_by_prefix(): xcache.var_size is either 0 or too small to enable var data caching at \/var\/www\/oc\/lib\/cache\/xcache.php#53","level":2,"time":1363705444} {"app":"PHP","message":"xcache_unset_by_prefix(): xcache.var_size is either 0 or too small to enable var data caching at \/var\/www\/oc\/lib\/cache\/xcache.php#53","level":2,"time":1363705444} {"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1363705444} {"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1363705444}

Chrome JS Console:
2013-03-19 16_04_25-ownCloud

this problem is fixed by deleting the browser cache:

{"app":"core","message":"starting upgrade from 4.90.9 to 5.0.0","level":0,"time":1363706198} {"app":"PHP","message":"xcache_unset_by_prefix(): xcache.var_size is either 0 or too small to enable var data caching at \/var\/www\/oc\/lib\/cache\/xcache.php#53","level":2,"time":1363706198} {"app":"PHP","message":"xcache_unset_by_prefix(): xcache.var_size is either 0 or too small to enable var data caching at \/var\/www\/oc\/lib\/cache\/xcache.php#53","level":2,"time":1363706198} {"app":"PHP","message":"xcache_unset_by_prefix(): xcache.var_size is either 0 or too small to enable var data caching at \/var\/www\/oc\/lib\/cache\/xcache.php#53","level":2,"time":1363706198} {"app":"PHP","message":"xcache_unset_by_prefix(): xcache.var_size is either 0 or too small to enable var data caching at \/var\/www\/oc\/lib\/cache\/xcache.php#53","level":2,"time":1363706198} {"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1363706198} {"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1363706198} {"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1363706198} {"app":"files","message":"starting app upgrade from 1.1.6 to 1.1.7","level":0,"time":1363706200} {"app":"files_versions","message":"starting app upgrade from 1.0.2 to 1.0.3","level":0,"time":1363706200} {"app":"contacts","message":"starting app upgrade from 0.2.4 to 0.2.5","level":0,"time":1363706200} {"app":"gallery","message":"starting app upgrade from 0.5.1 to 0.5.2","level":0,"time":1363706201} {"app":"files_pdfviewer","message":"starting app upgrade from 0.1 to 0.2","level":0,"time":1363706201} {"app":"bookmarks","message":"starting app upgrade from 0.2 to 0.3","level":0,"time":1363706201} {"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1363706202} {"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1363706205} {"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1363706205} {"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1363706205} {"app":"PHP","message":"xcache_get(): xcache.var_size is either 0 or too small to enable var data caching at \/var\/www\/oc\/lib\/cache\/xcache.php#27","level":2,"time":1363706205} {"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1363706205} {"app":"PHP","message":"xcache_get(): xcache.var_size is either 0 or too small to enable var data caching at \/var\/www\/oc\/lib\/cache\/xcache.php#27","level":2,"time":1363706205} {"app":"PHP","message":"xcache_set(): xcache.var_size is either 0 or too small to enable var data caching at \/var\/www\/oc\/lib\/cache\/xcache.php#34","level":2,"time":1363706205} {"app":"PHP","message":"xcache_isset(): xcache.var_size is either 0 or too small to enable var data caching at \/var\/www\/oc\/lib\/cache\/xcache.php#39","level":2,"time":1363706205} {"app":"PHP","message":"xcache_set(): xcache.var_size is either 0 or too small to enable var data caching at \/var\/www\/oc\/lib\/cache\/xcache.php#34","level":2,"time":1363706206} {"app":"PHP","message":"xcache_isset(): xcache.var_size is either 0 or too small to enable var data caching at \/var\/www\/oc\/lib\/cache\/xcache.php#39","level":2,"time":1363706206} {"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1363706206} {"app":"core","message":"Adding user backend instance of OC_User_Database.","level":0,"time":1363706206}

i think you released 5.0 to early without enough testing of the update routine!

@LukasReschke
Copy link
Member

i think you released 5.0 to early without enough testing of the update routine.

I think there were a way to less community testers as we announced every beta and RC release on our mailingslists (announcements + packaging + owncloud) but didn't get much feedback ;-)

@davidak
Copy link
Member

davidak commented Mar 19, 2013

it would be helpful to have the RCs in the official RSS-Feed.

i have tested the rc1 of 5.0 but dont update any older version...
is there a test checklist which get processed by testers for such releases?

could you automate the update process with jenkins or unittests to catch such errors?

@halfgaar
Copy link

Testing would be easier if one could more easily make a copy of the installed environment+DB and configure a second virtual host in apache. I used to do this by copying the owncloud dir and modifying config.php to point to the copied data path. However, since owncloud 5, the paths are hardcoded in the 'oc_storage' table, which makes rolling out an acceptance environment harder. People who do, might inadvertenly modify the production files.

@bartv2
Copy link
Contributor

bartv2 commented Apr 6, 2013

Closed, because this issue is fixed with the version tag on core.js

@bartv2 bartv2 closed this as completed Apr 6, 2013
@tobby88
Copy link

tobby88 commented Jun 18, 2013

My Owncloud went to maintenance mode after the automatic upgrade from 5.0.6 to 5.0.7...

@VicDeo
Copy link
Member

VicDeo commented Jun 18, 2013

@tobby88 it's not that bad. Maintenance mode means that update process was initiated.
If it takes too long, check the latest entries in data/owncloud.log.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.