react-native: React Native [0.77.0]:- Thread 1: "-[RCTView setColor:]: unrecognized selector sent to instance 0x1196c6970"

Description

NativeBaseProvider not working

Steps to reproduce

  1. Create a new React Native project (react native version “0.77.0”)
  2. Install NativeBase
  3. Install iOS dependencies using pod install.
  4. Run the project and then error will appear in Xcode the following error appears:- Thread 1: “-[RCTView setColor:]: unrecognized selector sent to instance 0x1196c6970”

React Native Version

0.77.0

Affected Platforms

Runtime - iOS

Output of npx react-native info

System:
  OS: macOS 14.7.2
  CPU: (8) arm64 Apple M1
  Memory: 196.75 MB / 8.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 23.6.0
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.22
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.8.2
    path: ~/.nvm/versions/node/v18.20.5/bin/npm
  Watchman:
    version: 2024.12.02.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/privateFolder/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.2 AI-242.23726.103.2422.12816248
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.13
    path: /usr/bin/javac
  Ruby:
    version: 3.1.2
    path: /Users/privateFolder/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.0.1
    wanted: 15.0.1
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.77.0
    wanted: ^0.77.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Stacktrace or Logs

An abort signal terminated the process. Such crashes often happen because of an uncaught exception or unrecoverable error or calling the abort) function.

Reproducer

https://docs.nativebase.io/setup-provider

Screenshots and Videos

Image

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 5
  • Comments: 16 (2 by maintainers)

Most upvoted comments

For those experiencing issues with Expo DevClient, you can resolve the problem by patching expo-dev-menu to disable onboarding at startup. Here’s the corresponding patch:

diff --git a/ios/Modules/DevMenuPreferences.swift b/ios/Modules/DevMenuPreferences.swift
index 38d5b643cb78b5c8ebc3a134500c9e52edf45bed..4ffd9b41713c115dafdad1edfa530d1aed302b2f 100644
--- a/ios/Modules/DevMenuPreferences.swift
+++ b/ios/Modules/DevMenuPreferences.swift
@@ -30,7 +30,7 @@ public class DevMenuPreferences: Module {
       touchGestureEnabledKey: true,
       keyCommandsEnabledKey: true,
       showsAtLaunchKey: false,
-      isOnboardingFinishedKey: false
+      isOnboardingFinishedKey: true
     ])
 
     /**

@dixit7274 As per your provided reproducer, it seems that a new React Native project works fine. However, the crash occurs only after installing NativeBase, which indicates that the issue is specific to the NativeBase library. Could you raise this issue in the NativeBase repository?

This same crash (-[RCTView setColor:]: unrecognized selector ...) can happen in RN 77 with React Navigation and/or Expo Dev Client (this is the first I’m hearing about the crash with NativeBase).

I’m following these 4 other issues about it as well:

hey i am going through the same issue, not even using nativebase and the more serious issue is im not able to pinpoint the error area to resolve

@dixit7274 I was facing the same kind of error due to NativeBase lib so please find alternative lib and replace it. it will solve your issue