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

v2.23.3 does not compile for iOS #433

Closed antoinerousseau closed 4 years ago

antoinerousseau commented 4 years ago

Description

I upgraded bugsnag-react-native from 2.23.2 to 2.23.3 with Yarn, and ran pod install in ios/, but it broke the build.

Issue

❌ error: node_modules/bugsnag-react-native/cocoa/vendor/bugsnag-cocoa/Configurations/Config.xcconfig: unable to open file (in project "Bugsnag") (in target 'BugsnagStatic' from project 'Bugsnag')

Environment

Library versions:

yarn list v1.19.2
├─ bugsnag-react-native@2.23.2
└─ react-native@0.59.10
abigailbramble commented 4 years ago

Hi @antoinerousseau - does this issue persist if you delete your node modules directory and reinstall?

antoinerousseau commented 4 years ago

@phillipsam just tried it and still fails

[13:10:27]: $ set -o pipefail && xcodebuild -workspace ./ios/artefac.xcworkspace -scheme artefac -destination 'generic/platform=iOS' -archivePath /Users/antoine/Library/Developer/Xcode/Archives/2019-12-17/artefac\ 2019-12-17\ 13.10.27.xcarchive archive | tee /Users/antoine/Library/Logs/gym/artefac-artefac.log | xcpretty
[13:10:32]: ▸ ❌  error: /Users/antoine/Sites/artefac/mobile/node_modules/bugsnag-react-native/cocoa/vendor/bugsnag-cocoa/Configurations/Config.xcconfig: unable to open file (in project "Bugsnag") (in target 'BugsnagStatic' from project 'Bugsnag')
[13:10:32]: ▸ ❌  error: /Users/antoine/Sites/artefac/mobile/node_modules/bugsnag-react-native/cocoa/vendor/bugsnag-cocoa/Configurations/Config.xcconfig: unable to open file (in project "Bugsnag") (in target 'BugsnagStatic' from project 'Bugsnag')
[13:10:32]: ▸ ❌  error: /Users/antoine/Sites/artefac/mobile/node_modules/bugsnag-react-native/cocoa/vendor/bugsnag-cocoa/Configurations/Config.xcconfig: unable to open file (in project "Bugsnag") (in target 'BugsnagStatic' from project 'Bugsnag')
[13:10:32]: ▸     The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.2.99. (in target 'RCTVideo' from project 'RCTVideo')
[13:10:32]: ▸     The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 7.0, but the range of supported deployment target versions is 8.0 to 13.2.99. (in target 'RNFS' from project 'RNFS')
[13:10:32]: ▸ ** ARCHIVE FAILED **

FYI I'm using fastlane 2.137.0, Xcode 11.3 and macOS 10.15.2 (Catalina).

mattdyoung commented 4 years ago

@antoinerousseau We're unable to reproduce this. Do you have a reproduction case you can share with us?

It would also be useful to see how your Podfile is configured as i believe you're using React Native 0.59.10 which is before Cocoapods was introduced to React Native by default.

loga4 commented 4 years ago

@antoinerousseau remove target from Xcode -> Libraries

antoinerousseau commented 4 years ago

@mattdyoung here is my Podfile:

platform :ios, '9.3'

target 'artefac' do
  use_frameworks!
  pod 'ViroReact', :path => '../node_modules/react-viro/ios/'
  pod 'ViroKit', :path => '../node_modules/react-viro/ios/dist/ViroRenderer/'

end

module is linked manually because of restrictions in other librairies I use.

but it's fine i'm just going to keep using v2.23.2 until we can upgrade RN :)

fbartho commented 4 years ago

@mattdyoung We're not using Cocoapods, we're exhibiting this issue on react-native 0.59, and we don't see the Configurations directory in the node_modules/bugsnag-react-native/ directory when we checked.

Is Cocoapods required now?

fbartho commented 4 years ago

We've had bugsnag-react-native integrated for a while -- currently on 2.23.1, and it was a dependabot PR that updated us into triggering this issue.

mattdyoung commented 4 years ago

@fbartho No Cocoapods is not required on earlier versions of React Native. You should be able to link to bugsnag-react-native using the instructions for React Native < 0.60 shown here: https://docs.bugsnag.com/platforms/react-native/react-native/#installation

react-native link bugsnag-react-native
fbartho commented 4 years ago

That is our current setup. Despite that we're exhibiting the error:

error: node_modules/bugsnag-react-native/cocoa/vendor/bugsnag-cocoa/Configurations/Config.xcconfig: unable to open file (in project "Bugsnag") (in target 'BugsnagStatic' from project 'Bugsnag')
patik commented 4 years ago

I'm having the same error. RN 0.59, Cocoapods 1.8.4, Xcode 11.2.1. Clearing node_modules and re-running yarn add bugsnag-react-native doesn't help.

antoinedelp commented 4 years ago

I had the same issue. Reverting to bugsnag-react-native 2.23.2 fixes it for me. I do not have the same problem on another project running on react-native 0.61.6

Rutvik17 commented 4 years ago

I am having the same issue when i upgraded react native from 0.59.10 to 0.60.6 I can not build my project anymore and fails with node_modules/bugsnag-react-native/cocoa/vendor/bugsnag-cocoa/Configurations/Config.xcconfig: unable to open file (in project "Bugsnag") (in target 'BugsnagStatic' from project 'Bugsnag') my bugsnag version is ^2.23.2

tienzodi commented 4 years ago

I found and tried to delete Config.xcconfig inside BugsnagReactnative.xcodeproj below Libraries folder then it works. Can you try to find it? image

hndao commented 4 years ago

@tienzodi it works for me, thanks!

mattdyoung commented 4 years ago

Fixed in v2.23.5

ZeerakHameem32 commented 4 years ago

Hi, the app compiles on 2.23.5. But still cannot archive? any help? I am using react 0.61.5

abigailbramble commented 4 years ago

Hi @ZeerakHameem32 - thanks for reaching out. Can you please clarify what issue you are having?

ZeerakHameem32 commented 4 years ago

Hi, please look at the following screenshot. I am getting this error while archiving iOS build. It runs fine on the emulator though.

Screenshot 2020-02-05 at 7 35 40 PM

I tried v2.23.3 & 2.23.5 both had the same error. I am on React native 0.61.5 I just upgraded my react native version to 0.61.5. All other dependencies are set but I am unable to run Bugsnag.

abigailbramble commented 4 years ago

@ZeerakHameem32 - thanks. I will continue on #148 as it looks closer to the issue you are having.