You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Upgrade from 6.0.4 to 7.0.2 fails with OC\NeedsUpdateException if user_external app is installed #10762
To reproduce, using packaged Fedora ownCloud (I'm not yet sure whether this affects stock, but no indication that it doesn't):
Install clean 6.0.4, log in and enable the 'user_external' app
Upgrade ownCloud files to 7.0.2
Access server to trigger the update script
You see just the ownCloud logo and a stub 'console' below it (the space where it would usually show the updater, but there's no content, it's just a short empty dark rectangle). The logs have two errors:
This is the new 'check for app updates' stuff from July, I believe, I'm not terribly familiar with it. I suspect part of what's going on is that the code that should print out a detailed error message both to the browser and the logs doesn't work when ownCloud is in 'update' mode. I guess the other part of what's going on is that the updater's code to disable apps and run the update scripts should kick in before the check for whether the app needs updating? But I'm not totally sure yet.
Yes, additional protection needed to be added to avoid having apps auto-updating multiple times when accessed concurrently.
It's strange that the update page itself would show such exception, maybe some parts of the app are loaded too early, or its update code is trying to load apps that are not updated yet.
Eww, it looks like the update might have side effects if you're logged in as a user.
If that user has access to the app through their group, it will update that app as well because isEnabled() will return that app.
If the user does not have access, OR no user was logged in, then isEnabled() will not return that app, even though it's enabled for another user...
So I'm not 100% sure this is exactly what we were hitting; I can't quite recall now, but I thought there was a 'step 1.5' I omitted to list, where I logged out before doing the upgrade. But I'll double check that.
I was doing some work on my Ubuntu box this evening and updated OwnCloud with apparently the same problem:
"You see just the ownCloud logo and a stub 'console' below it (the space where it would usually show the updater, but there's no content, it's just a short empty dark rectangle). The logs have two errors:
My reproduction steps are literally 'do a clean install, log in as admin, enable user_external app but don't do anything to configure it, log out, upgrade ownCloud code (packages), access login page, see bug'. I can re-confirm this tomorrow.
Fix also confirmed here - reproduced the bug, hand-edited the fix into place, refreshed in browser, and the upgrade proceeded successfully, including update of the external users app. I guess this will make 7.0.2? Many thanks!
Activity
PVince81 commentedon Sep 1, 2014
Yes, additional protection needed to be added to avoid having apps auto-updating multiple times when accessed concurrently.
It's strange that the update page itself would show such exception, maybe some parts of the app are loaded too early, or its update code is trying to load apps that are not updated yet.
Needs further research.
PVince81 commentedon Sep 1, 2014
Regression, please schedule @craigpg
PVince81 commentedon Sep 2, 2014
Hmm, I've observed this as well while testing.
Assigning to self.
PVince81 commentedon Sep 2, 2014
Eww, it looks like the update might have side effects if you're logged in as a user.
If that user has access to the app through their group, it will update that app as well because
isEnabled()will return that app.If the user does not have access, OR no user was logged in, then
isEnabled()will not return that app, even though it's enabled for another user...Trying to fix this.
PVince81 commentedon Sep 3, 2014
Fix is here: #10818
AdamWill commentedon Sep 3, 2014
So I'm not 100% sure this is exactly what we were hitting; I can't quite recall now, but I thought there was a 'step 1.5' I omitted to list, where I logged out before doing the upgrade. But I'll double check that.
4 remaining items
twbradio commentedon Sep 7, 2014
I was doing some work on my Ubuntu box this evening and updated OwnCloud with apparently the same problem:
"You see just the ownCloud logo and a stub 'console' below it (the space where it would usually show the updater, but there's no content, it's just a short empty dark rectangle). The logs have two errors:
{index} OC\NeedsUpdateException:
{index} OC\NeedsUpdateException:"
Any advice for getting the login back is appreciated.
PVince81 commentedon Sep 8, 2014
@AdamWill thanks for the feedback.
Can you guys confirm that you are NOT using the "enable app for groups" feature ?
If not, then it is possibly a different issue.
Reopening to investigate.
AdamWill commentedon Sep 8, 2014
My reproduction steps are literally 'do a clean install, log in as admin, enable user_external app but don't do anything to configure it, log out, upgrade ownCloud code (packages), access login page, see bug'. I can re-confirm this tomorrow.
PVince81 commentedon Sep 8, 2014
Ok, I got the error as well.
Git checkout v6.0.4 then setup as you said, then checkout stable7.
I'll look into it.
PVince81 commentedon Sep 8, 2014
Looks like user backends are initialized before the upgrade check: https://github.com/owncloud/core/blob/master/lib/base.php#L557
The upgrade check is a few lines below that.
That's why this specific app is having trouble.
PVince81 commentedon Sep 8, 2014
Fix is here: #10927
twbradio commentedon Sep 8, 2014
That did the trick on mine ... thank you.
On Monday, September 8, 2014 5:33 AM, Vincent Petry [email protected] wrote:
Fix is here: #10927
—
Reply to this email directly or view it on GitHub.
AdamWill commentedon Sep 8, 2014
Fix also confirmed here - reproduced the bug, hand-edited the fix into place, refreshed in browser, and the upgrade proceeded successfully, including update of the external users app. I guess this will make 7.0.2? Many thanks!
PVince81 commentedon Sep 9, 2014
7.0.3, yes 😄
Thanks @twbradio @AdamWill for the feedback