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

Migration 19.0 to 20.0.14 problem with final stage : occ db:add-missing-indices return argument problems #269

Closed
patricekaratchentzeff opened this issue Dec 10, 2021 · 7 comments
Assignees
Labels

Comments

@patricekaratchentzeff
Copy link

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Hi,

Steps to reproduce

Migration auto from 19 to 20 from the web interface.
Nice for all the stages until the last part by hands.
When I try to

php occ db:add-missing-indices
An unhandled exception has been thrown:
ArgumentCountError: Too few arguments to function OCA\PreviewGenerator\Command\Generate::__construct(), 0 passed in /var/www/nextcloud/lib/private/Console/Application.php on line 224 and at least 5 expected in /var/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php:72
Stack trace:
#0 /var/www/nextcloud/lib/private/Console/Application.php(224): OCA\PreviewGenerator\Command\Generate->__construct()
nextcloud/server#1 /var/www/nextcloud/lib/private/Console/Application.php(136): OC\Console\Application->loadCommandsFromInfoXml(Array)
nextcloud/server#2 /var/www/nextcloud/console.php(99): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
nextcloud/server#3 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')

In fact, all the php occ commands will failed
php occ app:list
An unhandled exception has been thrown:
ArgumentCountError: Too few arguments to function OCA\PreviewGenerator\Command\Generate::__construct(), 0 passed in /var/www/nextcloud/lib/private/Console/Application.php on line 224 and at least 5 expected in /var/www/nextcloud/apps/previewgenerator/lib/Command/Generate.php:72
Stack trace:
#0 /var/www/nextcloud/lib/private/Console/Application.php(224): OCA\PreviewGenerator\Command\Generate->__construct()
nextcloud/server#1 /var/www/nextcloud/lib/private/Console/Application.php(136): OC\Console\Application->loadCommandsFromInfoXml(Array)
nextcloud/server#2 /var/www/nextcloud/console.php(99): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
nextcloud/server#3 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')

The server will run perfectly, but I can finalize the update.

Server configuration

Operating system: Debian 10.11 (up to date)

Web server: nginx 1.14

Database: Maria 10.3

PHP version: 7.3

Nextcloud version: 20.0.14

Updated from an older Nextcloud/ownCloud or fresh install: 19.0.x (last production issue)

Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

No errors have been found.

List of activated apps:
There're 30 ! Not possible all to copy-paste and the command line fails :(

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

unfortunatly, all my php occ commands would fail :(

Nextcloud configuration:

Config report

Insert your config.php content here.
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

</details>

**Are you using external storage, if yes which one:** local/smb/sftp/... no

**Are you using encryption:** yes

**Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/... no


### Client configuration
**Browser:**
Firefox 95.0

**Operating system:**

### Logs

<!--- Reports without logs might be closed as unqualified reports! -->

#### Web server error log
<details>
<summary>Web server error log</summary>
Nothing special from nextcloud server, only filters IP ban. 



#### Nextcloud log (data/nextcloud.log)
<details>
<summary>Nextcloud log</summary>
{"reqId":"qvakJYaIPqxOev1K5epQ","level":1,"time":"2021-12-09T19:54:03+01:00","remoteAddr":"37.170.8.235","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=oBzFpBT4iYcdUlfCDhuwacK1YJ1pEzqAzrgK6LUaT2s%3D%3A0mikxXKLvrF3MTSnV1DIDKnUS8wQRRHGmtVAgIZMKAQ%3D","message":"\\OC\\Updater::maintenanceDisabled: Turned off maintenance mode","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0","version":"20.0.14.2"}
{"reqId":"qvakJYaIPqxOev1K5epQ","level":1,"time":"2021-12-09T19:54:03+01:00","remoteAddr":"37.170.8.235","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=oBzFpBT4iYcdUlfCDhuwacK1YJ1pEzqAzrgK6LUaT2s%3D%3A0mikxXKLvrF3MTSnV1DIDKnUS8wQRRHGmtVAgIZMKAQ%3D","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0","version":"20.0.14.2"}

</details>

Thanks,
@szaimen szaimen transferred this issue from nextcloud/server Dec 10, 2021
@st3iny
Copy link
Member

st3iny commented Dec 14, 2021

Which version of previewgenerator are you using?

@st3iny st3iny added the bug label Dec 14, 2021
@patricekaratchentzeff
Copy link
Author

patricekaratchentzeff commented Dec 14, 2021 via email

@st3iny
Copy link
Member

st3iny commented Dec 14, 2021

I could reproduce the issue and it's caused by #190 on Nextcloud v20.

I'll develop a fix and publish a patch release asap.

@st3iny st3iny self-assigned this Dec 14, 2021
@patricekaratchentzeff
Copy link
Author

patricekaratchentzeff commented Dec 14, 2021 via email

@st3iny
Copy link
Member

st3iny commented Dec 15, 2021

Fixed by #273 and released with v3.4.1.

@st3iny st3iny closed this as completed Dec 15, 2021
@patricekaratchentzeff
Copy link
Author

patricekaratchentzeff commented Dec 15, 2021 via email

@patricekaratchentzeff
Copy link
Author

patricekaratchentzeff commented Dec 15, 2021 via email

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

No branches or pull requests

2 participants