rollbar / rollbar-react-native

Crash and error reporting for React Native using Rollbar
https://docs.rollbar.com/docs/react-native
62 stars 39 forks source link

iOS build fails #180

Closed as-radek closed 8 months ago

as-radek commented 1 year ago

There is an error when building iOS (min: 14)

[...]/Pods/RollbarCommon/RollbarCommon/Sources/RollbarCommon/DTOs/RollbarDTO+Protected.m:258:33 No known class method for selector 'rollbar_dateFromString:'

as well as [...]]/Pods/RollbarCommon/RollbarCommon/Sources/RollbarCommon/DTOs/RollbarDTO+Protected.m:287:38 No visible @interface for 'NSDate' declares the selector 'rollbar_toString'

Followed the docs, but maybe there are any additional steps I should take? Looks like library issue though

ghost commented 1 year ago

Hey @as-radek, Can share which Rollbar SDK version you use?

as-radek commented 1 year ago

I'm installing

According to podspec in rollbar-react-native it require RollbarNotifier for 3.0.3

ghost commented 1 year ago

The latest Apple SDK resolved this issue, but the React Native SDK wasn't updated yet. I file an internal ticket to update the React Native SDK.

guilherme-vp commented 12 months ago

Hi, are there any updates or workarounds for this issue? I am not able to use the SDK as well.

as-radek commented 12 months ago

I've ended up working with react-sdk only, removing native sdk. Rollbar is sending proper requests only from JS side

ghost commented 11 months ago

@guilherme-vp The bugfix is on the backlog, but it will take some time to get there. We're working on some other high priority items currently.

vpetrykov commented 11 months ago

Good afternoon everyone, here's an update on the current issue:

Could someone provide more insight into this?

waltjones commented 10 months ago

Hi all, I'm looking at this. Will reply here with follow up.

waltjones commented 10 months ago

In my testing, the originally reported errors are caused by duplicate interface definition for class 'RollbarDTO', and that was caused by an inconsistent cache.

Using the --no-build-cache option solved this issue, and the build was successful.

expo run:ios  --no-build-cache
waltjones commented 10 months ago

I've tested different permutations with and without either use_frameworks! and use_modular_headers!. In all cases, the build succeeded when using use_frameworks! and failed as described above without use_frameworks!.

The most challenging part of testing these variations was ensuring I had a clean pod cache. Configurations would seem to succeed or fail, only to find cached pods were still being used from a previous build.

There is a new release available which uses the latest rollbar-apple dependency. This is the version I tested. If you're seeing the above error while use_frameworks! is set, it might be worthwhile to try the new release.

https://github.com/rollbar/rollbar-react-native/releases/tag/v1.0.0-beta.2