Sentry-react-native: iOS: No visible @interface for 'SentryClient'

Created on 10 Apr 2017  路  9Comments  路  Source: getsentry/sentry-react-native

Hi guys,
After adding the plugin to my app, I receive this error at build:

node_modules/react-native-sentry/ios/RNSentry.m:239:28: No visible @interface for 'SentryClient' declares the selector 'reportReactNativeCrashWithError:stacktrace:terminateProgram:'
node_modules/react-native-sentry/ios/RNSentry.m:249:32: No visible @interface for 'SentryClient' declares the selector 'reportReactNativeCrashWithError:stacktrace:terminateProgram:'

I'm building with target 9.3 and had issues with the Signing for Framework (which is now solved).

Do you have a solution ?

Thanks !

Most helpful comment

Upgrading to 2.0.2 seems to fix it.
(I deleted node_modules and Podfile.lock and installed everything again, just to be safe)

All 9 comments

Hey, did you change anything in RNSentry.m this error seems weird.
Also did you make sure you did everything stated here? https://docs.sentry.io/clients/react-native/#xcode-build-settings

Yes I followed this (which doesn't help much for the Signin error though... see issue #3 ).
I only commented those two lines to continue working...

Where is SentryClient defined normally ?

It's located here (see screenshot), but there is something funky with your build process. The swift file should generate a Sentry-Swift.h which should contain

- (void)reportReactNativeCrashWithError:(NSError * _Nonnull)error stacktrace:(NSArray * _Nonnull)stacktrace terminateProgram:(BOOL)terminateProgram;

sentry_swift

Here is my build log with the error.
I didn't change anything except what's in the link you sent before...
log.txt

Install/Uninstall package many times then install/uninstall Pods many times (including removing Podfile.lock and package.lock) then clean xcode many times and then restart mac many times . . NOTHING WORKED . .

So decided to bump down the version from Sentry 2.0.0 to 1.8.2

and it worked! Finally, build successfully...

@neilakoh thanks for the hint! Version 2.0.0 didn't work but after downgrading to 1.9.0 it worked flawlessly.

@gebsl @neilakoh No need to downgrade, please look at this comment for workaround - https://github.com/getsentry/sentry-react-native/issues/1186#issuecomment-725745836

@todorone - yes it worked and it said "_This is probably the cleanest workaround until whatever is wrong is fixed._". I will just wait for that fix since I want to avoid workarounds as much as possible.

Upgrading to 2.0.2 seems to fix it.
(I deleted node_modules and Podfile.lock and installed everything again, just to be safe)

Was this page helpful?
0 / 5 - 0 ratings