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

NC updater 15.0.2 still fails on Delete old files (core/shipped.json is not available) #222

Open
devplan44 opened this issue Apr 11, 2019 · 22 comments

Comments

@devplan44
Copy link

This is quite old and hasn't been fixed:
NC updater 15.0.2 still fails on Delete old files (core/shipped.json is not available)

  1. I had to add "'maintenance' => false," to config.php -- otherwise the updater wouln't make it past the Backupstep. (Why don't we add some smart interactive choices?)
  2. Nearly every step has a parsing error. (Why can't the updater wait a bit more?!!)
  3. Updater doesn't make it past the Delete old files step because of missing core/shipped.json

I see that I am not the only one. The Updater index.php needs some MAJOR overhaul.

Screenshot from 2019-04-11 23-24-10

Snipped from updater log. (domain name changed)
2019-04-11T21:06:48+0000 DQkRuGYe3N [info] rollbackChanges("9")
2019-04-11T21:06:48+0000 DQkRuGYe3N [info] unlink .step
2019-04-11T21:06:48+0000 DQkRuGYe3N [info] rollbackChanges - step >= 7
2019-04-11T21:06:48+0000 DQkRuGYe3N [info] end of rollbackChanges()
2019-04-11T21:06:48+0000 3q1nnwSQwU [info] request to updater
2019-04-11T21:06:48+0000 3q1nnwSQwU [info] currentStep()
2019-04-11T21:06:48+0000 3q1nnwSQwU [info] POST request for step "9"
2019-04-11T21:06:49+0000 3q1nnwSQwU [info] startStep("9")
2019-04-11T21:06:49+0000 3q1nnwSQwU [info] deleteOldFiles()
2019-04-11T21:06:49+0000 3q1nnwSQwU [error] POST request failed with other exception
2019-04-11T21:06:49+0000 3q1nnwSQwU [error] Exception: Exception
Message: core/shipped.json is not available
Code:0
Trace:
#0 /customers/2/3/6/mydomain.de/httpd.www/nextcloud/updater/index.php(1337): Updater->deleteOldFiles()
#1 {main}
File:/customers/2/3/6/mydomain.de/httpd.www/nextcloud/updater/index.php
Line:891

@MorrisJobke
Copy link
Member

@devplan44 Does this always happen with the file core/shipped.json?

@MorrisJobke
Copy link
Member

  1. I had to add "'maintenance' => false," to config.php -- otherwise the updater wouln't make it past the Backupstep. (Why don't we add some smart interactive choices?)

That is weird - it should not be needed and many instances out there also don't have this.

@MorrisJobke
Copy link
Member

2. Nearly every step has a parsing error. (Why can't the updater wait a bit more?!!)

That means your Webserver killed the request - very little we can do here. You need to configure the webserver to have a higher timeout.

@MorrisJobke
Copy link
Member

Could you try to run it from CLI? Does it work there? (because this is basically the same code without the fragile concept of webserver timeouts.

@RobertBuhren
Copy link

Similar Issue here (ver. 15.0.2). Command line update to 16.0.1 says:

[✘] Delete old files failed
core/shipped.json is not available

Any ideas how to fix thix?

@MorrisJobke
Copy link
Member

Any ideas how to fix thix?

Not really ... somehow the shipped.json was removed before it should, but code wise I can't explain it 🤔

@marcelstoer
Copy link

I keep seeing this with every NC upgrade.

First the upgrade fails because some (non-empty?) directories can not be removed e.g.

Could not rmdir /home/thingpul/nextcloud-data/updater-ocajd0capqkz/downloads/nextcloud/lib/l10n

Then I hit the 'Retry' upgrade button. Then NC is missing core/shipped.json so I create an empty file manually, hit 'Retry' again...and so on.

@MorrisJobke
Copy link
Member

Could not rmdir /home/thingpul/nextcloud-data/updater-ocajd0capqkz/downloads/nextcloud/lib/l10n

Okay ... why can't it update the folder it just created? o.O

@mlopezcoria
Copy link

It happens to me too. I created /core/shipped.json and now updater show a new error message: Could not unlink: .../public_html/updater/../core/shipped.json

@pirateszero92
Copy link

It happens to me too. I created /core/shipped.json and now updater show a new error message: Could not unlink: .../public_html/updater/../core/shipped.json

Same error, can we roll back ?

@mlopezcoria
Copy link

I managed to solve it fixing permissions: sudo chown -R apache:apache /nextcloud-dir/
Then I pressed Retry update again and it finished correctly.

@pirateszero92
Copy link

I managed to solve it fixing permissions: sudo chown -R apache:apache /nextcloud-dir/
Then I pressed Retry update again and it finished correctly.

This is a good news to you, but i'm try to upgrade many times its still error.

now i'm roll back to 15.0.2.

@RobertBuhren
Copy link

Issue is still present when trying to update from 16.0.1 to 16.0.4

@UkeFan
Copy link

UkeFan commented Sep 28, 2019

to 16.0.5 as well - but only in 1/4 of my 4 installations..

@sankasan
Copy link

I'm stuck on this issue with an update from 15.0.12 to 16.0.5.

I've tried fixing it by linking to ../data/updater-oc973db5j0hf/backups/nextcloud-15.0.12.1/core/shipped.json(of course with the right permissions) but the updater unlinks that file at some point and I get the same error again.

@sankasan
Copy link

sankasan commented Oct 28, 2019

I haven't been able to fix this in any clean way. On IRC there was a suggestion to test this method: #145

However I worked around it by commenting out the deleteOldFiles() call after the files were removed (confirmed by looking at the directory via ssh) and restarted the updater/index.php process with the following hack:

            case 9:
                #$updater->deleteOldFiles();
                break;

The update completed. However I'm now looking at a blank screen instead of the nextcloud login page.... (seems to be a database driver issue in the required php update)

@akwala
Copy link

akwala commented Nov 10, 2019

However I worked around it by commenting out the deleteOldFiles() call after the files were removed (confirmed by looking at the directory via ssh) and restarted the updater/index.php process with the following hack:

            case 9:
                #$updater->deleteOldFiles();
                break;

Got the error when trying to update 17.0.0 → 17.0.1. @sankasan's workaround got the update past this file but the "Delete old files" step is now reporting the following:

Parsing response failed. <p>The requested URI could not be accessed.</p>
image

@maximian888
Copy link

maximian888 commented Mar 14, 2020

for me this happens from 17.02->18.02

had to reinstall nextcloud and install the new version, console upgrade hasn't worked - also with restarting from the beginning (data/upgrade-folder-rename), got stuck >>case 6

@Zefling
Copy link

Zefling commented Jun 20, 2020

Same problem for me: 18.0.4->18.0.6.

@lin-b-github
Copy link

lin-b-github commented Oct 26, 2020

I've experienced the same problems as others in this thread, which goes back to 11 April 2019 without any resolution.

I'm stuck at:
Delete old files
core/shipped.json is not available

2020-10-26_nextcloud_update_error

I think I'll just delete NextCloud until the team works through some of the fundamental bugs. NextCloud certainly has potential -- it's clearly still a beta project, though. I'll try it again in 1-2 years; maybe this bug will be fixed by then.

Edit: I was attempting to update from Nextcloud 19.0.0 to 19.0.4 (channel: "stable").

@marcelstoer
Copy link

marcelstoer commented Apr 28, 2021

First the upgrade fails because some (non-empty?) directories can not be removed e.g.

Could not rmdir /home/thingpul/nextcloud-data/updater-ocajd0capqkz/downloads/nextcloud/lib/l10n

Then I hit the 'Retry' upgrade button. Then NC is missing core/shipped.json so I create an empty file manually, hit 'Retry' again...and so on.

I upgraded from 16.something to the latest 20 the other day and this has been an issue with every single upgrade step.

  1. rmdir failing. The updater log reports https://github.com/nextcloud/updater/blob/master/index.php#L1060 as the origin. Why do you let it fail on non-empty dirs and don't use a recursive rmdir implementation instead? Particularly as you have recursiveDelete(folder) in this very script? However, IMO this should be addressed in Updater fails to complete (step Delete old files) #158.
  2. The core/shipped.json is reported missing multiple times; 5-6x per update. In about half of the cases core was still there and I could simply run touch shipped.json inside it. In the other half of the cases I had to re-create the core dir first.

Whether the two issues are connected or whether they even have the same root cause I can't assess. However, as this has happened to me with every single upgrade ever since I first installed NC (version 12 or so) it looks like the process runs wild.

@caco3
Copy link

caco3 commented Apr 29, 2021

The issue is most likely a duplicate of #158

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

No branches or pull requests