Sentry blocked by CORS

Bug #1995397 reported by Peter Makowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
High
Unassigned

Bug Description

**Describe the bug**

Sentry requests are being blocked by CORS policy.

**Steps to reproduce**

1. Go to http://polong.internal:5240/MAAS/r/machines
2. Open Developer tools
3. The error below is being thrown in the console:

`Access to fetch at 'https://sentry.is.canonical.com/api/22/envelope/?sentry_key=901f18f8af164718b5cb34c869e6885d&sentry_version=7&sentry_client=sentry.javascript.browser%2F7.8.0' from origin 'http://polong.internal:5240' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.`

**maas-ui version**
3.3.0

**Additional context**
We might need to use a tunnel to workaround this. This would involve adding an item to the nginx configuration to redirect incoming requests to MAAS over to Sentry.

More information: https://docs.sentry.io/platforms/javascript/troubleshooting/#using-the-tunnel-option

Revision history for this message
Peter Makowski (petermakowski) wrote :

We should probably get this fixed before 3.3.0 release as we no longer receive Sentry bug reports.
Related GitHub issue: https://github.com/canonical/maas-ui/issues/4535

Changed in maas:
importance: Undecided → High
Revision history for this message
Alberto Donato (ack) wrote :

This needs a bit of discussion, as moving this to the backend requires it conditionally creating the tunnel based on whether reporting is enabled or not.

Also, the downside of moving this to the backend is that MAAS is likely to have more limited connectivity than users' browsers, although there doesn't really seem to be an alternative.

Revision history for this message
Peter Makowski (petermakowski) wrote :
Changed in maas:
assignee: Alberto Donato (ack) → Peter Makowski (petermakowski)
Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

This seems to be an infrastructure issue rather than a MAAS issue. Let's track the status of that issue via the corresponding RT ticket, which in the meantime also confirmed that this is a more widespread problem.

Changed in maas:
assignee: Peter Makowski (petermakowski) → nobody
status: New → Invalid
Changed in maas:
milestone: 3.3.0 → 3.3.0-beta3
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.