Skip to content

Risk of wrongly spreading a string in captureRemixErrorBoundaryError #9279

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

Closed
3 tasks done
hanayashiki opened this issue Oct 17, 2023 · 7 comments · Fixed by #9664
Closed
3 tasks done

Risk of wrongly spreading a string in captureRemixErrorBoundaryError #9279

hanayashiki opened this issue Oct 17, 2023 · 7 comments · Fixed by #9664
Labels
hacktoberfest Meta: Help Wanted Package: remix Issues related to the Sentry Remix SDK

Comments

@hanayashiki
Copy link

hanayashiki commented Oct 17, 2023

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/remix

SDK Version

7.74.0

Framework Version

React 18.2.0

Link to Sentry event

https://monoid.sentry.io/issues/4545141368/events/1285f64c9bfb4e41af32e5447693ef81/?project=4506041272500224&query=is%3Aunresolved&referrer=next-event&statsPeriod=14d&stream_index=0

SDK Setup

No response

Steps to Reproduce

  1. Capture the error returned by useRouteError
export function ErrorBoundary() {
  const error = useRouteError();

  captureRemixErrorBoundaryError(error);
}
  1. Trigger a remix 404 error:
No routes matched location "/daw/" 
  1. The error tags look like a wrongly spreaded string:
image

Expected Result

The error message is displayed normally.

Actual Result

The error message is displayed like a spreaded string.

The root cause seems to be here:

When the event.data is a string, it will be spreaded into eventData as something like { 0: 'a', 1: 'b', 2: 'c' ... }, which scrambles the display of error data on the page.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 Oct 17, 2023
@github-actions github-actions bot added the Package: astro Issues related to the Sentry Astro SDK label Oct 17, 2023
@Lms24
Copy link
Member

Lms24 commented Oct 17, 2023

Hi @hanayashiki just to confirm, you're using @sentry/remix, correct? Asking because you selected @sentry/astro in the issue template.

@getsantry getsantry bot removed the status in GitHub Issues with 👀 Oct 17, 2023
@AbhiPrasad AbhiPrasad added Package: remix Issues related to the Sentry Remix SDK Meta: Help Wanted hacktoberfest and removed Package: astro Issues related to the Sentry Astro SDK labels Oct 17, 2023
@AbhiPrasad
Copy link
Member

Yeah seems like this is Remix specific. Backlogging for now, but PRs are welcome to fix!

@Dhoni77
Copy link

Dhoni77 commented Oct 18, 2023

Hi @AbhiPrasad I would like to work on this issue

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 Oct 18, 2023
@hanayashiki
Copy link
Author

Hi @hanayashiki just to confirm, you're using @sentry/remix, correct? Asking because you selected @sentry/astro in the issue template.

My bad, sorry

@AbhiPrasad
Copy link
Member

@Dhoni77 please go for it!

@hanayashiki
Copy link
Author

@Dhoni77 please go for it!

where did he go

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 Oct 30, 2023
@AbhiPrasad
Copy link
Member

Seems like he didn't pick it up - PRs are welcome from anyone else!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Meta: Help Wanted Package: remix Issues related to the Sentry Remix SDK
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants