Problem/Motivation

On a decoupled site where only admins log in, we started seeing these error messages that completely stopped all site functionality once logged in:

InvalidArgumentException: The timestamp must be numeric. in Drupal\Component\Datetime\DateTimePlus::createFromTimestamp() (line 201 of docroot/core/lib/Drupal/Component/Datetime/DateTimePlus.php).

A portion of the backtrace is as follows:

#0 docroot/core/lib/Drupal/Core/Datetime/DateFormatter.php(122): Drupal\Component\Datetime\DateTimePlus::createFromTimestamp(NULL, Object(DateTimeZone), Array)
#1 docroot/modules/contrib/build_hooks/src/DeploymentStorageHandler.php(84): Drupal\Core\Datetime\DateFormatter->format(NULL)
#2 docroot/modules/contrib/build_hooks/src/DeploymentStorageHandler.php(50): Drupal\build_hooks\DeploymentStorageHandler->getLabelForNextDeploymentForEnvironment(Object(Drupal\build_hooks\Entity\FrontendEnvironment))
#3 docroot/modules/contrib/build_hooks/src/DeployLogger.php(90): Drupal\build_hooks\DeploymentStorageHandler->getOrCreateNextDeploymentForEnvironment(Object(Drupal\build_hooks\Entity\FrontendEnvironment))
#4 docroot/modules/contrib/build_hooks/src/DeployLogger.php(108): Drupal\build_hooks\DeployLogger->logEntityCreated(Object(Drupal\file\Entity\File))
#5 docroot/modules/contrib/build_hooks/build_hooks.module(44): Drupal\build_hooks\DeployLogger->logEntityUpdated(Object(Drupal\file\Entity\File))
#6 [internal function]: build_hooks_entity_update(Object(Drupal\file\Entity\File))

Steps to reproduce

TBD, not entirely sure what's triggering the problem.

Proposed resolution

Fix the bug =)

Remaining tasks

Identify the source of the bug.
Fix the bug.

User interface changes

TBD

API changes

TBD

Data model changes

TBD

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new1.11 KB

WIP patch to log what the $last variable contains to see why $last->deployed->value is not a number.

michele.r’s picture

StatusFileSize
new720 bytes
new1.12 KB

We ran into out-of-memory errors with patch #2. This patch gets just the values from the record.