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/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/browser
SDK Version
8.7.0
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
import {
BrowserClient,
makeFetchTransport,
Scope,
} from '@sentry/browser'
let transport = makeFetchTransport;
const defaultConfig = {
transport,
…..
}
const browserClient = new BrowserClient({
...defaultConfig,
…..
})
const serviceInstance = new Scope()
serviceInstance.setClient(browserClient)
….
browserClient.init()
…
serviceInstance.captureException(message, {
captureContext: {
.....
}
})
Steps to Reproduce
Send the Sentry request (along with all the required options), using the sample code given.
Observation:
Getting the error in Firefox Parent process Browser Console:
Got a request https://sentry-*****************/&sentry_client=sentry.javascript.browser%2F8.7.0 without a browsingContextID set
Sentry request is shown in the third-party proxy tools, e.g. Fiddler
Figured out that in Firefox 133, fetch API related bug fixes are made:
https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/133
Workaround:
Tried with a custom fetch transport, the request is listed in the DevTools and no error in the browser console.
function makeCustomFetchTransport(options) {
function makeRequest(request) {
const requestOptions = {
body: request.body,
method: 'POST',
referrerPolicy: 'origin',
headers: options.headers,
...options.fetchOptions,
};
return fetch(options.url, requestOptions).then(response => ({
statusCode: response.status,
headers: {
'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),
'retry-after': response.headers.get('Retry-After'),
},
}));
}
return createTransport(options, makeRequest);
}
It would be helpful if the support is given from Sentry SDK itself.
Expected Result
Sentry request is listed in Firefox DevTools.
Actual Result
Sentry request is not listed in the DevTools, but getting below error in the Firefox Parent process Browser console
Note: Press CMD+Shift+J to open Firefox Parent process Browser console
Metadata
Metadata
Assignees
Type
Projects
Status