Archiver: 'The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.'

Hi Community,

We have just upgraded our Matomo installation (our test instance only, so far) from version 3.13.5 to version 4.12.0.
We are running in Azure App Service (Microsoft-IIS/10.0)
Matomo version 4.12.0
PHP version 7.4.30
Curl Version 7.70.0, OpenSSL/1.1.1o

We are now getting archiver errors like this:

C:\home\site\wwwroot\matomo>php.exe console core:archive --url=https://%MATOMO_GENERAL_ARCHIVEURL%/matomo --force-idsites=3 --concurrent-requests-per-website="8" --concurrent-archivers="8" --php-cli-options="-d SCM_COMMAND_IDLE_TIMEOUT=1800" 
ERROR [2023-01-17 23:59:09] 6684  Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=3&period=day&date=2023-01-17&format=json&trigger=archivephp: 'The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.'
ERROR [2023-01-17 23:59:09] 6684  Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=3&period=day&date=2023-01-13&format=json&trigger=archivephp: 'The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.'
ERROR [2023-01-17 23:59:09] 6684  Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=3&period=day&date=2023-01-12&format=json&trigger=archivephp: 'The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.'
ERROR [2023-01-17 23:59:09] 6684  Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=3&period=week&date=2023-01-16&format=json&trigger=archivephp: 'The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.'
ERROR [2023-01-17 23:59:09] 6684  Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=3&period=week&date=2023-01-09&format=json&trigger=archivephp: 'The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.'
ERROR [2023-01-17 23:59:09] 6684  Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=3&period=month&date=2023-01-01&format=json&trigger=archivephp: 'The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.'
ERROR [2023-01-17 23:59:09] 6684  Error unserializing the following response from ?module=API&method=CoreAdminHome.archiveReports&idSite=3&period=year&date=2023-01-01&format=json&trigger=archivephp: 'The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.'
ERROR [2023-01-17 23:59:10] 6684  7 total errors during this script execution, please investigate and try and fix these errors.
ERROR [2023-01-17 23:59:10] 6684  Uncaught exception: C:\home\site\wwwroot\matomo\core\CronArchive.php(625): 7 total errors during this script execution, please investigate and try and fix these errors. [Query: , CLI mode: 1]

[Exception]
7 total errors during this script execution, please investigate and try and fix these errors.  

Has anyone seen errors like this?

Additional info

Plugins Activated:

API, AbTesting 4.1.7, Actions, ActivityLog 4.0.6, AdminNotification 4.0.0, Annotations, AnonymousPiwikUsageMeasurement 4.1.0, BulkTracking, Cohorts 4.0.5, Contents, CoreAdminHome, CoreConsole, CoreHome, CorePluginsAdmin, CoreUpdater, CoreVisualizations, CoreVue, CustomDimensions, CustomJsTracker, CustomReports 4.0.15, CustomVariables 4.1.1, DBStats, Dashboard, DevicePlugins, DevicesDetection, Diagnostics, Ecommerce, EnvironmentVariables 4.0.1, Events, ForceSSL 4.0.1, FormAnalytics 4.1.0, Funnels 4.0.11, GeoIp2, Goals, GroupPermissions 4.0.5, Heartbeat, HeatmapSessionRecording 4.5.0, ImageGraph, Insights, Installation, Intl, IntranetMeasurable, InvalidateReports 4.1.1, LanguagesManager, Live, LogViewer 4.1.1, Login, LoginSaml 4.1.2, MediaAnalytics 4.1.4, Monolog, Morpheus, MultiChannelConversionAttribution 4.0.5, MultiSites, Overlay, PagePerformance, PrivacyManager, Proxy, Referrers, Resolution, RollUpReporting 4.1.0, RssWidget, SEO, ScheduledReports, SearchEngineKeywordsPerformance 4.3.8, SecurityInfo 4.0.2, SegmentEditor, SitesManager, TagManager, Tour, Transitions, TwoFactorAuth, UserCountry, UserCountryMap, UserId, UserLanguage, UsersFlow 4.0.4, UsersManager, VisitFrequency, VisitTime, VisitorInterest, VisitsSummary, WebsiteMeasurable, Widgetize

Plugins Deactivated:

Feedback, Marketplace, MobileAppMeasurable, MobileMessaging, ProfessionalServices, Provider 4.0.5

Hi @sdmolloy
I would have upgraded first to 3.14.1 then to 4.0.0 then to 4.12.0…

Coming back to your issue, I suggest you create an issue in the Matomo GitHub repo:

1 Like

Followup - Resolution

So initially I couldnt find any solution for the above problem and ended up rolling back to the previous 3.13.5 version.
On rollback, it continued to get the problem, which was completely baffling and frustrating. Since it was only my non-prod test instance, I had to leave it be for a while, while I continued to search for an answer.
Fast-fowrard February 2025 and it was time to update security certificates, and after the certificate update, the problem with archiving magically disappeared. Which was AGAIN frustrating because nothing else changed.
So I then prepared to try the upgrade to 4.0.5 again, and on Friday (3/28/25) I completed the upgrade again.
And naturally, the archiving problem came back! Ugh!
However this time my troubleshooting research led me to a solution that appears to have fixed my issue.
What causes an HTTP 405 “invalid method (HTTP verb)” error when POSTing a form to PHP on IIS? - Stack Overflow

The fix was adding a slash at the end of my matomo URL
–url=https://%MATOMO_GENERAL_ARCHIVEURL%/matomo/
And that stopped getting errors in Archiving.

So, at this point, I just hope that that fix holds and the problem doesnt randomly come back.