matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.94k stars 2.66k forks source link

[Bug] There was an error while updating the javascript tracker: No entry or class found for 'advanced_campaign_reporting.uri_parameters.campaign_name' #22015

Closed mikkeschiren closed 8 months ago

mikkeschiren commented 8 months ago

What happened?

When installning Matomo 5.0.3 these errors spawns the logs (both fresh install and updated):

│ ERROR     [2024-03-11 07:52:29] 10  There was an error while updating the javascript tracker: No entry or class found for 'advanced_campaign_reporting.uri_parameters.campaign_name'                                                                                                    │
│ ERROR     [2024-03-11 07:52:29] 10  There was an error while updating the javascript tracker: No entry or class found for 'advanced_campaign_reporting.uri_parameters.campaign_name'                                                                                                    │
│ ERROR     [2024-03-11 07:52:29] 10  There was an error while updating the javascript tracker: No entry or class found for 'advanced_campaign_reporting.uri_parameters.campaign_name'                                                                                                    │
│ ERROR     [2024-03-11 07:52:29] 10  There was an error while updating the javascript tracker: No entry or class found for 'advanced_campaign_reporting.uri_parameters.campaign_name'                                                                                                    │
│ ERROR     [2024-03-11 07:52:29] 10  There was an error while updating the javascript tracker: No entry or class found for 'advanced_campaign_reporting.uri_parameters.campaign_name'                                                                                                    │
│ ERROR     [2024-03-11 07:52:29] 10  There was an error while updating the javascript tracker: No entry or class found for 'advanced_campaign_reporting.uri_parameters.campaign_name'                                                                                                    │
│ ERROR     [2024-03-11 07:52:29] 10  There was an error while updating the javascript tracker: No entry or class found for 'advanced_campaign_reporting.uri_parameters.campaign_name'                                                                                                    │
│ ERROR     [2024-03-11 07:52:29] 10  There was an error while updating the javascript tracker: No entry or class found for 'advanced_campaign_reporting.uri_parameters.campaign_name'

5.0.3 uses same version of MarketingCampaignsReporting as 5.0.2. So I am not sure where the issues comes from at this moment. We didn't get this issue in 5.0.2.

What should happen?

No errors should spawn the logs.

How can this be reproduced?

Install Matomo 5.0.3, with these plugins:

PluginsInstalled[] = "API"
PluginsInstalled[] = "AbTesting"
PluginsInstalled[] = "Actions"
PluginsInstalled[] = "ActivityLog"
PluginsInstalled[] = "AdminNotification"
PluginsInstalled[] = "Annotations"
PluginsInstalled[] = "BotTracker"
PluginsInstalled[] = "BulkTracking"
PluginsInstalled[] = "Contents"
PluginsInstalled[] = "CoreAdminHome"
PluginsInstalled[] = "CoreConsole"
PluginsInstalled[] = "CoreHome"
PluginsInstalled[] = "CorePluginsAdmin"
PluginsInstalled[] = "CoreUpdater"
PluginsInstalled[] = "CoreVisualizations"
PluginsInstalled[] = "CoreVue"
PluginsInstalled[] = "CustomAlerts"
PluginsInstalled[] = "CustomDimensions"
PluginsInstalled[] = "CustomJsTracker"
PluginsInstalled[] = "CustomReports"
PluginsInstalled[] = "CustomVariables"
PluginsInstalled[] = "DBStats"
PluginsInstalled[] = "Dashboard"
PluginsInstalled[] = "DevicePlugins"
PluginsInstalled[] = "DevicesDetection"
PluginsInstalled[] = "Diagnostics"
PluginsInstalled[] = "DigiTracking"
PluginsInstalled[] = "DisableWarnings"
PluginsInstalled[] = "Ecommerce"
PluginsInstalled[] = "Events"
PluginsInstalled[] = "ExtraTools"
PluginsInstalled[] = "FormAnalytics"
PluginsInstalled[] = "Funnels"
PluginsInstalled[] = "GeoIp2"
PluginsInstalled[] = "Goals"
PluginsInstalled[] = "GoogleAnalyticsImporter"
PluginsInstalled[] = "GroupPermissions"
PluginsInstalled[] = "Heartbeat"
PluginsInstalled[] = "HeatmapSessionRecording"
PluginsInstalled[] = "ImageGraph"
PluginsInstalled[] = "Insights"
PluginsInstalled[] = "Installation"
PluginsInstalled[] = "Intl"
PluginsInstalled[] = "IntranetMeasurable"
PluginsInstalled[] = "InvalidateReports"
PluginsInstalled[] = "LanguagesManager"
PluginsInstalled[] = "Live"
PluginsInstalled[] = "LogViewer"
PluginsInstalled[] = "Login"
PluginsInstalled[] = "MarketingCampaignsReporting"
PluginsInstalled[] = "MediaAnalytics"
PluginsInstalled[] = "MobileAppMeasurable"
PluginsInstalled[] = "Monolog"
PluginsInstalled[] = "Morpheus"
PluginsInstalled[] = "MultiChannelConversionAttribution"
PluginsInstalled[] = "MultiSites"
PluginsInstalled[] = "PagePerformance"
PluginsInstalled[] = "PrivacyManager"
PluginsInstalled[] = "ProfessionalServices"
PluginsInstalled[] = "Proxy"
PluginsInstalled[] = "QueuedTracking"
PluginsInstalled[] = "Referrers"
PluginsInstalled[] = "Resolution"
PluginsInstalled[] = "RssWidget"
PluginsInstalled[] = "SEO"
PluginsInstalled[] = "SEOWebVitals"
PluginsInstalled[] = "ScheduledReports"
PluginsInstalled[] = "SearchEngineKeywordsPerformance"
PluginsInstalled[] = "SecurityInfo"
PluginsInstalled[] = "SegmentEditor"
PluginsInstalled[] = "Sentry"
PluginsInstalled[] = "SitesManager"
PluginsInstalled[] = "Tour"
PluginsInstalled[] = "TrackerDomain"
PluginsInstalled[] = "TrackingSpamPrevention"
PluginsInstalled[] = "Transitions"
PluginsInstalled[] = "TreemapVisualization"
PluginsInstalled[] = "TwoFactorAuth"
PluginsInstalled[] = "UserConsole"
PluginsInstalled[] = "UserCountry"
PluginsInstalled[] = "UserCountryMap"
PluginsInstalled[] = "UserId"
PluginsInstalled[] = "UserLanguage"
PluginsInstalled[] = "UsersFlow"
PluginsInstalled[] = "UsersManager"
PluginsInstalled[] = "VisitFrequency"
PluginsInstalled[] = "VisitTime"
PluginsInstalled[] = "VisitorInterest"
PluginsInstalled[] = "VisitsSummary"
PluginsInstalled[] = "WebsiteMeasurable"
PluginsInstalled[] = "Widgetize"
PluginsInstalled[] = "TagManager"
PluginsInstalled[] = "JsTrackerInstallCheck"

Matomo version

5.0.3

PHP version

8.1.27

Server operating system

Linux/alpine

What browsers are you seeing the problem on?

No response

Computer operating system

No response

Relevant log output

No response

Validations

mikkeschiren commented 8 months ago

Seems to be caused by a patch we had for a long time for MarketingCampaignsReporting, removing the install function totaly, so we changed to keep this in the install:

     public function install()
     {
         $tables = \Piwik\DbHelper::getTablesInstalled();
         Plugin\Manager::getInstance()->deactivatePlugin('AdvancedCampaignReporting');
     }

And just remove the parts we don't need. It seems the getInstance is needed since 5.0.3 to get it work properly. As this was an edge case, I am closing this.

mikkeschiren commented 8 months ago

I was wrong about the cause, my limited testing was wrong. The cause was the premium plugin AbTesting. When installing, AbTesting it is calling MarketingCampaignsReporting, through the registred event CustomJsTracker.manipulateJsTracker. which triggers the function manipulateJsTracker, which is for some reason since 5.0.3 also is triggered on installation. So we needed to patch AbTesting to not run when installation is in progress.

michalkleiner commented 8 months ago

Hi @mikkeschiren. As AbTesting is a premium plugin, please contact Matomo's support with this issue.

mikkeschiren commented 8 months ago

Yes, but could you please remove the invalid tag from the issue? For visibility reasons @michalkleiner .

michalkleiner commented 8 months ago

The issue is not relevant to the core Matomo application, so I think the tag is fine. What visibility/where you think it might impact when the issue is closed?

mikkeschiren commented 8 months ago

From my perspective - the tag "invalid" says that the issue is not correct. If you think it should stay, I have no issue with that, but for us, it was not invalid, as the bug was real and would effect other users of the same Premium plugin.

I normaly check open and closed issues for issues we are having, so from my perpspective, the tagging helps.

michalkleiner commented 8 months ago

We appreciate your perspective and thanks for reiterating that.

The issue related to the premium plugin is relevant, but it's not valid for Matomo core itself, as this issue tracker is purely for issues related to Matomo core.

Premium plugins don't have public issue trackers and bugs and feature requests are communicated through the support team.

I've updated the tag description to be more specific it's about Matomo core.