Title: Problem with recent release
Last modified: December 6, 2020

---

# Problem with recent release

 *  Resolved [therealgilles](https://wordpress.org/support/users/chamois_blanc/)
 * (@chamois_blanc)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/problem-with-recent-release/)
 * Hello,
 * I just got the following database error while trying to log in using oauth2:
 * `WordPress database error Unknown column 'code_challenge' in 'field list' for
   query INSERT INTO wp_oauth_authorization_codes (authorization_code, client_id,
   user_id, redirect_uri, expires, scope, code_challenge, code_challenge_method)
   VALUES ('<hidden_value>', '<hidden_value>', '210', 'https://<app_url>/oauth_redirect/','
   2020-12-05 18:34:53', 'basic', '', '') made by require('wp-blog-header.php'),
   require_once('wp-includes/template-loader.php'), apply_filters('template_include'),
   WP_Hook->apply_filters, wpoauth_server_template_redirect_intercept, require_once('/
   plugins/wp-oauth-server/library/class-wo-api.php'), WPOAuth2\Server->handleAuthorizeRequest,
   WPOAuth2\Controller\AuthorizeController->handleAuthorizeRequest, WPOAuth2\ResponseType\
   AuthorizationCode->getAuthorizeResponse, WPOAuth2\ResponseType\AuthorizationCode-
   >createAuthorizationCode, WPOAuth2\Storage\Wordpressdb->setAuthorizationCode`
 * Any advice?

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Thread Starter [therealgilles](https://wordpress.org/support/users/chamois_blanc/)
 * (@chamois_blanc)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/problem-with-recent-release/#post-13750060)
 * After looking at the code, I was able to workaround the bug by deactivating and
   re-activating the plugin.
 *  [lkraav](https://wordpress.org/support/users/lkraav/)
 * (@lkraav)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/problem-with-recent-release/#post-13759596)
 * Confirmed. Looks like plugin updates via CLI or web UI fail to activate DB migration
   routines.
 *  Plugin Author [Justin Greer](https://wordpress.org/support/users/justingreerbbi/)
 * (@justingreerbbi)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/problem-with-recent-release/#post-13759628)
 * Thank you both for the info and sorry for the issues. We will be running some
   tests to see why this is happening.
 * The update routine would be running alongside the install but clearly, something
   is out of order for certain installs.
 * I will have a look today and get out a fix ASAP.
 *  Plugin Author [Justin Greer](https://wordpress.org/support/users/justingreerbbi/)
 * (@justingreerbbi)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/problem-with-recent-release/#post-13762368)
 * We have tracked down the issue and cause of the problems.
 * **Details of the issue**
 * During an update using auto-update, WordPress’s mass update, or FTP, the DB updater
   does not run as expected due to WP hooks not being triggered.
 * **Solution / Workaround**
 * Manually deactivate and reactive the plugin seems to solve the issue. This will
   trigger the DB upgrade script using the expected hook.
 * We are working on a new release that addresses this issue now and for future 
   releases.
 *  Thread Starter [therealgilles](https://wordpress.org/support/users/chamois_blanc/)
 * (@chamois_blanc)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/problem-with-recent-release/#post-13762384)
 * Thanks for the update and details Justin.
 * As far as I can see, the plugin does not allow me to enable the new ‘auto-updates’(
   I guess because I am using the pro version) and I am not sure what “WordPress’s
   mass update” means. As far as I recall, I saw plugin updates were available, 
   went to the dashboard update page, selected the plugin updates available, and
   then clicked the update button. Does that fit in your description?
 *  Plugin Author [Justin Greer](https://wordpress.org/support/users/justingreerbbi/)
 * (@justingreerbbi)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/problem-with-recent-release/#post-13762402)
 * [@chamois_blanc](https://wordpress.org/support/users/chamois_blanc/) yes. We 
   discovered that the `register_activation_hook` function provided by WP does not
   run all the time on any updates. Albeit something that started in 2010, this 
   is the first time we are running into the issue.
    -  This reply was modified 5 years, 6 months ago by [Justin Greer](https://wordpress.org/support/users/justingreerbbi/).
 *  Plugin Author [Justin Greer](https://wordpress.org/support/users/justingreerbbi/)
 * (@justingreerbbi)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/problem-with-recent-release/#post-13762486)
 * Starting with 4.1.5, the plugin checks for a DB version so that all db upgrades
   are run accordingly.
 * I just pushed the 4.1.5 update that contains this DB update fix. This will ensure
   that these issues never happen again on a plugin update where DB modifications
   are required.
 *  Thread Starter [therealgilles](https://wordpress.org/support/users/chamois_blanc/)
 * (@chamois_blanc)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/problem-with-recent-release/#post-13763331)
 * Hi Justin,
 * I updated to the latest release and saw this in my debug.log file:
 * `WordPress database error Table '<database>.wp_oauth_clients' doesn't exist for
   query ALTER TABLE wp_oauth_clients MODIFY client_id VARCHAR(191); made by require_once('
   wp-admin/admin.php'), require_once('wp-load.php'), require_once('wp-config.php'),
   require_once('wp-settings.php'), include_once('/plugins/wp-oauth-server/wp-oauth-
   server.php'), require_once('/plugins/wp-oauth-server/wp-oauth-main.php'), _WO,
   WO_Server::instance, WO_Server->__construct, WO_Server->check_db, WO_Server->
   upgrade`
 * Maybe a piece is still missing?
    -  This reply was modified 5 years, 6 months ago by [therealgilles](https://wordpress.org/support/users/chamois_blanc/).

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Problem with recent release’ is closed to new replies.

 * ![](https://ps.w.org/oauth2-provider/assets/icon-256x256.gif?rev=2603051)
 * [WP OAuth Server (OAuth Authentication)](https://wordpress.org/plugins/oauth2-provider/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/oauth2-provider/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/oauth2-provider/)
 * [Active Topics](https://wordpress.org/support/plugin/oauth2-provider/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/oauth2-provider/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/oauth2-provider/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [therealgilles](https://wordpress.org/support/users/chamois_blanc/)
 * Last activity: [5 years, 6 months ago](https://wordpress.org/support/topic/problem-with-recent-release/#post-13763331)
 * Status: resolved