Skip to content

Update to 12.0.4 RC3 fails on web #7331

Closed

Description

@MorrisJobke

The web based updater does not get triggered when pressing the button. I'm pretty sure it worked fine in RC1. I also tried to revert #7257 but it didn't changed anything.

bildschirmfoto 2017-11-28 um 20 38 21

I reproduced this on two instances.

Ideas @blizzz @nickvergessen @rullzer @ChristophWurst @skjnldsv ?

RC3 can be found at: https://download.nextcloud.com/server/prereleases/nextcloud-12.0.4RC3.zip

Activity

  1. added this to the Nextcloud 12.0.4 milestone on Nov 28, 2017
  2. blizzz commented on Nov 28, 2017

    @blizzz
    Member

    is there more in the console log? network log?

  3. blizzz commented on Nov 28, 2017

    @blizzz
    Member

    console output looks a bit similar to what is reported in #7145

  4. blizzz commented on Nov 28, 2017

    @blizzz
    Member

    also it appears that getting merge-template-prepend.js was aborted, but from the browser?

  5. danxuliu commented on Nov 30, 2017

    @danxuliu
    Member

    I can not reproduce it :-( I have used the following steps:

    1. Install Nextcloud 12.0.3 with SQLite using the official Docker container
    docker run --detach --publish 8000:80 --name test-update-12.0.4 nextcloud:12.0.3
    docker exec -it --user www-data test-update-12.0.4 bash -c "php occ maintenance:install --admin-pass=admin"
    
    
    1. Open http://127.0.0.1:8000 in a browser and login as admin:admin
    2. Perform a manual update to Nextcloud 12.0.4RC3 (delete everything except for .htaccess, .user.ini, custom_apps, config and data from the Nextcloud directory and copy the contents of Nextcloud 12.0.4RC3 there)
    docker exec -it --user www-data test-update-12.0.4 bash -c "rm -r 3rdparty AUTHORS apps console.php core cron.php db_structure.xml index.html index.php l10n lib occ ocs ocs-provider public.php remote.php resources robots.txt settings status.php themes version.php"
    docker exec -it --user www-data test-update-12.0.4 bash -c "curl https://download.nextcloud.com/server/prereleases/nextcloud-12.0.4RC3.tar.bz2 > /tmp/nextcloud-12.0.4RC3.tar.bz2"
    docker exec -it --user www-data test-update-12.0.4 bash -c "cd /tmp && tar xjf nextcloud-12.0.4RC3.tar.bz2"
    docker exec -it --user www-data test-update-12.0.4 bash -c "cp -r /tmp/nextcloud/* /var/www/html/"
    
    1. Reload the page in the browser; the updater appears and clicking on Start update works as expected

    also it appears that getting merge-template-prepend.js was aborted, but from the browser?

    As far as I know OC and OCA "namespaces" are defined in merged-template-prepend.js, so if that file failed to load the other errors are expected. Moreover, the click handler for the Start update button is set in core/js/update.js, so if OC is not defined the execution of the file would fail when defining OC.Update, due to which the $(document).ready handler would not be set, and thus clicking on the button would do nothing.

    What I have no idea is why merged-template-prepend.js failed to load :-S The net::ERR_ABORTED indeed seems to point to something in the browser.

    I tried to configure Apache to send just merged-template-prepend.js really slow to check if it could be caused by clicking on the button before the script was loaded. However, after struggling with that for too long I gave up and assumed that I am too dumb to get Apache to behave like that :-P

    Anyway, if I am not mistaken, even if merged-template-prepend.js took very long to load it would not be possible to click on the button before it finished, as the scripts are loaded synchronously and they block the rendering of the DOM until they are processed. So... I am clueless, sorry :-(

  6. MorrisJobke commented on Nov 30, 2017

    @MorrisJobke
    MemberAuthor

    What I have no idea is why merged-template-prepend.js failed to load :-S The net::ERR_ABORTED indeed seems to point to something in the browser.

    I used Chrome and Safari and also two different instances :/

    Anyway, if I am not mistaken, even if merged-template-prepend.js took very long to load it would not be possible to click on the button before it finished, as the scripts are loaded synchronously and they block the rendering of the DOM until they are processed. So... I am clueless, sorry :-(

    I still think, that we should not load the generated stuff on the update page and have only a very limited set of JS code available there to not mess with it (maybe served from inline script tags - we do the same for the web based updater to not cause too much trouble if a file gets not loaded and lock yourself out).

  7. MorrisJobke commented on Nov 30, 2017

    @MorrisJobke
    MemberAuthor

    I also tried to reproduce this again and the issue didn't happen afterwards anymore :/ I tried to reupgrade both instances, but then all went fine and the upgrade was possible.

    Closing this as a false flag and some network hiccup. 😢

  8. MorrisJobke commented on Nov 30, 2017

    @MorrisJobke
    MemberAuthor

    While debugging through this I cleaned up a bit the upgrade check handling: #7354

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions