We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
RN New Architecture
sentry.io (SaS)
^6.0.0
error prepareBundle is not defined
FAILURE: Build failed with an exception.
Process 'command 'node'' finished with non-zero exit value 1
Sentry.init({ dsn: 'https://MYSENTRY_DNS', environment:"development", tracesSampleRate: 1.0, profilesSampleRate: 1.0, enableAutoSessionTracking: true, integrations: [navigationIntegration], _experiments: { replaysSessionSampleRate: 1.0, replaysOnErrorSampleRate: 1.0, }, enableAutoPerformanceTracing: true, enableAppStartTracking: true, });
Go to the metro.config.js
add following things =>
const { getDefaultConfig, mergeConfig } = require("@react-native/metro-config");
const { withSentryConfig } = require("@sentry/react-native/metro");
const myCustomSerializer = (entryPoint, preModules, graph, options) => { let bundle = prepareBundle(entryPoint, preModules, graph, options); if (options.sentryBundleCallback) { // Callback adds Sentry Debug IDs module to the bundle bundle = options.sentryBundleCallback(bundle); } const code = createCode(bundle); const map = createSourceMap(); return { code, map }; };
const config = { serializer:{ customSerializer:myCustomSerializer } };
module.exports = withSentryConfig(mergeConfig(defaultConfig, config));
It should be give the Debug id and works according to doc
https://docs.sentry.io/platforms/react-native/manual-setup/metro/
Getting Error when i was trying to Run my React native application.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What React Native libraries do you use?
RN New Architecture
Are you using sentry.io or on-premise?
sentry.io (SaS)
@sentry/react-native SDK Version
^6.0.0
How does your development environment look like?
error prepareBundle is not defined
FAILURE: Build failed with an exception.
Execution failed for task ':app:createBundleReviewDebugJsAndAssets'.
Sentry.init()
Sentry.init({
dsn: 'https://MYSENTRY_DNS',
environment:"development",
tracesSampleRate: 1.0,
profilesSampleRate: 1.0,
enableAutoSessionTracking: true,
integrations: [navigationIntegration],
_experiments: {
replaysSessionSampleRate: 1.0,
replaysOnErrorSampleRate: 1.0,
},
enableAutoPerformanceTracing: true,
enableAppStartTracking: true,
});
Steps to Reproduce
Go to the metro.config.js
add following things =>
const { getDefaultConfig, mergeConfig } = require("@react-native/metro-config");
const {
withSentryConfig
} = require("@sentry/react-native/metro");
const myCustomSerializer = (entryPoint, preModules, graph, options) => {
let bundle = prepareBundle(entryPoint, preModules, graph, options);
if (options.sentryBundleCallback) {
// Callback adds Sentry Debug IDs module to the bundle
bundle = options.sentryBundleCallback(bundle);
}
const code = createCode(bundle);
const map = createSourceMap();
return { code, map };
};
const config = {
serializer:{
customSerializer:myCustomSerializer
}
};
module.exports = withSentryConfig(mergeConfig(defaultConfig, config));
Expected Result
It should be give the Debug id and works according to doc
https://docs.sentry.io/platforms/react-native/manual-setup/metro/
Actual Result
Getting Error when i was trying to Run my React native application.
The text was updated successfully, but these errors were encountered: