@aldafu opened this Issue on February 23rd 2021

The database upgrade fails when trying to update Matomo from 4.1.1 to 4.2.0 with the following error.

$ sudo -u www-data php /var/www/html/console core:update 
...
   *** Update ***

    Database Upgrade Required

    Your Matomo database is out-of-date, and must be upgraded before you can continue.

    Matomo database will be upgraded from version 4.1.1 to the new version 4.2.0.

    The database upgrade process may take a while, so please be patient.

  Executing ... DEBUG [2021-02-23 15:46:57] 25510  General tracker cache was re-created.
DEBUG [2021-02-23 15:46:57] 25510  General tracker cache was re-created.

    [X] Critical Error during the update process:

    * /var/www/html/core/Updates/4.1.2-b1.php:
    Error trying to execute the migration ''.
    The error was: The date '-0001-11-30' is a date before first website was online. Try date that's after Aug 6, 1991 (timestamp 681436800).: -62169984000

Expected Behavior

Running the database upgrade script should finish successfully or provide manual steps on how to make it run successfully.

Current Behavior

Database upgrade fails and leaves Matomo in an unusable state.

Steps to Reproduce (for Bugs)

  1. Initiate auto update for Matomo to update to 4.2.0
  2. Start database upgrade (either through browser or shell console)

Your Environment

  • Matomo Version: currently 4.1.1
  • PHP Version: PHP 7.2.24-0ubuntu0.18.04.7 (cli) (built: Oct 7 2020 15:24:25) ( NTS )
  • Server Operating System: Ubuntu 18.04.5 LTS
  • Additionally installed plugins: See https://pastebin.com/9steqyyE
  • full log from running the upgrade script: https://pastebin.com/W9AfgXSG
@Findus23 commented on February 23rd 2021 Member

Hi @aldafu,

Can you try out applying the changes from https://github.com/matomo-org/matomo/pull/17254 and report back if the update goes through afterwards?

@aldafu commented on February 24th 2021

Confirming, that this change allowed the upgrade script to finish successfully and the web dashboard can be opened again.

This Issue was closed on February 24th 2021
Powered by GitHub Issue Mirror