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

Already on GitHub? Sign in to your account

Update failed 5.0.7->5.0.8 #4005

Closed
dragotin opened this Issue Jul 10, 2013 · 37 comments

Comments

Projects
None yet
Owner

dragotin commented Jul 10, 2013

I installed my fresh built 5.0.8 packages from isv:ownCloud:community on my production server and hit the root url. Update started but did not finish, it ended up displaying the message "Aktualisiere ownCloud auf Version 5.0.8. Dies könnte eine Weile dauern."

In the browsers Web console, this error message is displayed:

[12:12:28.041] SyntaxError: JSON.parse: unexpected character @ https://pjatniza.net/owncloud/core/js/eventsource.js?v=4424d2deec2f9468fb61e2db07ecd6b6:113
Member

karlitschek commented Jul 10, 2013

@blizzz Can you have a look? Thanks :-)

Owner

DeepDiver1975 commented Jul 10, 2013

The reason for this is that the request token is missing and therefore the ajax upgrade calls fail.
I had this issue in the past 2 weeks with custom themes which have not been updated properly.

@dragotin Are there custom themes in place?

Owner

DeepDiver1975 commented Jul 10, 2013

Are there custom themes in place?

no - obviously not as far as I can see from the web page

Owner

dragotin commented Jul 10, 2013

No, not that I know of.

Owner

dragotin commented Jul 10, 2013

now on @blizzz advise I disabled maintenance mode in config.php and reloaded. That did the upgrade again which now worked. Everything now back to normal.

Owner

DeepDiver1975 commented Jul 10, 2013

still would be good to know the reason - anything in the logs? THX

Owner

dragotin commented Jul 10, 2013

this time only once:

{"app":"core","message":"starting upgrade from 5.0.12 to 5.0.14","level":2,"time":1373454983}
Contributor

blizzz commented Jul 10, 2013

I have no idea what went wrong. Where not able to reproduce it myself and with the second attempt neither. Is it still possible the request token could have affected it? Maybe an outdated one?

Contributor

blizzz commented Jul 10, 2013

rather not, @dragotin says it was a newly opened tab.

Contributor

blizzz commented Jul 10, 2013

Have the same issue on my production system, but not more information. An idea @icewind1991 @MTGap ?

apunkt commented Jul 10, 2013

Used openSUSE build service to upgrade 5.0.7 -> 5.0.8. in Ubuntu 12.10.

OC was not put to maintenance mode. Just delivers empty pages.
Status shows : {"installed":"true","version":"5.0.14","versionstring":"5.0.8","edition":""}

Putting it to maintenance mode manually does not work.
Looking for a fix, any other page except status.php delivers a blank html page :-/

Contributor

blizzz commented Jul 10, 2013

@apunkt sounds like something else, I guess it outputs HTTP 500 errors? New report please.

Member

enoch85 commented Jul 10, 2013

As always ownCloud got stuck in maintenance mode again after update.

I use Ubuntu server 12.04 LTS
Update from 5.0.7 --> 5.0.8
Command: apt-get update, apt-get upgrade

Had to manually set maintenance mode to "false" in config.php and then reboot to get it working.

I thought you had fixed this?

Contributor

blizzz commented Jul 10, 2013

Meanwhile, the following works to reproduce it:

  1. install 5.0.7
  2. close browser tab
  3. copy 5.0.8 files over it
  4. go to browser to upgrade
  5. it fails according to @dragotin s decsription

There is no reasonable debug output.

Contributor

blizzz commented Jul 10, 2013

@bartv2 you might also have an idea? Seems to happen after ownCloud is put to maintenance mode.

Contributor

blizzz commented Jul 10, 2013

When I comment out https://github.com/owncloud/core/blob/stable5/lib/eventsource.php#L46 before doing the upgrade, the upgrade goes well. Of course this is not a solution, but it shows that is an issue with the Request Token, because OC_Util::isCallRegistered is returning false on the first attempt.

One way to get around it is to check OC_Util::isCallRegistered before the upgrade process takes place and reload if necessary. But this is not more than a workaround also and rather ugly imho.

Owner

DeepDiver1975 commented Jul 10, 2013

That's the same shit I was facing 2 weeks ago. The solution was to move some javascript code from core/js/config.php to core/js/js.js

Contributor

blizzz commented Jul 10, 2013

Can you fix it?

Member

VicDeo commented Jul 10, 2013

it is already in stable5 498bb50

Member

karlitschek commented Jul 10, 2013

@VicDeo But why is this happening with the 5.0.8 release that I packaged this morning?

Contributor

blizzz commented Jul 10, 2013

Is it likely an old core/js/js.js sits in the browser cache?

apunkt commented Jul 10, 2013

@blizzz all get requests answered 304 besides
GET /owncloud/index.php/core/routes.json HTTP/1.1" 503 1618
while manually turned on maintenance mode. if turned off 500

Owner

DeepDiver1975 commented Jul 10, 2013

I assume the request token in 5.0.7 is taken from a different location compared to 5.0.8

@LukasReschke this was your vhange afaik

Member

VicDeo commented Jul 10, 2013

Tried 4 times, can't reproduce (sqlite/PHP 5.3.17/Chrome 28):

  • install 5.0.7
  • close browser tab
  • copy 5.0.8 files over it
  • go to browser to upgrade
  • it fails according to @dragotin s decsription
Contributor

blizzz commented Jul 10, 2013

Always happens for me. But I am using Firefox, maybe a difference?

feisar commented Jul 10, 2013

Update to 5.0.8 did strange things for me too:

  • I Copied the new ownCloud files over the existing 5.0.7 install and visited the site
  • OwnCloud said it was updating but just hung there, a refresh brought up the 'Maintenance mode' notice
  • I edited config.php to take it out of maintenance mode and visited the page again, owncloud put itself in maintenance mode and this time went through the update process.
  • After that it redirected me but went thorough the above procedure again before finally giving me the login screen.

The web interface does now show 5.0.8 so I assume everything worked alright.

Just to confirm, this command should be fine for an update right:

$ cp -a /new-owncloud/* /owncloud/

Owner

dragotin commented Jul 10, 2013

I used Firefox as well.

Contributor

blizzz commented Jul 10, 2013

I cleared and deactivated the browser cache, but the problem occurs again. So rather not cache related.

Contributor

blizzz commented Jul 10, 2013

@VicDeo i can reproduce with Chromium 28, PHP 5.4.9, sqlite

First update for me to get stuck in maintenance mode. Never had this happen during the last 5 or so updates.

I did the update with the Suse repo on a Debian 6 server with MySQL DB.
Update started but never continued.
After manually refreshing the owncloud page in Firefox the maintenance message was displayed.
Reloading the page again a few times didn't help, so I've disabled maintenance mode in config.php, reloaded the page again and finally the update completed successfully.

Now I have multiple "starting upgrade from 5.0.12 to 5.0.14" entries in the log. About one for every reload of the maintenance page I've made.

Member

schiessle commented Jul 10, 2013

I could also reproduce it with both Firefox22 and Chromium28. With Chromium 28 I also cleared the complete cash.

It always fails in line 113 of eventsource.js for me.

Firefox error:

SyntaxError: JSON.parse: unexpected character
[Break On This Error]   

callback(JSON.parse(e.data));

events...7ecd6b6 (line 113)

Chromium error:

Uncaught SyntaxError: Unexpected token u eventsource.js?v=4424d2deec2f9468fb61e2db07ecd6b6:113

No idea what's wrong here. But maybe this information are useful for someone else to debug it.

Contributor

blizzz commented Jul 10, 2013

I am sorry for your cash! :(
scnr

Unfortunately, those messages we know already. And we know it has something to do with the Request Token.

Contributor

tanghus commented Jul 10, 2013

It always fails in line 113 of eventsource.js for me.

@schiesbn maybe doing a console.log(e.data); before line 113 would cast some light on the issue?

Member

schiessle commented Jul 10, 2013

On Wed, 10 Jul 2013 08:59:25 -0700 Thomas Tanghus wrote:

It always fails in line 113 of eventsource.js for me.

@schiesbn maybe doing a console.log(e.data); before line 113 would
cast some light on the issue?

I can do this tomorrow and will post the output here.

Owner

DeepDiver1975 commented Jul 10, 2013

I was finally able to reproduce the issue and could debug the situation.
The execution of ajax/update.php is terminated within the ctor of OC_EventSource on the check on the request token because the request tokens don't match.
As far as I understand this in only possible if the session is terminated and a new one is generated between the loading of the update.php template and the ajax call. Under which circumstances this happens is not clear to me.

I'll try to find a way to check the request token before we fall into maintenance mode and see if any kind of page reload is possible.

Member

VicDeo commented Jul 10, 2013

@DeepDiver1975 so, 'remember' checkbox should not be set. That's why I was unable to reproduce it
It's automatic login protection imo

Contributor

blizzz commented Jul 11, 2013

It will output undefined, checked it yesterday.

"Björn Schießle" notifications@github.com wrote:

On Wed, 10 Jul 2013 08:59:25 -0700 Thomas Tanghus wrote:

It always fails in line 113 of eventsource.js for me.

@schiesbn maybe doing a console.log(e.data); before line 113 would
cast some light on the issue?

I can do this tomorrow and will post the output here.


Reply to this email directly or view it on GitHub:
#4005 (comment)

Sent from my Android phone with K-9 Mail. Please excuse my brevity.

@butonic butonic closed this in #4015 Jul 11, 2013

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