rollbar/rollbar-react-native

error: module 'RollbarCrash.RollbarCrashThread' requires feature 'objc'

talal7860 opened this issue · 7 comments

I'm getting this error when trying to start the application. I followed the tutorial from here.
https://docs.rollbar.com/docs/react-native. I have done exactly as documented.

I have the same problem.
I am using "react-native": "0.73.5" and "react": "18.2.0"

I got this issue as well
"react-native": "0.72.3"

I am facing same issue. Is there any temporary solution?

react 18.2.0
react-native 0.73.6

# ... (your existing Podfile content)
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

linkage = ENV["USE_FRAMEWORKS"]
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  use_frameworks! :linkage => linkage.to_sym
end
target 'mobile' do
  use_expo_modules!

  # ... (your existing target configurations)

  pod 'RollbarReactNative', :path => '../node_modules/rollbar-react-native'


  # ... (your remaining target configurations)
end

# ... (your remaining Podfile content)

I used this command and it worked but as you see, Flipper has been disabled
USE_FRAMEWORKS=static NO_FLIPPER=1 pod install

Try adding 'use_frameworks!" to the Podfile, or if you use Expo, you can use expo-build-properties to configure your prebuilt ios app to use static frameworks in your app.json:

{
  "expo": {
    "plugins": [
      ["expo-build-properties", {
        "ios": {
          "deploymentTarget": "14.0",
          "useFrameworks": "static",
          "extraPods": [
            {
              "name": "RollbarReactNative",
              "podspec": "../node_modules/rollbar-react-native/RollbarReactNative.podspec"
            },
            {
              "name": "RollbarReport",
              "modular_headers": true
            },
            {
              "name": "RollbarCrash",
              "modular_headers": true
            }
          ]
        }
      }]
    ],
    ...
  }
}

react 18.2.0 react-native 0.73.6

# ... (your existing Podfile content)
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled

linkage = ENV["USE_FRAMEWORKS"]
if linkage != nil
  Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
  use_frameworks! :linkage => linkage.to_sym
end
target 'mobile' do
  use_expo_modules!

  # ... (your existing target configurations)

  pod 'RollbarReactNative', :path => '../node_modules/rollbar-react-native'


  # ... (your remaining target configurations)
end

# ... (your remaining Podfile content)

I used this command and it worked but as you see, Flipper has been disabled USE_FRAMEWORKS=static NO_FLIPPER=1 pod install

I've done this but I'm having another error that is:

RollbarDTO.m:80:33 No known class method for selector 'rollbar_safeDataFromJSONObject:'

Does anyone knows how to fix it?
Screenshot 2024-10-16 at 12 09 36

React Native 0.71.19 here

Only thing that fixed it was setting USE_FRAMEWORKS=static as @huynhdev said.