-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
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
Migration from 0.6.1 to 0.7.0 breaks debugger #101
Comments
@OzzieOrca Thank you for the report. Didn't see this here, but will investigate. Can you try setting |
Yup this works: import { Client, Configuration } from 'rollbar-react-native';
import Config from 'react-native-config';
import { Platform } from 'react-native';
import DeviceInfo from 'react-native-device-info';
const codeVersion = `${Config.TRAVIS_COMMIT || 'development'}.${Platform.OS}`;
const config = new Configuration(Config.ROLLBAR_ACCESS_TOKEN, {
enabled: !__DEV__,
+ captureDeviceInfo: false,
payload: {
appVersion: DeviceInfo.getBuildNumber(),
codeBundleId: codeVersion,
client: {
javascript: {
source_map_enabled: true,
guess_uncaught_frames: true,
code_version: codeVersion,
},
},
},
});
export const rollbar = new Client(config); Thanks for the quick reply! Do you have any docs on what info it collects? I may just stay at the old version if there's something useful in there. |
To clarify, those errors are without setting |
Correct. Yes |
I was looking at the diff between 0.6.1 and 0.7.0 f98a982...cf3ae7a Is the |
Great, that's what I expected. Just making sure. This feature is new to 0.7.0, so an earlier version won't have the extra metadata. The feature adds device information to payloads that are sent from the Javascript side. The metadata is retrieved synchronously (which is what causes the Chrome debugger issue) in order to include it in the initial config of rollbar.js, and still ensure rollbar.js inits before other application code runs. Ideally you'd disable while debugging and still be able to enable in production. Example data in the payload: iOS
Android:
|
Ok cool. Thanks for your help and quick responses! Hopefully the defaults can get better :) Here's what I'm going with for now: import { Client, Configuration } from 'rollbar-react-native';
import Config from 'react-native-config';
import { Platform } from 'react-native';
import DeviceInfo from 'react-native-device-info';
const codeVersion = `${Config.TRAVIS_COMMIT || 'development'}.${Platform.OS}`;
const config = new Configuration(Config.ROLLBAR_ACCESS_TOKEN, {
enabled: !__DEV__,
captureDeviceInfo: !__DEV__, // New feature in rollbar-react-native 0.7.0 that breaks Chrome debugging https://github.com/rollbar/rollbar-react-native/issues/101. Disabling in dev.
payload: {
appVersion: DeviceInfo.getBuildNumber(),
codeBundleId: codeVersion,
client: {
javascript: {
source_map_enabled: true,
guess_uncaught_frames: true,
code_version: codeVersion,
},
},
},
});
export const rollbar = new Client(config); |
Looks good. 0.7.1 will have this off by default, and that will be released shortly. |
Hey @waltjones, I face the same issue in 0.7.1, I think it is because of the cache. One may want to do it first clear pod cache before updating the version. |
Migrating to
0.7.0
crashes the app when trying to use the Chrome debugger.Running
react-native
0.61.2
.I get the following error:
Here's my rollbar config:
The text was updated successfully, but these errors were encountered: