@ulope opened this Issue on July 19th 2021

Expected Behavior

Running ./console core:archive to succeed without errors

Current Behavior

core:archive fails with:

DEBUG [2021-07-19 14:52:05] 1  Execute HTTP API request: https://XXXXXXXX/?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=year&date=2021-01-01&format=json&trigger=archivephp&
ERROR [2021-07-19 14:52:06] 1  Got invalid response from API request: ?module=API&method=CoreAdminHome.archiveReports&idSite=1&period=year&date=2021-01-01&format=json&trigger=archivephp. Response was 
INFO [2021-07-19 14:52:06] 1  '<!DOCTYPE html>
 <html>
 <head>
     <meta charset="utf-8">
     <meta name="robots" content="noindex,nofollow">
     <title>Matomo &rsaquo; Error</title>
     <link rel="shortcut icon" href="misc/user/favicon.png" />
     <link rel="stylesheet" type="text/css" href="plugins/Morpheus/stylesheets/simple_structure.css" />
 </head>
 <body id="simple">

 <div class="logo">
     <img title="Matomo" alt="Matomo" style="height: 40px;" src="https://XXXXXXXX/plugins/Morpheus/images/logo.svg"/>
 </div>

 <div class="box">

     <div class="header">
         <h1>An error occurred</h1>
     </div>

     <div class="content"><h2>This user has super user access. For embedding widgets super user token auths are not allowed. <a href="https://matomo.org//faq_147/" rel="noreferrer noopener">See our faq for more information.</a></h2>
                     <p><a href="javascript:window.history.back();">Go Back</a> | <a href="index.php">Go to Matomo</a></p>  <ul>
                             <li><a rel="noreferrer noopener" target="_blank" href="https://matomo.org">Matomo.org homepage</a></li>
                             <li><a rel="noreferrer noopener" target="_blank" href="https://matomo.org/faq/">Frequently Asked Questions</a></li>
                             <li><a rel="noreferrer noopener" target="_blank" href="https://matomo.org/docs/">User Guides</a></li>
                             <li><a rel="noreferrer noopener" target="_blank" href="https://forum.matomo.org/">Matomo Forums</a></li>
                             <li><a rel="noreferrer noopener" target="_blank" href="https://matomo.org/support/?pk_campaign=App_AnErrorOccured&p&pk_medium=ProfessionalServicesLink">Professional Support for Matomo</a></li>
                             </ul>    </div>

     <div class="footer">
         <a href="index.php">&laquo; Back to Matomo</a>
     </div>

 </div>
 </body>
 </html>'

The matomo log also shows:

NOTICE: PHP message: Error in Matomo: This user has super user access. For embedding widgets super user token auths are not allowed. See our faq for more information.

Steps to Reproduce (for Bugs)

(Not sure if reproducible)

  1. Install fresh matomo 4.3.1
  2. Add one hit manually
  3. Run core:archive once (worked successfully)
  4. Run it again 2 days later, see error above

Your Environment

  • Matomo Version: 4.3.1
  • PHP Version: 7.4.21
  • Server Operating System: ubuntu 20.04 / docker image: matomo:4.3-fpm
  • Additionally installed plugins: -
  • Browser: -
  • Operating System: -
@tsteur commented on July 19th 2021 Member

Hey @ulope to try and reproduce this could you send us a copy of your system report see https://matomo.org/faq/troubleshooting/how-do-i-find-and-copy-the-system-check-in-matomo-on-premise/ ? The copied report should be anonymised automatically.

@ulope commented on July 19th 2021

Sure, here you go:

Click to view System Check ### Mandatory checks #### PHP version >= 7.2.5: ✔ 7.4.21 #### PDO extension: ✔ #### PDO\MYSQL extension: ✔ #### MYSQLI extension: ✔ #### Other required extensions: ✔ zlib ✔ SPL ✔ iconv ✔ json ✔ mbstring ✔ Reflection ✔ filter ✔ hash ✔ session #### Required functions: ✔ debug_backtrace ✔ eval ✔ hash ✔ gzcompress ✔ gzuncompress ✔ pack #### Required PHP configuration (php.ini): ✔ session.auto_start = 0 ✔ max_execution_time = 0 OR >= 30 #### Directories with write access: ✔ $DOC_ROOT/tmp ✔ $DOC_ROOT/tmp/assets ✔ $DOC_ROOT/tmp/cache ✔ $DOC_ROOT/tmp/climulti ✔ $DOC_ROOT/tmp/latest ✔ $DOC_ROOT/tmp/logs ✔ $DOC_ROOT/tmp/sessions ✔ $DOC_ROOT/tmp/tcpdf ✔ $DOC_ROOT/tmp/templates_c ### Optional checks #### Required Private Directories: ✔ All private directories are inaccessible from the internet. #### File integrity: ✔ #### Tracker status: ✔ #### Memory limit: ✔ 128M #### Time zone: ✔ #### Open URL: ✔ curl #### PageSpeed disabled: ✔ #### GD > 2.x + Freetype (graphics): ✔ #### Other extensions: ✔ json ✔ libxml ✔ dom ✔ SimpleXML ✔ openssl #### Other functions: ✔ shell_exec ✔ set_time_limit ✔ mail ✔ parse_ini_file ✔ glob ✔ gzopen ✔ md5_file #### Filesystem: ✔ #### Setup Cron (faster report loading): ⚠ Warning: For optimal performance and a speedy Matomo, it is highly recommended to set up a crontab to automatically archive your reports, and to disable browser triggering in the Matomo settings. Learn more. #### Browser and Auto-archiving enabled: ⚠ Warning: It looks like both browser and auto archiving are enabled. Auto archiving last started 2 hours 30 min ago. If auto archiving is enabled, you should disable browser archiving in "General Settings". #### Setup Cron - Managing processes via CLI: not supported (optional) #### Database abilities: ✔ UTF8mb4 charset ✔ LOAD DATA INFILE ✔ CREATE TEMPORARY TABLES ✔ Changing transaction isolation level #### Max Packet Size: ✔ #### Forced SSL Connection: ⚠ Warning: We recommend using Matomo over secure SSL connections only. To prevent insecure access over http, add force_ssl = 1 to the General section in your Matomo config/config.ini.php file. #### Geolocation: ✔ geoip2php (continent_code, continent_name, country_code, country_name, region_code, region_name, city_name, postal_code, lat, long) #### Update over HTTPS: ✔ #### Writable JavaScript Tracker ("/matomo.js"): ✔ ### Informational results #### Matomo Version: 4.3.1 #### Matomo Update History: 4.3.1, #### Matomo Install Version: 4.3.1 #### Latest Available Version: 4.3.1 #### Is Git Deployment: 0 #### PHP_OS: Linux #### PHP_BINARY: /usr/local/sbin/php-fpm #### PHP SAPI: fpm-fcgi #### Timezone Version: 2021.1 #### PHP Timezone: UTC #### PHP Time: 1626730336 #### PHP Datetime: 2021-07-19 21:32:16 #### PHP INI max_execution_time: 30 #### PHP INI post_max_size: 8M #### PHP INI max_input_vars: 1000 #### PHP INI zlib.output_compression: 0 #### Curl Version: 7.64.0, OpenSSL/1.1.1d #### Suhosin Installed: 0 #### DB Prefix: matomo_ #### DB Charset: utf8mb4 #### DB Adapter: PDO\MYSQL #### MySQL Version: 10.6.3-MariaDB-1:10.6.3+maria~focal #### Num Tables: 51 #### Browser Segment Archiving Enabled: 1 #### Development Mode Enabled: 0 #### Internet Enabled: 1 #### Multi Server Environment: 0 #### Auto Update Enabled: 1 #### Custom User Path: 0 #### Custom Include Path: 0 #### Release Channel: latest_stable #### Plugins Activated: API, Actions, Annotations, BulkTracking, Contents, CoreAdminHome, CoreConsole, CoreHome, CorePluginsAdmin, CoreUpdater, CoreVisualizations, CustomDimensions, CustomJsTracker, Dashboard, DevicePlugins, DevicesDetection, Diagnostics, Ecommerce, Events, Feedback, GeoIp2, Goals, Heartbeat, ImageGraph, Insights, Installation, Intl, IntranetMeasurable, LanguagesManager, Live, Login, Marketplace, MobileMessaging, Monolog, Morpheus, MultiSites, Overlay, PagePerformance, PrivacyManager, ProfessionalServices, Proxy, Referrers, Resolution, RssWidget, SEO, ScheduledReports, SegmentEditor, SitesManager, Tour, Transitions, TwoFactorAuth, UserConsole 4.0.0, UserCountry, UserCountryMap, UserId, UserLanguage, UsersManager, VisitFrequency, VisitTime, VisitorInterest, VisitsSummary, WebsiteMeasurable, Widgetize #### Plugins Deactivated: CustomVariables, DBStats, MobileAppMeasurable, Provider, TagManager #### Plugins Invalid: #### Server Info: Caddy/v2.4.3 #### Had visits in last 1 day: 0 #### Had visits in last 3 days: 0 #### Had visits in last 5 days: 1 #### Archive Time Last Started: 1626721309 #### Archive Time Last Finished: 1626453560 #### User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15 #### Browser Language: en-us #### Total Invalidation Count: 4 #### In Progress Invalidation Count: 0 #### Scheduled Invalidation Count: 4 #### Earliest invalidation ts_started: #### Latest invalidation ts_started: #### Earliest invalidation ts_invalidated: 2021-07-16 16:59:21 #### Latest invalidation ts_invalidated: 2021-07-16 16:59:21 #### Number of segment invalidations: 0 #### Number of plugin invalidations: 0 #### List of plugins being invalidated: #### Anonymize Referrer: #### Do Not Track enabled: 1
@ulope commented on July 20th 2021

Turns out it was a configuration issue.

We're using caddy server and I had configured a redirect from / to /index.php instead of a rewrite.
Changing that fixes the problem.

Sorry for the noise.

This Issue was closed on July 20th 2021
Powered by GitHub Issue Mirror