[Flaky CI]: Playwright esm Tests - thirdPartyErrorsFilter third-party error can fire before Sentry.init
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, playwright, typescript
Research direction
Start with suites/integrations/thirdPartyErrorsFilter/test.ts, template.html, and utils/generatePage.ts to compare when the first-party and third-party errors fire. The report suggests triggering the third-party error from a button click after page.goto, then checking that the test receives and tags the event. Run the named Playwright test in the esm suite to confirm the behavior.
Written by the indexing model from the issue text.
Description
Flakiness Type
Timeout
Name of Job
CI: Build & Test / Playwright esm (1/4) Tests
Name of Test
suites/integrations/thirdPartyErrorsFilter/test.ts › tags event if contains at least one third-party frame (chromium)
Link to Test Run
https://github.com/getsentry/sentry-javascript/actions/runs/42369835136/job/128396391992
Details
Failed 3 times on develop between Nov 5 and Nov 7 (run, run, run), always page.waitForRequest: Test timeout of 30000ms exceeded. The other test in the file hasn't failed.
I think it's a script-ordering race. template.html loads thirdPartyScript.js as a blocking script, which throws from a setTimeout(..., 100). The init bundle is injected with scriptLoading: 'defer' (utils/generatePage.ts), so it only runs after parsing. If the deferred init takes longer than 100 ms on a slow runner, the error fires before Sentry.init has installed the global handler, and no event is ever sent. The first-party test avoids this because its error comes from page.click after page.goto.
I haven't reproduced it locally. Suggested fix: have thirdPartyScript.js throw from a click handler on its own button, and click it in the test after page.goto, mirroring the first-party test. The error still only has a frame from the third-party script, so the assertion means the same thing. Happy to open a PR if that sounds right.
- Dominant language
- TypeScript
- Stars
- 8.8k
- Forks
- 1.9k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 637
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/sentry-javascript
-
Bug Node.js Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
getsentry/sentry-javascript#26202 · 2 comments ·
Maintainers usually reply within 1 day
-
Workers AI integration drops output of non-streaming chat responses in the OpenAI format (`choices`)Possibly taken @andreiborza claimed this 2 days ago. OpenBug Cloudflare Workers Spans Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsentry/sentry-javascript#26120 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Only create Nuxt database and storage spans when there is a parent spanPossibly taken @nicohrubec claimed this 9 days ago. OpenImprovement Nuxt
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
getsentry/sentry-javascript#25805 · 3 comments ·
Maintainers usually reply within 1 day
-
Only create Cloudflare storage and D1 db spans when there is a parent spanPossibly taken @nicohrubec claimed this 9 days ago. OpenCloudflare Workers Improvement Spans
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsentry/sentry-javascript#25804 · 1 comment ·
Maintainers usually reply within 1 day
-
Only create aws-sdk DynamoDB db spans when there is a parent spanPossibly taken @nicohrubec claimed this 9 days ago. OpenBug javascript
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
getsentry/sentry-javascript#25801 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
All issues in getsentry/sentry-javascript
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bytedance/flowgram.ai#1235 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
devswha/herdr-web-ui#3325 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
desktop v3 windows
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
esengine/DeepSeek-Reasonix#15016 · 1 comment ·
Maintainers usually reply within 1 day