This has now happened to me twice, so I thought I ought to report it.

I have a Drupal site running 8.9.2. I have the same site running on two development environments, as well as in staging and production. One of the development instances suddenly refuses to check for updates. The update status page simply shows "Failed to get available update data" against each module.

If you try to check manually, you get two entries in the log.

First this:

Notice: Undefined index: function in Drupal\Core\Database\Log->findCaller() (line 154 of {composer-root-dir}/web/core/lib/Drupal/Core/Database/Log.php)
#0 {composer-root-dir}/web/core/includes/bootstrap.inc(600): _drupal_error_handler_real(8, 'Undefined index...', '{composer-root-dir}/...', 154, Array)
#1 {composer-root-dir}/web/core/lib/Drupal/Core/Database/Log.php(154): _drupal_error_handler(8, 'Undefined index...', '{composer-root-dir}/...', 154, Array)
#2 {composer-root-dir}/web/core/lib/Drupal/Core/Database/Log.php(119): Drupal\Core\Database\Log->findCaller()
#3 {composer-root-dir}/web/core/lib/Drupal/Core/Database/Statement.php(63): Drupal\Core\Database\Log->log(Object(Drupal\Core\Database\Statement), Array, 0.00036311149597168)
#4 {composer-root-dir}/web/core/lib/Drupal/Core/Database/Connection.php(640): Drupal\Core\Database\Statement->execute(Array, Array)
#5 {composer-root-dir}/web/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(357): Drupal\Core\Database\Connection->query('SELECT MAX(valu...', Array, Array)
#6 {composer-root-dir}/web/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(608): Drupal\Core\Database\Driver\mysql\Connection->query('SELECT MAX(valu...')
#7 {composer-root-dir}/web/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(531): Drupal\Core\Database\Driver\mysql\Connection->nextIdDelete()
#8 [internal function]: Drupal\Core\Database\Driver\mysql\Connection->__destruct()
#9 {main}
.

Then this:

Notice: Undefined index: function in Drupal\Core\Database\Log->findCaller() (line 154 of {composer-root-dir}/web/core/lib/Drupal/Core/Database/Log.php)
#0 {composer-root-dir}/web/core/includes/bootstrap.inc(600): _drupal_error_handler_real(8, 'Undefined index...', '{composer-root-dir}/...', 154, Array)
#1 {composer-root-dir}/web/core/lib/Drupal/Core/Database/Log.php(154): _drupal_error_handler(8, 'Undefined index...', '{composer-root-dir}/...', 154, Array)
#2 {composer-root-dir}/web/core/lib/Drupal/Core/Database/Log.php(119): Drupal\Core\Database\Log->findCaller()
#3 {composer-root-dir}/web/core/lib/Drupal/Core/Database/Statement.php(63): Drupal\Core\Database\Log->log(Object(Drupal\Core\Database\Statement), Array, 0.001086950302124)
#4 {composer-root-dir}/web/core/lib/Drupal/Core/Database/Connection.php(640): Drupal\Core\Database\Statement->execute(Array, Array)
#5 {composer-root-dir}/web/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(357): Drupal\Core\Database\Connection->query('DELETE FROM {se...', Array, Array)
#6 {composer-root-dir}/web/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(610): Drupal\Core\Database\Driver\mysql\Connection->query('DELETE FROM {se...', Array)
#7 {composer-root-dir}/web/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php(531): Drupal\Core\Database\Driver\mysql\Connection->nextIdDelete()
#8 [internal function]: Drupal\Core\Database\Driver\mysql\Connection->__destruct()
#9 {main}
.

The first time I encountered this problem, I was able to solve it by dumping the full SQL database from the production site, dropping all tables in the development environment, importing the production database, and then re-importing the development configuration. After that, it checked for updates without any problems. So it seems there was something in the state information in the previous development environment database that was causing the problem.

I thought that had solved it, but then it happened again. I can't debug further, to try and work out what state information might need clearing manually in the database, because the full queries are not being printed to the log. Certainly I've tried doing a cache reload.

It's intermittent, so this will be hard to fix from this report alone, I realise that. But I thought it better to report it because then it may come up if someone searches for a related problem.

Comments

JamesOakley created an issue. See original summary.

dww’s picture

This is probably duplicate with #2920285: Update module can get 'stuck' with 'no releases available' would be my guess.

-Derek

jamesoakley’s picture

Cheers - certainly could be, so if I get this again I'll try the pointers from there to see if they get things unstuck.

pameeela’s picture

Status: Active » Closed (duplicate)
Issue tags: +Bug Smash Initiative
Related issues: +#2920285: Update module can get 'stuck' with 'no releases available'