Title: Session Replay start() method do not work after stop() in some cases · Issue #7192 · getsentry/sentry-javascript · GitHub
Open Graph Title: Session Replay start() method do not work after stop() in some cases · Issue #7192 · getsentry/sentry-javascript
X Title: Session Replay start() method do not work after stop() in some cases · Issue #7192 · getsentry/sentry-javascript
Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using the latest SDK release https://github.com/...
Open Graph Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
X Description: Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/7192
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Session Replay start() method do not work after stop() in some cases","articleBody":"### Is there an existing issue for this?\r\n\r\n- [X] I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues\r\n- [X] I have reviewed the documentation https://docs.sentry.io/\r\n- [X] I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases\r\n\r\n### How do you use Sentry?\r\n\r\nSentry Saas (sentry.io)\r\n\r\n### Which SDK are you using? If you use the CDN bundles, please specify the exact bundle (e.g. `bundle.tracing.min.js`) in your SDK setup.\r\n\r\n@sentry/angular\r\n\r\n### SDK Version\r\n\r\n7.37.1\r\n\r\n### Framework Version\r\n\r\n\"@sentry/angular\": \"7.37.1\",\r\n\r\n### Link to Sentry event\r\n\r\n_No response_\r\n\r\n### SDK Setup\r\n\r\n```javascript\r\nSentry.init({\r\ndns: myDNS,\r\n// without Replay intergation here, because we do not want create webworker now\r\n...,\r\nreplaysSessionSampleRate: 0, // I understand that 0 do not start session, I want to start and init with delay\r\nreplaysOnErrorSampleRate: 0,\r\n});\r\n...\r\nprivate myStart(){\r\nconst client: Client | undefined = Sentry.getCurrentHub().getClient();\r\n// enableReplay for example from variable from server\r\nif (client) {\r\n\tconst currentReplayIntegration: Replay | null = client.getIntegration(Replay);\r\n\tif (enableReplay) {\r\n\t\tconst options: BrowserOptions = client.getOptions();\r\n\t\toptions.replaysSessionSampleRate = 1; // I understand that I need to start with 1\r\n\t\tif (currentReplayIntegration) {\r\n\t\t\tcurrentReplayIntegration.flush();\r\n\t\t\tcurrentReplayIntegration.stop();\r\n// TODO if I have current session and I do not know now it is is progress or not I can not check it and I want to finish current replay session and start new or start new, I can safety use flush and stop\r\n// in some cases session do not started (I see in network that POST request do not send to sentry server), also it is do not work with timeout for example, for example after 3-5 calling method myStart() you can check that issue\r\n\t\t\tcurrentReplayIntegration.start();\r\n\t\t} else {\r\n\t\t\tclient.addIntegration(this.getSentryReplayIntegration());\r\n\t\t}\r\n\t} else {\r\n\t\tif (currentReplayIntegration) {\r\n\t\t\tcurrentReplayIntegration.flush();\r\n\t\t\tcurrentReplayIntegration.stop();\r\n\t\t}\r\n\t}\r\n} else {\r\n\t// unexpected case, log error here\r\n}\r\n}\r\n\r\n```\r\n\r\n### Steps to Reproduce\r\n\r\nsee above\r\n\r\n### Expected Result\r\n\r\nafter ReplayIntergation.stop() I can call .start() and new session should be started and send to the server\r\n\r\n### Actual Result\r\n\r\nlooks like after stop() new session can not started but I see new Worker created with new ID but POST requests do not send to the server in all","author":{"url":"https://github.com/expcapitaldev","@type":"Person","name":"expcapitaldev"},"datePublished":"2023-02-15T12:08:57Z","url":"https://github.com/getsentry/sentry-javascript/issues/7192"}
| 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:3d233aa1-a025-2aee-9f2d-fdd91cbd3578 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D0F8:8A81A:4CBF27:6A15E1:6B049FDA |
| html-safe-nonce | b9f329c20f9ebfa06094f18c4ebe951915ed2f78e830a47b4b2c67ce6b5fdaac |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMEY4OjhBODFBOjRDQkYyNzo2QTE1RTE6NkIwNDlGREEiLCJ2aXNpdG9yX2lkIjoiMzMxMDc5MjY0ODc3MTgwNTE0NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e95fa9b5e5727c672888065cedda5730f4768cb9cda2570bf88b659a6d3c09f5 |
| hovercard-subject-tag | issue:1585747076 |
| 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/7192/issue_layout |
| twitter:image | https://opengraph.githubassets.com/381902c06e076f6d091bbceef650d6b7e1eb39b85a4ca60e71e9552b84654488/getsentry/sentry-javascript/issues/7192 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/381902c06e076f6d091bbceef650d6b7e1eb39b85a4ca60e71e9552b84654488/getsentry/sentry-javascript/issues/7192 |
| og:image:alt | Is there an existing issue for this? I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues I have reviewed the documentation https://docs.sentry.io/ I am using th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | expcapitaldev |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9784b6f42e2d5eac4e394fa88cad134c0dc5b6662b4ff2787a1ed1ef5a96331d |
| 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 | 3fd14143b75b2af7b76bbd23b069867d091adfcc |
| 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