wooclap / moodle-mod_wooclap

Moodle plugin for Wooclap (https://www.wooclap.com/).
2 stars 5 forks source link

Error while upgrading to the latest version #7

Closed izendegi closed 3 years ago

izendegi commented 3 years ago

I'm trying to upgrade Wooclap to the latest version (2021062500) from the previous version (2020102900) and we're getting an error. The error text is "Could not perform Step 1 of the V3 Upgrade", the error code "Error code: error-couldnotperformv3upgradestep1" and this is the trace:

line 497 of /lib/setuplib.php: moodle_exception thrown
line 169 of /mod/wooclap/db/upgrade.php: call to print_error()
line 877 of /lib/upgradelib.php: call to xmldb_wooclap_upgrade()
line 576 of /lib/upgradelib.php: call to upgrade_plugins_modules()
line 1929 of /lib/upgradelib.php: call to upgrade_plugins()
line 713 of /admin/index.php: call to upgrade_noncore()
tchapeaux commented 3 years ago

Hello @izendegi , I see several attempts to upgrade in our logs from https://mudle.mondragon.edu/beta , is that you?

The issue with those calls is that you have not declared an Access Key ID on your instance, so our server cannot authenticate you. Can you make sure to provide valid credentials before upgrading?

ndunand commented 3 years ago

FWIW I have triggered this error a couple times an hour ago on a local Moodle instance ('localhost'), which of course did not have an access key set.

izendegi commented 3 years ago

Yes, that's me. That's our testing instance and I was trying the upgrade before upgrading the real one (with Access Key correctly configured), if that's the reason of the error it shouldn't happen there.

Anyway, you should know that when this error happens the plugin stays in a unstable state and has to be uninstalled and installed again (it cannot be downgraded because in the database is already on the new version). You may want to handle it somehow...

tchapeaux commented 3 years ago

Thanks to both of you for these additional details. Indeed we could make it clearer that none of the plugin features will work without an access key.

@izendegi while in the unstable state, you should have access to the plugin settings at [your-moodle-root]/admin/settings.php?section=modsettingwooclap . This allows you to declare the access key ID and continue with the installation.

dfdeagle47 commented 2 years ago

@ndunand @izendegi

We've addressed this issue in the new release here and here. You should now be able to upgrade without the keys, and the migration can be triggered via a CLI script.

For the new release, it shouldn't be necessary to re-trigger this script if you're already on 2021062500 before upgrading the Moodle plugin, but we'll use this process for newer releases if a migration is needed to avoid any issues when upgrading.

Thank you for providing this feedback!