Page MenuHomePhabricator

Problem with Matomo page overlay
Closed, InvalidPublic

Description

The page overlay system in Matomo has stopped loading.

Example (must be logged into the system)

Basically stays stuck at loading screen. I have tried different browsers (Chrome, Safari, and Firefox) as well as different sites and pages within Matomo - same result each time.

Screen Shot 2020-02-24 at 1.23.54 PM.png (904×470 px, 61 KB)

Event Timeline

Sorry, i cannot repro, maybe you want to talk to your team mates and see if they face similar problem?

To repo the outcome, go to the list of pages, click on the page overlay option, and see if the overylays actually appear. The page itself loads, but the overlays do not appear.

Having others check as well - and tried today on a different machine (both machines I have tried are running Mac OS) - but same problem. The page loads, but the overlays do not load.

The overlays are not loading for me either. Windows machine on Firefox. (To be clear, at the link provided anyone testing this needs to hover over "index" and click "open page overlay", which I originally didn't understand!)

Milimetric moved this task from Next Up to Done on the Analytics-Kanban board.

I found two possibilities. One might be the CORS headers are not set up on both the client site and the matomo site settings: https://forum.matomo.org/t/page-overlay-not-working-cross-domain-matomo-error-you-cant-access-this-resource-as-it-requires-view-access-for-the-website-id/29789/4

This would make sense with the 401 (unauthorized) error on the console. The second possibility is that there's a regression in Matomo but that seems unlikely:

  1. we have not deployed a new version between the time that this worked and this didn't work.
  2. the only bug I found that matches is https://github.com/matomo-org/matomo/pull/13420 which is fixed in 3.6.1 and we're on 3.11.0

So, my advice is to take a close look at the CORS headers on both sides, and if that doesn't work let us know.

This comment was removed by Nuria.

This would make sense with the 401 (unauthorized) error on the console

I think the 401 is because we are requesting https://piwik.wikimedia.org/plugins/CoreHome/javascripts/manifest.json which is not allowed to be served, however https://piwik.wikimedia.org/plugins/CoreHome/images/favicon.png is served so I think the manifest.json should not return a 401. That might be happening because of the content type of the json file which is text/html

cc @elukey in case this rings a bell. Now, I doubt fixing the manifest.json would fix the issue with the overlay

One might be the CORS headers are not set up on both the client site and the matomo site settings:

The link mentions CSP rather than CORS but as far as i can see neither are set on either end.

Let me know if there's any code we should be adding to the sites. This did work previously, but perhaps VIP has changed something on their end? I know they have been beefing up their security more lately.

Yes, I think VIP needs to check your headers to make sure they're right and the matomo settings align as well. I'm not sure how they've set them, but the linked article describes one way to make it work.