Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[On-Premise 24.8.0] Email invitation links become invalid immediately after sending #3305

Open
kostik2022 opened this issue Sep 1, 2024 · 11 comments

Comments

@kostik2022
Copy link

Environment
self-hosted (https://develop.sentry.dev/self-hosted/)

Steps to Reproduce
send an invitation email from /settings/sentry/members/ with "Resend Invitation".

click Join your team button in the received mail

Expected Result
The invitation link must function properly.

Actual Result
A message will appear on the web page that opens.
"This organization invite link is no longer valid.

Product Area
Settings - Members

Link
No response

DSN
No response

Version
24.8.0

Look like it was mentioned in #2561.
I faced this issue after upgrade from 23.5.1. NONE of hard stops are missed.

@kostik2022
Copy link
Author

...workaround with Incognito browser mode not works.

@hubertdeng123
Copy link
Member

Are there any logs that could be useful here? I am unable to reproduce this

@MarkCorneth
Copy link

Any updates regarding this issue? Or maybe a workaround by accepting/updating without the link?

@MarkCorneth
Copy link

MarkCorneth commented Sep 18, 2024

Are there any logs that could be useful here? I am unable to reproduce this

I've checked what happens during the accept invitation process and the page loads normally but the next request (/api/0/accept-invite) returns a bad request response indicating the link is incorrect. I checked the database but the link is there in the sentry_organizationmember table. There is an exception in the Django request.

Logs from docker

web-1   | 08:53:55 [INFO] sentry.access.api: api.access (method='GET' view='sentry.web.frontend.react_page.GenericReactPageView' response=200 user_id='1' is_app='False' token_type='None' is_frontend_request='True' organization_id='None' auth_id='None' path='/accept/21/9c0608d29c0f1fc1880e1c5f2f433f8072f28f799f6e29ca73a10b68c91faf2d/' caller_ip='PERSONAL_IP' user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36' rate_limited='False' rate_limit_category='None' request_duration_seconds=0.09740138053894043 rate_limit_type='DNE' concurrent_limit='None' concurrent_requests='None' reset_time='None' group='None' limit='None' remaining='None')
nginx-1 | PERSONAL_IP - - [18/Sep/2024:08:53:55 +0000] "GET /accept/21/9c0608d29c0f1fc1880e1c5f2f433f8072f28f799f6e29ca73a10b68c91faf2d/ HTTP/1.0" 200 7665 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" "PERSONAL_IP"
nginx-1 | PERSONAL_IP - - [18/Sep/2024:08:53:55 +0000] "GET /_static/1726649266/sentry/js/ads.js HTTP/1.0" 200 33 "https://REDACTED/accept/21/9c0608d29c0f1fc1880e1c5f2f433f8072f28f799f6e29ca73a10b68c91faf2d/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" "PERSONAL_IP"
nginx-1 | PERSONAL_IP - - [18/Sep/2024:08:53:55 +0000] "GET /_static/1726649266/sentry/images/sentry-loader.svg HTTP/1.0" 200 1009 "https://REDACTED/accept/21/9c0608d29c0f1fc1880e1c5f2f433f8072f28f799f6e29ca73a10b68c91faf2d/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" "PERSONAL_IP"
nginx-1 | PERSONAL_IP - - [18/Sep/2024:08:53:57 +0000] "GET /api/0/internal/health/ HTTP/1.0" 200 0 "https://REDACTED/accept/21/9c0608d29c0f1fc1880e1c5f2f433f8072f28f799f6e29ca73a10b68c91faf2d/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" "PERSONAL_IP"
nginx-1 | PERSONAL_IP - - [18/Sep/2024:08:53:57 +0000] "GET /_static/1726649266/sentry/images/favicon.png HTTP/1.0" 200 853 "https://REDACTED/accept/21/9c0608d29c0f1fc1880e1c5f2f433f8072f28f799f6e29ca73a10b68c91faf2d/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" "PERSONAL_IP"
web-1   | 08:53:57 [INFO] sentry.access.api: api.access (method='GET' view='sentry.api.endpoints.assistant.AssistantEndpoint' response=200 user_id='1' is_app='False' token_type='None' is_frontend_request='True' organization_id='None' auth_id='None' path='/api/0/assistant/' caller_ip='PERSONAL_IP' user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36' rate_limited='False' rate_limit_category='None' request_duration_seconds=0.047925710678100586 rate_limit_type='DNE' concurrent_limit='None' concurrent_requests='None' reset_time='None' group='None' limit='None' remaining='None')
nginx-1 | PERSONAL_IP - - [18/Sep/2024:08:53:57 +0000] "GET /api/0/assistant/ HTTP/1.0" 200 1082 "https://REDACTED/accept/21/9c0608d29c0f1fc1880e1c5f2f433f8072f28f799f6e29ca73a10b68c91faf2d/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" "PERSONAL_IP"
nginx-1 | PERSONAL_IP - - [18/Sep/2024:08:53:57 +0000] "GET /_static/1726649266/sentry/images/favicon-dark.png HTTP/1.0" 200 852 "https://REDACTED/accept/21/9c0608d29c0f1fc1880e1c5f2f433f8072f28f799f6e29ca73a10b68c91faf2d/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" "PERSONAL_IP"
web-1   | 08:53:57 [INFO] sentry.access.api: api.access (method='GET' view='sentry.api.endpoints.accept_organization_invite.AcceptOrganizationInvite' response=400 user_id='1' is_app='False' token_type='None' is_frontend_request='True' organization_id='None' auth_id='None' path='/api/0/accept-invite/21/9c0608d29c0f1fc1880e1c5f2f433f8072f28f799f6e29ca73a10b68c91faf2d/' caller_ip='PERSONAL_IP' user_agent='Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36' rate_limited='False' rate_limit_category='None' request_duration_seconds=0.02385258674621582 rate_limit_type='DNE' concurrent_limit='None' concurrent_requests='None' reset_time='None' group='None' limit='None' remaining='None')
web-1   | 08:53:57 [WARNING] django.request: Bad Request: /api/0/accept-invite/21/9c0608d29c0f1fc1880e1c5f2f433f8072f28f799f6e29ca73a10b68c91faf2d/ (status_code=400 request=<WSGIRequest: GET '/api/0/accept-invite/21/9c0608d29c0f1fc1880e1c5f2f433f8072f28f799f6e29ca73a10b68c91faf2d/'>)
nginx-1 | PERSONAL_IP - - [18/Sep/2024:08:53:57 +0000] "GET /api/0/accept-invite/21/9c0608d29c0f1fc1880e1c5f2f433f8072f28f799f6e29ca73a10b68c91faf2d/ HTTP/1.0" 400 33 "https://REDACTED/accept/21/9c0608d29c0f1fc1880e1c5f2f433f8072f28f799f6e29ca73a10b68c91faf2d/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" "PERSONAL_IP"

@hubertdeng123
Copy link
Member

Hmmm, maybe the system url prefix is wrong then? I'm not quite sure what else might be the case here. It may be useful to enable debug mode for logging. You can do this here:
https://develop.sentry.dev/application/config/#logging

@MarkCorneth
Copy link

I've checked the config, but the url-prefix is configured to match the domain where sentry is accessed:

./sentry/config.yml:system.internal-url-prefix: 'http://web:9000'
./sentry/config.yml:system.url-prefix: "https://sentry.OUR_DOMAIN"

I've also enabled LOGGING['default_level'] = 'DEBUG' to the ./sentry/sentry.conf.py file, but I'm not seeing more information in the docker container logs.

@MarkCorneth
Copy link

I'm using the latest version Sentry 24.9.0

@hubertdeng123
Copy link
Member

Unfortunately, I don't have any more ideas then.

@getsantry
Copy link

getsantry bot commented Nov 2, 2024

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry bot added the Stale label Nov 2, 2024
@BYK
Copy link
Member

BYK commented Nov 7, 2024

@MarkCorneth were you able to resolve this issue?

@MarkCorneth
Copy link

@BYK No, still not able to get the link working. My best guess is that a database migration failed during updating the version of Sentry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Product Owner
Status: No status
Development

No branches or pull requests

4 participants