bugsnag / bugsnag-react-native

Error monitoring and reporting tool for native exceptions and JS errors in React Native apps
https://docs.bugsnag.com/platforms/react-native
MIT License
369 stars 121 forks source link

iOS: Definition of '' must be imported from module #462

Closed chrisnovak closed 4 years ago

chrisnovak commented 4 years ago

Description

Upgraded patch version from 2.23.7, which was working.

Issue

Definition of '' must be imported from module 'BugsnagReactNative.BSG_KSMachHeaders' before it is required

in BSG_KSMachHeaders.h

Environment

Happens with both 2.23.8 and 2.23.9 on RN 61.4

[BugsnagReactNative start];
xljones commented 4 years ago

Hey @chrisnovak, if I upgrade the Bugsnag React Native library from 2.23.7->2.23.8 (or 2.23.7->2.23.9) using iOS 13.4.0 (or iOS 13.5.0) on a simulator, without running pod install in the ios directory, I get the following result:

'BSG_KSMachHeaders.h' file not found
#include "BSG_KSMachHeaders.h"

Did you update the pods after updating the Bugsnag RN library? Can you please run, from your project directory cd ios && pod install and retry running the application.

chrisnovak commented 4 years ago

I can confirm that I ran pod install. Did it again today and confirmed the changes to the Pods dir/Podfile.lock. Also did a rm -rf node_modules && npm i && cd ios && bundle exec pod install before cleaning/rebuilding in Xcode.

elyalvarado commented 4 years ago

I can confirm I'm having the same issue when upgrading from 2.23.7 to 2.23.9.

xljones commented 4 years ago

Hey @chrisnovak, @elyalvarado. I've been doing battle with this one to try and recreate but with no joy just yet. Since it looks like when you do a full clean/rebuild of your project, it would infer it could be something to do with how you've previously setup the project? Are you able to reproduce this issue within a minimal reproduction example that you could share with us? If you write in to support@bugsnag.com, we can provide an upload link if the project breaches email attachment sizes.

markpar commented 4 years ago

My Obj-C knowledge is not so great, but I'm happy to help validate any potential fixes. 🙂

abigailbramble commented 4 years ago

We have released an update in v2.23.10. We believe this should fix this issue. Please reach out if you continue to experience any issues with this.