grafana / oncall

Developer-friendly incident response with brilliant Slack integration
GNU Affero General Public License v3.0
3.44k stars 276 forks source link

Grafana OnCall `Publish To ChatOps` selection Not Working #4110

Closed qubitspace closed 5 months ago

qubitspace commented 5 months ago

What went wrong?

What happened: Clicking on the Publish To ChatOps selection for an integration route is not working. It just spins forever and never lets me enter a value for new integrations, or change the value for existing integrations.

What did you expect to happen: To be able to select a slack channel.

image

How do we reproduce it?

  1. Open Grafana OnCall and go to an integration.
  2. Click on the Publish to ChatOps selection
  3. Wait for the spinner to go away and some results to show up so i can set the channel.

Grafana OnCall Version

grafana oncall cloud

Product Area

Other

Grafana OnCall Platform?

I use Grafana Cloud

User's Browser?

edge

Anything else to add?

Multiple other people have reported the same issue to me.

qubitspace commented 5 months ago

It's a CORS error :(

Access to fetch at 'https://faro-collector-prod-us-central-0.grafana.net/collect/03a11ed03c3af04dcfc3be9755f2b053' from origin 'https://thetradedesk.grafana.net' 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. faro-collector-prod-us-central-0.grafana.net/collect/03a11ed03c3af04dcfc3be9755f2b053:1

    Failed to load resource: net::ERR_FAILED

instrumentation.js:23 Faro @grafana/faro-web-sdk:transport-fetch Failed sending payload to the receiver Objectevents: (2) [{…}, {…}]meta: {sdk: {…}, app: {…}, view: {…}, browser: {…}, page: {…}, …}[[Prototype]]: Object TypeError: Failed to fetch at eval (transport.js:58:28) at a (promiseBuffer.js:11:13) at eval (promiseBuffer.js:32:13) at new Promise () at Object.add (promiseBuffer.js:26:16) at Fu.eval (transport.js:49:42) at Generator.next () at eval (transport.js:7:71) at new Promise () at eval (transport.js:3:12)

qubitspace commented 5 months ago

I tried it again and I get this error.

SlackConnector.tsx:89 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'display_name') at getSearchResult (SlackConnector.tsx:89:7) at eval (GSelect.tsx:101:28)

qubitspace commented 5 months ago

Please let us know what more information is needed.

qubitspace commented 5 months ago

Sorry. 1 more follow up. Some search terms work, and some don't. It doesn't make sense to me. If i search for alert I get a bunch of results. image However if I search for a word that was from the previous results (so i know it exists) it doesn't work. image

It appears like it's failing for some search terms and not others :(

qubitspace commented 5 months ago

Last update. I think i found the issue.

It seems like it works if the results include the default slack channel (#dev-default-gronc-alerts in our case) Any search term that matches that will work, but any search term that doesn't match will get an error in the UI and fail to load the list of slack channels.

image

qubitspace commented 5 months ago

It also pushes the results below the bottom of the screen, and I can't select the bottom results. This wouldn't be a problem if i could just type the exact channel I want. However I have to include a keyword that matches the "default" channel or else I get that error and no results show up.

image

elburnetto-intapp commented 5 months ago

We're also seeing this behaviour too. OnCall Plugin 1.3.113 and OnCall OSS 1.3.113.

teodosii commented 5 months ago

Opened PR here that fixes the issue

iskhakov commented 5 months ago

Fixed in https://github.com/grafana/oncall/pull/4130