Skip to content
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

Fix crash when adding BugsnagReactNativePlugin #1392

Merged
merged 1 commit into from
May 26, 2022

Conversation

nickdowell
Copy link
Contributor

@nickdowell nickdowell commented May 25, 2022

Goal

Fix crash when starting Bugsnag with BugsnagReactNativePlugin.

BugsnagClient expects self.configuration.plugins to be of type NSMutableSet as advertised.

id<BugsnagPlugin> reactNativePlugin = [NSClassFromString(@"BugsnagReactNativePlugin") new];
if (reactNativePlugin) {
[self.configuration.plugins addObject:reactNativePlugin];
}

This bug has prevented updating bugsnag-cocoa in bugsnag-js

Changeset

Ensure plugins is a mutable set when copying a BugsnagConfiguration.

Testing

Amends unit test to replicate problem and verify fix.

@github-actions
Copy link

Bugsnag.framework binary size did not change - 820,608 bytes

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1%      +8  +0.1%      +8    __DATA,__objc_selrefs
  +0.0%      +8  +0.0%      +8    __TEXT,__text
  -0.1%      -8  -0.1%      -8    [__DATA]
  -0.1%      -8  -0.1%      -8    [__TEXT]
  [ = ]       0  [ = ]       0    TOTAL

Generated by 🚫 Danger

@nickdowell nickdowell merged commit 2a439b9 into next May 26, 2022
@nickdowell nickdowell deleted the nickdowell/fix-rn-plugin branch May 26, 2022 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants