Title: Cloudflare Workflow reports runtime cancellation after successful run during Sentry teardown · Issue #23111 · getsentry/sentry-javascript · GitHub
Open Graph Title: Cloudflare Workflow reports runtime cancellation after successful run during Sentry teardown · Issue #23111 · getsentry/sentry-javascript
X Title: Cloudflare Workflow reports runtime cancellation after successful run during Sentry teardown · Issue #23111 · getsentry/sentry-javascript
Description: Environment @sentry/cloudflare 10.69.0 Cloudflare Workflows Problem The Workflow completes successfully, but the Workers runtime subsequently reports: The Workers runtime canceled this request because it detected that your Worker code ha...
Open Graph Description: Environment @sentry/cloudflare 10.69.0 Cloudflare Workflows Problem The Workflow completes successfully, but the Workers runtime subsequently reports: The Workers runtime canceled this request beca...
X Description: Environment @sentry/cloudflare 10.69.0 Cloudflare Workflows Problem The Workflow completes successfully, but the Workers runtime subsequently reports: The Workers runtime canceled this request beca...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/23111
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Cloudflare Workflow reports runtime cancellation after successful run during Sentry teardown","articleBody":"### Environment\n\n- `@sentry/cloudflare` 10.69.0\n- Cloudflare Workflows\n\n### Problem\n\nThe Workflow completes successfully, but the Workers runtime subsequently reports:\n\n> The Workers runtime canceled this request because it detected that your Worker code had hung and would never generate a response.\n\n### Evidence\n\nFor one staging invocation:\n\n- `workflow_complete`: `2026-08-06T15:02:11.150Z`\n- `finalization_outcome`: `2026-08-06T15:02:11.572Z`\n- `workflow_wrapper_outcome` with final status `SUCCESS`: `2026-08-06T15:02:11.587Z`\n- Workers runtime cancellation: `2026-08-06T15:02:13.572Z`\n\nThe cancellation occurred approximately 1.985 seconds after the successful wrapper outcome, matching the 2-second Sentry flush timeout. Application work and finalization had completed; the cancellation followed Sentry teardown scheduled through `waitUntil`.\n\n### Relationship to #23005 and #23017\n\nIssue #23005 identified a Workflow-instance reuse deadlock caused by capturing Sentry instrumented `waitUntil`. PR #23017 fixed that by using `getOriginalWaitUntil(context)`. The post-success cancellation still occurs.\n\nWe are testing a local mitigation that awaits `flushAndDispose(client)` before the Workflow `run()` returns, instead of scheduling Sentry teardown through `waitUntil`.\n\n### Expected behavior\n\nA successfully completed Workflow should not produce a later Workers runtime cancellation, while Sentry teardown remains safely flushed and disposed.\n\nPlease investigate whether Workflow instrumentation should await teardown, use a different lifecycle mechanism, or otherwise prevent Sentry teardown from being treated as hung by the Workers runtime.\n\nRelated: #23005, #23017","author":{"url":"https://github.com/matthew-gizmo","@type":"Person","name":"matthew-gizmo"},"datePublished":"2026-08-06T17:20:21Z","url":"https://github.com/getsentry/sentry-javascript/issues/23111"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2c13b8ef-cc63-4432-49bc-80a4168fe452 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9F28:8F74F:3B53:4ACA:6B04301D |
| html-safe-nonce | f5a40a0ae571ca822af31fcb03419d08199667137b4e79a3e69a2a76a24adecc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjI4OjhGNzRGOjNCNTM6NEFDQTo2QjA0MzAxRCIsInZpc2l0b3JfaWQiOiIxMzAzNzUzMDQ0MDc2NTM5OTMzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 32dc7bb9c81ca4791780f9160211cf0ce45ba09a00684edced5c706a0347fd22 |
| hovercard-subject-tag | issue:5083487819 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/23111/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8dc21764cd8883a4808e00718bc4ce4de5ff8007e7103dd62a4bdc7f46fd18bd/getsentry/sentry-javascript/issues/23111 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8dc21764cd8883a4808e00718bc4ce4de5ff8007e7103dd62a4bdc7f46fd18bd/getsentry/sentry-javascript/issues/23111 |
| og:image:alt | Environment @sentry/cloudflare 10.69.0 Cloudflare Workflows Problem The Workflow completes successfully, but the Workers runtime subsequently reports: The Workers runtime canceled this request beca... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | matthew-gizmo |
| hostname | github.com |
| expected-hostname | github.com |
| None | b7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c3dd496c3da6ea6b77e69c09279d2b81604654f1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width