-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[Bug]: When running repair steps for the first time, changed classes get not loaded properly #38158
Comments
cc @nextcloud/server-backend |
Same with nextcloud/mail#8146 and nextcloud/calendar#5191 Summary: the app migration/repair step are run with a mix of old app code and new app code. I think the only possible fix is to run migrations and repair steps in a new process |
https://github.com/search?q=repo%3Anextcloud%2Fmail+method_exists+path%3A%2F%5Elib%5C%2FMigration%5C%2F%2F&type=code for all the previous monkey patches |
This comment was marked as off-topic.
This comment was marked as off-topic.
Let's keep separate issues separate
These require two distinct fixes. |
This comment was marked as outdated.
This comment was marked as outdated.
Possibky this was fixed with #40349 |
Will check it with 28 beta |
I tried to reproduce this error in 27.1.3 before updating to 28-beta1, but the migration runs thru with new methods. So it seems it is already fixed in 27. In 28-beta1 the problem does not occur as well. |
I do not think this is fixed. See #38158 (comment) for the distinction of the two problems with caching code. One was fixed, the other wasn't. |
Funny thing. If it is still present, then I did something weird while trying to reproduce it. I was sure, I provocated the issue by adding and calling new methods to the repais steps. I will try my luck again. Reopen? |
It works if the class hasn't been loaded prior to code replacement. Works:
Doesn't work
|
Bug description
When updating an app (here it is Polls) via occ it seems that altered classes, which are used inside a repair step get not updated properly (caching??). A second update run then installs the app with out an exception.
Steps to reproduce
See details here: nextcloud/polls#2900 and nextcloud/polls#2793
Expected behavior
changed classes should be loaded properly while updating an app.
Installation method
Community Web installer on a VPS or web space
Nextcloud Server version
26
Operating system
None
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
The method OCA\Polls\Db\TableManager::deleteAllDuplicates() was added in the last Polls version (5.0.5).
The error trace is taken from nextcloud/polls#2900
The system configuration is taken from my test instance, where I could observe this problem too.
The text was updated successfully, but these errors were encountered: