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

fix(highlights): Fix crashing on null tag keys #70364

Merged
merged 3 commits into from
May 6, 2024

Conversation

leeandher
Copy link
Member

Resolves https://sentry.sentry.io/issues/5243747663/?project=11276

Not sure why tags are coming in with null or undefined keys, but we can't display those so they will be omitted, letting the rest of the component render as per usual.

Also adding the team as a codeowner to help assignment for this stuff.

@leeandher leeandher requested a review from a team as a code owner May 6, 2024 17:28
@leeandher leeandher requested a review from a team May 6, 2024 17:28
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 6, 2024
Comment on lines +47 to +49
if (!defined(tag.key)) {
return tree;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't the backend api which is producing garbage be fixed instead? this just hides the bug

Copy link
Member Author

@leeandher leeandher May 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There might be a valid reason for these null keys even if I wasn't able to replicate it or test with it myself, it would be hasty to make changes like that since this UI is behind a flag and the previous UI had no issues -- It has been receiving null keys for some time, it'd seem.

This error was triggered from an EA group accessing a new interface I built for the frontend, so this fix provides the best compatibility with users who don't have access to the flags, without changing their experience of the legacy UI.

I will look into where the null keys come from to make sure we can account for it in the new UI, but for now I find this to be the best approach.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have you looked into what's causing the null? I really think we should be striving for quality here instead of hacking around our own bugs in the frontend

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spent a while investigating. The null values seem to come from invalid keys set for tags in the user's SDK. Things like /, \n or emoji. I created an issue to track the root cause separately.

I'd appreciate getting unblocked this to allow users to use their issues page. We can prioritize the root cause fix when appropriate.

@asottile-sentry asottile-sentry dismissed their stale review May 6, 2024 21:04

unblock the hack

@leeandher leeandher merged commit 14637c2 into master May 6, 2024
42 checks passed
@leeandher leeandher deleted the leander/JAVASCRIPT-2SRG branch May 6, 2024 21:10
Copy link

sentry-io bot commented May 15, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ Error: useLocation() may be used only in the context of a component. useLocation(useLocation.tsx) View Issue

Did you find this useful? React with a 👍 or 👎

@github-actions github-actions bot locked and limited conversation to collaborators May 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants