Skip to content

Upgrade from 6.0.4 to 7.0.2 fails with OC\NeedsUpdateException if user_external app is installed #10762

Description

@AdamWill

To reproduce, using packaged Fedora ownCloud (I'm not yet sure whether this affects stock, but no indication that it doesn't):

  1. Install clean 6.0.4, log in and enable the 'user_external' app
  2. Upgrade ownCloud files to 7.0.2
  3. 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:

{index} OC\NeedsUpdateException:
{index} OC\NeedsUpdateException:

and no further content.

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.

Activity

  1. PVince81 commented on Sep 1, 2014

    @PVince81
    Contributor

    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.

  2. PVince81 commented on Sep 1, 2014

    @PVince81
    Contributor

    Regression, please schedule @craigpg

  3. added this to the milestone on Sep 1, 2014
  4. PVince81 commented on Sep 2, 2014

    @PVince81
    Contributor

    Hmm, I've observed this as well while testing.
    Assigning to self.

  5. self-assigned this
    on Sep 2, 2014
  6. PVince81 commented on Sep 2, 2014

    @PVince81
    Contributor

    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.

  7. PVince81 commented on Sep 3, 2014

    @PVince81
    Contributor

    Fix is here: #10818

  8. AdamWill commented on Sep 3, 2014

    @AdamWill
    ContributorAuthor

    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.

  9. 4 remaining items

  10. twbradio commented on Sep 7, 2014

    @twbradio

    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.

  11. PVince81 commented on Sep 8, 2014

    @PVince81
    Contributor

    @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.

  12. AdamWill commented on Sep 8, 2014

    @AdamWill
    ContributorAuthor

    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.

  13. PVince81 commented on Sep 8, 2014

    @PVince81
    Contributor

    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.

  14. PVince81 commented on Sep 8, 2014

    @PVince81
    Contributor

    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.

  15. PVince81 commented on Sep 8, 2014

    @PVince81
    Contributor

    Fix is here: #10927

  16. twbradio commented on Sep 8, 2014

    @twbradio

    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.

  17. AdamWill commented on Sep 8, 2014

    @AdamWill
    ContributorAuthor

    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!

  18. PVince81 commented on Sep 9, 2014

    @PVince81
    Contributor

    7.0.3, yes 😄
    Thanks @twbradio @AdamWill for the feedback

  19. locked as resolved and limited conversation to collaborators on Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions