Invalid token_auth in the request

Hello,
I’ve have this error in a website using Wordpress 6.3.2 and Matomo 5.0.2

ERROR: Uncaught exception: /home/public_html/wp-content/plugins/matomo/plugins/WordPress/WordPress.php(340): Invalid token_auth in the request. [Query: ?module=API&format=csv&convertToUnicode=0&method=CoreAdminHome.runScheduledTasks&trigger=archivephp&, CLI mode: 0]

Any idea why this error keeps popping in the debug.log? Thanks

				  # Matomo

* Versione del plugin Matomo: 5.0.2
* Config esiste ed è scrivibile.: Sì ("$abs_path/wp-content/uploads/matomo/config/config.ini.php" )
* JS Tracker esiste ed è scrivibile.: Sì ("$abs_path/wp-content/uploads/matomo/matomo.js" )
* Directory del plugin: Yes ([{"pluginsPathAbsolute":"$abs_path\/wp-content\/plugins\/matomo\/plugins","webrootDirRelativeToMatomo":"..\/plugins"}])
* Directory Tmp scrivibile: Yes ($abs_path/wp-content/cache/matomo)
* Versione di Matomo: 5.0.2
* Blog idSite di Matomo: 1
* Matomo Install Version: 4.11.0 (Install date: 2022-08-20 11:18:53)
* Upgrades outstanding: No
* Upgrade in progress: No

## Endpoints

* Matomo JavaScript Tracker URL:  ($site_url/wp-content/uploads/matomo/matomo.js)
* Matomo JavaScript Tracker - WP Rest API:  ($site_url/wp-json/matomo/v1/hit/)
* Matomo HTTP Tracking API:  ($site_url/wp-content/plugins/matomo/app/matomo.php)
* Matomo HTTP Tracking API - WP Rest API:  ($site_url/wp-json/matomo/v1/hit/)

## Crons

* Tempo del server: 2024-02-06 12:47:59
* Ora del blog: 2024-02-06 13:47:59 (Le date sottostanti sono mostrate nel fuso orario del blog)
* Sync users & sites: Next run: 2024-02-07 13:39:18 (23 ore 51 minuti) ( Last started: 2024-02-06 13:39:28 (-8 minuti 31 secondi). Last ended: 2024-02-06 13:39:28 (-8 minuti 31 secondi). Interval: daily)
* Archive: Next run: 2024-02-06 14:39:18 (51 minuti 19 secondi) ( Last started: 2024-02-06 13:39:28 (-8 minuti 31 secondi). Last ended: 2024-02-06 13:39:29 (-8 minuti 30 secondi). Interval: hourly)
* Update GeoIP DB: Next run: 2024-03-01 13:39:18 (23 giorni 23 ore) ( Last started: 2024-01-31 13:39:21 (-6 giorni 0 ore). Last ended: 2024-01-31 13:39:22 (-6 giorni 0 ore). Interval: matomo_monthly)

## Controlli obbligatori

* Versione PHP >= 7.2.5: ok 
* PDO estensione: ok 
* PDO\MYSQL estensione: ok 
* MYSQLI estensione: ok 
* Altre estensioni Richieste: ok 
* Funzioni richieste: ok 
* Richiesta configurazione PHP (php.ini): ok 
* Directories con permessi di scrittura: ok 
* Directory con diritti di scrittura per Gestione Tag: ok 

## Controlli opzionali

* Binario PHP a 64 bit: ok 
* Stato del tracker: ok 
* Memoria massima: ok 
* Fuso orario: ok 
* Apri URL: ok 
* GD > 2.x + FreeType (grafica): ok 
* Altre estensioni: ok 
* Warning Altre funzioni: warning  (shell_exec Si raccomanda di attivare questa funzione integrata di PHP. <a href='https://matomo.org/faq/troubleshooting/how-to-make-the-diagnostic-managing-processes-via-cli-to-display-ok/' rel='noopener' target='_blank'>Per maggiori informazioni, leggi qui.</a> set_time_limit mail parse_ini_file glob gzopen md5_file )
* Filesystem: ok 
* Capacità del database: ok 
* Dimensione Massima Pacchetto: ok 
* Geolocalizzazione: ok 
* Aggiorna tramite HTTPS: ok 
* Mobile Messaging SMS Provider: ok 
* Supports Async Archiving: No
* Async Archiving Disabled in Setting: No
* Location provider ID: geoip2php
* Location provider available: Yes
* Location provider working: Yes
* Had visit in last 5 days: Yes
* Matomo URL: Yes ($site_url/wp-content/plugins/matomo/app/)

## Matomo Settings

* Track mode: default
* Track ecommerce: No
* Track codeposition: footer
* Track api endpoint: default
* Track js endpoint: default
* Version history: 5.0.2, 4.15.3, 4.15.2, 4.14.1, 4.12.0
* Core version: 5.0.2
* Last tracking settings update: 1707139861
* Last settings update: 1707139861
* Track ecommerce: No
* Disable cookies: Yes
* Show get started page: 0
* Delete all data uninstall: No

## Logs

* Nessuno: 

# WordPress

* Home URL: $site_url
* Site URL: $site_url
* WordPress Version: 6.3.2
* Number of blogs: 1
* Multisite Enabled: No
* Network Enabled: No
* WP_DEBUG: Yes
* WP_DEBUG_DISPLAY: No
* WP_DEBUG_LOG: Yes
* DISABLE_WP_CRON: -
* FORCE_SSL_ADMIN: Yes
* WP_CACHE: No
* CONCATENATE_SCRIPTS: -
* COMPRESS_SCRIPTS: -
* COMPRESS_CSS: -
* ENFORCE_GZIP: -
* WP_LOCAL_DEV: -
* WP_CONTENT_URL: $site_url/wp-content
* WP_CONTENT_DIR: $abs_path/wp-content
* UPLOADS: -
* BLOGUPLOADDIR: -
* DIEONDBERROR: -
* WPLANG: it_IT
* ALTERNATE_WP_CRON: -
* WP_CRON_LOCK_TIMEOUT: 60
* WP_DISABLE_FATAL_ERROR_HANDLER: Yes
* MATOMO_SUPPORT_ASYNC_ARCHIVING: -
* MATOMO_ENABLE_TAG_MANAGER: -
* MATOMO_SUPPRESS_DB_ERRORS: -
* MATOMO_ENABLE_AUTO_UPGRADE: -
* MATOMO_DEBUG: -
* MATOMO_SAFE_MODE: -
* MATOMO_GLOBAL_UPLOAD_DIR: -
* MATOMO_LOGIN_REDIRECT: -
* Permalink Structure: %postname%
* Possibly uses symlink: No
* Upload base url: $site_url/wp-content/uploads
* Upload base dir: $abs_path/wp-content/uploads
* Upload url: $site_url/wp-content/uploads/2024/02
* Custom upload_path: 
* Custom upload_url_path: 
* Compatible content directory: Yes

# WordPress Plugins


## MU Plugins

* WP Migrate Lite Compatibility: 1.3

## Plugins

* ACF OpenStreetMap Field: 1.5.0
* Admin Menu Editor: 1.12
* Advanced Custom Fields: Contacts: 1.0.0
* Advanced Custom Fields Multilingual: 2.0.5
* Advanced Custom Fields PRO: 6.2.1.1
* Breadcrumb NavXT: 7.2.0
* Classic Editor: 1.6.3
* Clear Cache For Me: 2.0.1
* Cookie - Madeincima: 2.1
* Custom post types Madeincima: 1.0
* Easy WP SMTP: 2.2.0
* FakerPress: 0.6.1
* Gravity Forms: 2.7.15
* Gravity Forms Campaign Monitor Add-On: 3.9
* Gravity Forms Multilingual: 1.7.2
* Juicer: 1.12.3
* Login/logout Logger - MADEINCIMA: 1.0.0
* Matomo Analytics - Ethical Stats. Powerful Insights.: 5.0.2
* Members: 3.2.8
* Regenerate Thumbnails: 3.1.6
* Solid Security Basic: 9.0.0 (Network enabled)
* UpdraftPlus - Backup/Restore: 2.23.10.26
* W3 Total Cache: 2.5.0 (Network enabled)
* WordPress Post Type Archive Links: 1.3.1
* WP Migrate Lite: 2.6.9 (Network enabled)
* WPML CMS Nav: 1.5.5
* WPML Media: 2.7.3
* WPML Multilingual CMS: 4.6.7
* WPML SEO: 2.1.0
* WPML Sticky Links: 1.5.4
* WPML String Translation: 3.2.8
* Yoast SEO: 21.4
* Active Plugins: 27 (gravityforms:2.7.15 sitepress-multilingual-cms:4.6.7 wp-seo-multilingual:2.1.0 acf-contacts:1.0.0 acf-openstreetmap-field:1.5.0 acfml:2.0.5 admin-menu-editor:1.12 advanced-custom-fields-pro:6.2.1.1 better-wp-security:9.0.0 breadcrumb-navxt:7.2.0 classic-editor:1.6.3 cookie-madeincima:2.1 custom-post-types-madeincima:1.0 gravityforms-multilingual:1.7.2 gravityformscampaignmonitor:3.9 juicer:1.12.3 login-logger-madeincima:1.0.0 matomo:5.0.2 members:3.2.8 post-type-archive-links:1.3.1 updraftplus:2.23.10.26 wordpress-seo:21.4 wp-migrate-db:2.6.9 wpml-cms-nav:1.5.5 wpml-media-translation:2.7.3 wpml-sticky-links:1.5.4 wpml-string-translation:3.2.8)
* Theme: custom
# Server

* Server Info: Apache
* Apache AddHandler support: Supported
* PHP OS: Linux
* PHP Version: 7.4.33
* PHP SAPI: cgi-fcgi
* PHP Binary Name: /opt/cpanel/ea-php74/root/usr/bin/php-cgi
* PHP Maxmind DB extension: Not loaded
* PHP Error Reporting: 0 After bootstrap: 0
* Timezone: UTC
* WP timezone: Europe/Rome
* Locale: it_IT
* User Locale: it_IT
* Memory Limit: 512M (At least 128MB recommended. Depending on your traffic 256MB or more may be needed.)
* WP Memory Limit: 512M
* WP Max Memory Limit: 512M
* Timezone version: 0.system
* Time: 1707223680
* Max Execution Time: 180
* Max Post Size: 150M
* Max Upload Size: 157286400
* Max Input Vars: 12000
* Disabled PHP functions: Yes (dl,passthru,proc_open,proc_close,proc_terminate,shell_exec,system)
* zlib.output_compression is off: Yes
* Curl Version: 8.5.0, OpenSSL/1.1.1w
* Suhosin installed: No

# Database

* MySQL Version: 5.7.44
* Mysqli Connect: Yes
* Force MySQL over Mysqli: No
* DB Prefix: bz_dx4_
* DB CHARSET: utf8
* DB COLLATE: 
* SHOW ERRORS: No
* SUPPRESS ERRORS: No
* Uses Socket: No
* Uses IPv6: No
* Matomo tables found: 283
* DB tables exist: Yes
* Matomo users found: 13
* Matomo sites found: 1
* Autorizzazioni obbligatorie: OK

# Browser

* Browser:  (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36)
* Language: it-it,it,en-us,en

Hello @MIC00 Thanks for reaching out. Could you please let us know if there is any update you did before this error came up?

Also,can you disable the archiving asynchronous mode (by adding in your wp-config.php file the following content;

if (!defined(‘MATOMO_SUPPORT_ASYNC_ARCHIVING’)){define(‘MATOMO_SUPPORT_ASYNC_ARCHIVING’, false);}

it solves 90% of the archiving problem.