Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Critical error during database upgrade "The date '-0001-11-30' is a date before first website was online" when updating to 4.2.0 #17253

Closed
aldafu opened this issue Feb 23, 2021 · 3 comments · Fixed by #17254
Labels
Bug For errors / faults / flaws / inconsistencies etc.

Comments

@aldafu
Copy link

aldafu commented Feb 23, 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
@aldafu aldafu added the Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. label Feb 23, 2021
@Findus23 Findus23 added Bug For errors / faults / flaws / inconsistencies etc. and removed Potential Bug Something that might be a bug, but needs validation and confirmation it can be reproduced. labels Feb 23, 2021
@Findus23
Copy link
Member

Hi @aldafu,

Can you try out applying the changes from #17254 and report back if the update goes through afterwards?

@aldafu
Copy link
Author

aldafu commented Feb 24, 2021

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

@MatomoForumNotifications

This issue has been mentioned on Matomo forums. There might be relevant details there:

https://forum.matomo.org/t/no-data-report-since-last-friday-data-archiving-fails/48682/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
3 participants