getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
38.55k stars 4.12k forks source link

GitLab Integration Problem - oops something went wrong #51883

Open bkcsfi opened 1 year ago

bkcsfi commented 1 year ago

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

I am trying to add cloud (paid) sentry to my self-hosted gitlab instance (version 16.1)

In gitlab at the administration level, add application, set scope, redirect url, confidential, copy app id and secret, and complete.

Also in gitlab, allow outbound requests for webhooks and integrations to local network and:

35.186.247.156/32
35.188.42.15/32
sentry.io

In Sentry, click add integration, populate gitlab url, app id, secret - leave group path blank, include subgroups not checked, verify ssl is checked.

click submit

get result

Whoops! Looks like something went wrong! Give that another try.

An error occurred while validating your request.

My self-hosted gitlab is exposed to the internet, it runs on a non-standard port. The dns name resolves

The general format of the gitlab url I entered into the sentry form was https://mycompany.domain.us:1234

How do I troubleshoot this?

Expected Result

It should add my gitlab instance to sentry so that I can complete the configuration

Actual Result

Whoops! Looks like something went wrong! Give that another try.

An error occurred while validating your request.

Product Area

Settings - Integrations

Link

No response

DSN

https://6797ea9d911d4bb09f730beaa3aa<4chars removed>@o246532.ingest.sentry.io

Version

No response

┆Issue is synchronized with this Jira Improvement by Unito

getsantry[bot] commented 1 year ago

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] commented 1 year ago

Routing to @getsentry/product-owners-settings-integrations for triage ⏲️

leedongwei commented 1 year ago

@bkcsfi Hi. We can help to take a closer look but we might need more information. Can you reach out to support@sentry.io and let us know your organization slug? You can include a link to this thread so the support team can forward it to me.

bkcsfi commented 1 year ago

I have emailed support@sentry.io an example DSN so you can tie our account to this github issue.

Kobby-Bawuah commented 1 year ago

Hello @bkcsfi, thanks for reaching out to support. @leedongwei I will be syncing a Jira ticket with this Github issue to hold the user's PII. It will contain the needed slug and any other needed details.

bkcsfi commented 1 year ago

what else do you need from me to investigate? I believe you need to check the logs in sentry.io do we need to schedule a time for me to retry the setup?

bkcsfi commented 1 year ago

what else is needed to troubleshoot why sentry.io service doesn't work with my on-prem gitlab?

AniketDas-Tekky commented 1 year ago

Hi @bkcsfi, I'm taking over the issue and I'll get back to you ASAP once I have an update from my investigation

AniketDas-Tekky commented 1 year ago

@bkcsfi I took a look at your organization, and I noticed I don't see a gitlab integration installed.

bkcsfi commented 1 year ago

Right, there's no gitlab integration shown because the setup process fails with "Whoops! Looks like something went wrong! Give that another try." Please see the 'steps to reproduce".. sentry.io never completes the setup process.

Kobby-Bawuah commented 1 year ago

Hello @bkcsfi, it seems every time that specific error comes up it was due to an issue with the allowed IPs. Could you confirm you have whitelisted our IP ranges? Especially the outbound IP ranges? Could I also have you confirm if you have owner or maintainer permissions in GitLab and use the same email address in both user accounts?

bkcsfi commented 1 year ago

Per my initial post, I have 'whitelisted' the IP addresses per the sentry instructions, at least within gitlab.

We don't block any outgoing web requests, so gitlab is the only place that might block them.

I am the admin of our gitlab instance, and I am using the same email address for both gitlab and sentry.io

Since the 'something went wrong' happens on your side (in sentry.io), would it be profitable to arrange a specific time to retry the setup process, so that you could examine sentry.io logs to see if there were additional details that could be used to troubleshoot this process?

thanks

AniketDas-Tekky commented 1 year ago

@bkcsfi Hi, I was able to find your last installation attempt in our logs, but they didn't yield much useful information. I'll work on this some more on Monday.

AniketDas-Tekky commented 1 year ago

@bkcsfi apologies for the delay, I got sick over the weekend. I'm seeing 401 Unauthorized failures on our end from your last install attempt. I searched for the error message we received and this seems to be a common result: https://forum.mattermost.com/t/solved-client-authentication-failed-due-to-unknown-client/2117

I'm not sure if this is the cause, but I do believe the error you're seeing is a result of the 401.

patrickmichalina commented 11 months ago

I am seeing the same issue and was able to get around it by inputting correctly finally and finall the magic was I needed to purge the browser cache since my original tries were incorrect settings and those ended up being cached.