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

[stable29] fix(setupcheck): Fix mimetype server version check in backport #47378

Merged
merged 1 commit into from
Aug 21, 2024

Conversation

nickvergessen
Copy link
Member

@nickvergessen nickvergessen commented Aug 21, 2024

Checklist

Signed-off-by: Joas Schilling <coding@schilljs.com>
@nickvergessen nickvergessen added the 3. to review Waiting for reviews label Aug 21, 2024
@nickvergessen nickvergessen added this to the Nextcloud 29.0.6 milestone Aug 21, 2024
@nickvergessen nickvergessen self-assigned this Aug 21, 2024
Copy link

@Trasted1 Trasted1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Error gone.

@nickvergessen nickvergessen merged commit e559a81 into stable29 Aug 21, 2024
175 of 177 checks passed
@nickvergessen nickvergessen deleted the followup/46711/fix-version-check branch August 21, 2024 09:07
@supett
Copy link

supett commented Aug 21, 2024

running "occ setupchecks" shows "✓ Mimetype migrations available: None". Error does not show there anymore neither.

Thanks

@AleksCee
Copy link

AleksCee commented Aug 21, 2024

How can I get the fix if I just updated before the commit?
If I run the updater there is no new version to install.
Thanks

@WM-Loose
Copy link

@supett Please... Not everyone here is an IT professional and it would be nice if the complete command was given. So the complete line that you have to enter in the directory. php83 ./occ.......

@supett
Copy link

supett commented Aug 22, 2024

@supett Please... Not everyone here is an IT professional and it would be nice if the complete command was given. So the complete line that you have to enter in the directory. php83 ./occ.......
Hope this helps:
https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html

@AleksCee
Copy link

AleksCee commented Aug 22, 2024

The call of the occ command is not the problem. But witch of the subcommands will update the fixed file? Upgrade say : everything is uptodate. Only patch the file manually will break the checksum. So what is the right way. Or have Wochenende wait for 29.0.6?

@7ts-it
Copy link

7ts-it commented Aug 22, 2024

Hi there!
If I understand correctly and you have nc29, edit lib/private/Repair/RepairMimeTypes.php.
This file is in the root of your webserver (eg. /var/www/nextcloud/lib/private/Repair/RepairMimeTypes.php)
Got to line 427 and change it from
if (version_compare($mimeTypeVersion, '30.0.0.0', '<') && $this->introduceExcalidrawType()) {
to

if (version_compare($mimeTypeVersion, '29.0.5.0', '<') && $this->introduceExcalidrawType()) {

as described above in fix(setupcheck): Fix mimetype server version check in backport

Have a nice day...
chris

edit:
after changing the file run sudo -u www-data php /var/www/nextcloud/occ maintenance:repair --include-expensive
This works for me.

@AleksCee
Copy link

Yes, this works for me too, but if you then do an integrity check the file was marked as broken:
occ integrity:check-core

  • INVALID_HASH:
    • lib/private/Repair/RepairMimeTypes.php:
      • expected: cbe37950a516bdaa081a318a5ea934c424c4fcd16d8690efdfa68a09241c553cdb41f3994a451dd20d69d15a6525f988e3fcb3668e8fb50f6f9afd60bc0aa9d1
      • current: 1e88dcb09eeb47ad50485ff0eeb6483ee36607c14c409595a690ecf12f7b30ae9309b801a732187596eb717e2fd55f77c0588e8e3696e4878787329a7b922412

@WM-Loose
Copy link

But that is logical and not a final fix. This will be resolved in the next stable version.
The point here was to first eliminate the error displayed.
That's how I understood it?

@mritzmann
Copy link

@WM-Loose You can ignore the warning. Simply wait for the next Nextcloud version. You have no advantage if you fix it now, it's just a false warning with no disadvantage.

@WM-Loose
Copy link

WM-Loose commented Aug 23, 2024 via email

@filerem
Copy link

filerem commented Aug 23, 2024

Checklist

* Code is [properly formatted](https://docs.nextcloud.com/server/latest/developer_manual/digging_deeper/continuous_integration.html#linting)

* [Sign-off message](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md) is added to all commits

* [x]  Tests ([unit](https://docs.nextcloud.com/server/latest/developer_manual/app_development/tutorial.html#unit-tests), [integration](https://docs.nextcloud.com/server/latest/developer_manual/app_development/tutorial.html#integration-tests), api and/or acceptance) are included

* [x]  Screenshots before/after for front-end changes

* [x]  Documentation ([manuals](https://github.com/nextcloud/documentation/) or wiki) has been updated or is not required

* [x]  [Backports requested](https://github.com/nextcloud/backportbot/#usage) where applicable (ex: critical bugfixes)

Thanks! it's work for me.

@sultanoswing
Copy link

Fix by changing line 427 works for me - thanks!

Interestingly, I don't get the invalid_hash error by doing so. Could be something to do with running my instance in docker, since I don't remember changing a setting or config file elsewhere!

And can I just say, this is a terrible bug for all of the (many) nextcloud users with OCD over that green tick :)

@7ts-it
Copy link

7ts-it commented Aug 25, 2024

You have to log in via ssh and run
sudo -u www-data php occ integrity:check-core
to see
- INVALID_HASH:
- lib/private/Repair/RepairMimeTypes.php:
- expected: cbe37950a516bdaa081a318a5ea934c424c4fcd16d8690efdfa68a09241c553cdb41f3994a451dd20d69d15a6525f988e3fcb3668e8fb50f6f9afd60bc0aa9d1
- current: 1e88dcb09eeb47ad50485ff0eeb6483ee36607c14c409595a690ecf12f7b30ae9309b801a732187596eb717e2fd55f77c0588e8e3696e4878787329a7b922412

Have a nice day
chris

@sultanoswing
Copy link

Ahhh - that'll be it - thanks! It's been a while since I used the web updater or via CLI, and you don't get that message when updating your instance via docker and docker build file, so I'd forgotten :)

@neerro
Copy link

neerro commented Aug 28, 2024

Hi there! If I understand correctly and you have nc29, edit lib/private/Repair/RepairMimeTypes.php. This file is in the root of your webserver (eg. /var/www/nextcloud/lib/private/Repair/RepairMimeTypes.php) Got to line 427 and change it from if (version_compare($mimeTypeVersion, '30.0.0.0', '<') && $this->introduceExcalidrawType()) { to if (version_compare($mimeTypeVersion, '29.0.5.0', '<') && $this->introduceExcalidrawType()) {

as described above in fix(setupcheck): Fix mimetype server version check in backport

Have a nice day... chris

edit: after changing the file run sudo -u www-data php /var/www/nextcloud/occ maintenance:repair --include-expensive This works for me.

Thanks man. It works for me as well)))

@blizzz blizzz mentioned this pull request Aug 29, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.