Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*** -[NSXPCEncoder _checkObject:]: This coder only encodes objects that adopt NSSecureCoding (object is of class 'RCTWeakEventEmitterWrapper'). #301

Open
1 task done
Voxar opened this issue Nov 15, 2024 · 1 comment

Comments

@Voxar
Copy link

Voxar commented Nov 15, 2024

Environment

info Fetching system and libraries information...
System:
  OS: macOS 15.0
  CPU: (8) arm64 Apple M1 Pro
  Memory: 265.03 MB / 32.00 GB
  Shell:
    version: 3.6.1
    path: /opt/homebrew/bin/fish
Binaries:
  Node:
    version: 20.14.0
    path: /private/var/folders/k7/txp7rrh51ys1121jsl071nlh0000gp/T/xfs-236e88c9/node
  Yarn:
    version: 3.6.4
    path: /private/var/folders/k7/txp7rrh51ys1121jsl071nlh0000gp/T/xfs-236e88c9/yarn
  npm:
    version: 10.7.0
    path: ~/.asdf/plugins/nodejs/shims/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.15.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.0
      - iOS 18.0
      - macOS 15.0
      - tvOS 18.0
      - visionOS 2.0
      - watchOS 11.0
  Android SDK:
    API Levels:
      - "31"
      - "32"
      - "33"
      - "34"
    Build Tools:
      - 30.0.2
      - 30.0.3
      - 33.0.0
      - 33.0.1
      - 34.0.0
    System Images:
      - android-33 | Google APIs ARM 64 v8a
      - android-34 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10300.40.2321.11668458
  Xcode:
    version: 16.0/16A242d
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.11
    path: /Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home/bin/javac
  Ruby:
    version: 3.3.5
    path: /Users/voxar/.asdf/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.1.2
    wanted: ^15.0.0
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.2
    wanted: ^0.76.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Things I’ve done to figure out my issue

I found issues with the upgrade-helper such as

  • If selecting versions from 0.73.4 to 0.76.1, the .xcodeproj changes are not shown. Had to do the upgrade in steps from 0.73.4 to 0.75.0, then to 0.76.1. I'm scared of what more is left out.
  • Adding yarnPath: .yarn/releases/yarn-3.6.4.cjs to .yarnrc.yaml got yarn complaining.

Upgrading version

From: 0.73.4
To: 0.76.1

Description

iOS builds but the application crashes as soon as I type a character into any <TextInput ...> box.

An uncaught exception was raised
*** -[NSXPCEncoder _checkObject:]: This coder only encodes objects that adopt NSSecureCoding (object is of class 'RCTWeakEventEmitterWrapper').
(
	0   CoreFoundation                      0x000000019a594ec0 __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x000000019a07acd8 objc_exception_throw + 88
	2   Foundation                          0x000000019b6a1214 -[NSXPCEncoder _checkObject:] + 308
	3   Foundation                          0x000000019b6a0ee8 -[NSXPCEncoder _encodeUnkeyedObject:] + 40
	4   Foundation                          0x000000019b6b1f20 -[NSXPCEncoder _encodeArrayOfObjects:forKey:] + 184
	5   Foundation                          0x000000019b6cc4fc -[NSDictionary(NSDictionary) encodeWithCoder:] + 568
	6   Foundation                          0x000000019b6a1520 -[NSXPCEncoder _encodeObject:] + 488
	7   Foundation                          0x000000019b76e0e8 -[NSAttributedString encodeWithCoder:] + 224
	8   Foundation                          0x000000019b6a1520 -[NSXPCEncoder _encodeObject:] + 488
	9   RemoteTextInput                     0x00000001ba1e5874 -[RTIDocumentState encodeWithCoder:] + 592
	10  Foundation                          0x000000019b6a1520 -[NSXPCEncoder _encodeObject:] + 488
	11  Foundation                          0x000000019b6a6210 _NSXPCSerializationAddInvocationWithOnlyObjectArgumentsArray + 116
	12  Foundation                          0x000000019b6a60c8 -[NSXPCEncoder _encodeInvocationObjectArgumentsOnly:count:typeString:selector:isReply:into:] + 212
	13  Foundation                          0x000000019b69f9e4 -[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:] + 1208
	14  Foundation                          0x000000019b6a5fb8 -[NSXPCConnection _sendSelector:withProxy:arg1:arg2:] + 128
	15  Foundation                          0x000000019b6a5ee0 _NSXPCDistantObjectSimpleMessageSend2 + 68
	16  RemoteTextInput                     0x00000001ba1ea054 __52-[RTIInputSystemClient _updateTextForSessionWithID:]_block_invoke + 72
	17  RemoteTextInput                     0x00000001ba1e99b8 __58-[RTIInputSystemClient enumerateServices:force:withBlock:]_block_invoke.139 + 60
	18  CoreFoundation                      0x000000019a5522c4 __NSSET_IS_CALLING_OUT_TO_A_BLOCK__ + 24
	19  CoreFoundation                      0x000000019a5651b0 -[__NSSetM enumerateObjectsWithOptions:usingBlock:] + 276
	20  RemoteTextInput                     0x00000001ba1e9888 -[RTIInputSystemClient enumerateServices:force:withBlock:] + 288
	21  RemoteTextInput                     0x00000001ba1e9fd8 -[RTIInputSystemClient _updateTextForSessionWithID:] + 244
	22  RemoteTextInput                     0x00000001ba1eb75c -[RTIInputSystemClient remoteTextInputSessionWithID:documentDidChange:] + 156
	23  UIKitCore                           0x00000001cc9f25f0 __39-[UIKBRTIPartner documentStateChanged:]_block_invoke + 136
	24  UIKitCore                           0x00000001cc9f6e70 __48-[UIKBRTIPartner _updateRTIStateWithCompletion:]_block_invoke + 288
	25  UIKitCore                           0x00000001cc9ff07c -[UIKBRTIPartner _queryUIKitDocumentRequest:completion:] + 4336
	26  UIKitCore                           0x00000001cc9fcca8 -[UIKBRTIPartner _queryDocumentRequest:completion:] + 136
	27  UIKitCore                           0x00000001cc9f6d1c -[UIKBRTIPartner _updateRTIStateWithCompletion:] + 312
	28  UIKitCore                           0x00000001cc9f59c4 -[UIKBRTIPartner updateStateWithCompletion:updateTraits:] + 144
	29  UIKitCore                           0x00000001cc9f2554 -[UIKBRTIPartner documentStateChanged:] + 176
	30  UIKitCore                           0x00000001cc2ece68 -[_UIKeyboardStateManager setDocumentState:] + 208
	31  UIKitCore                           0x00000001cc3035f0 -[_UIKeyboardStateManager updateKeyboardStateForInsertion:] + 104
	32  UIKitCore                           0x00000001cc6b4f68 -[UIKBInputDelegateManager insertText:updateInputSource:] + 464
	33  UIKit                               0x0000000275daca94 -[UIKBInputDelegateManagerAccessibility insertText:updateInputSource:] + 112
	34  UIKitCore                           0x00000001cc6af568 -[UIKBInputDelegateManager insertText:] + 92
	35  UIKitCore                           0x00000001cc2fa5ec -[_UIKeyboardStateManager performKeyboardOutput:checkingDelegate:forwardToRemoteInputSource:] + 3732
	36  UIKit                               0x0000000275d9de90 -[_UIKeyboardStateManagerAccessibility performKeyboardOutput:checkingDelegate:forwardToRemoteInputSource:] + 140
	37  UIKitCore                           0x00000001cc9fc920 -[UIKBRTIPartner _performKeyboardOutputOperations:] + 608
	38  UIKit                               0x0000000275da153c -[UIKBRTIPartnerAccessibility _performKeyboardOutputOperations:] + 100
	39  UIKitCore                           0x00000001cc9faed0 -[UIKBRTIPartner _queued_performTextOperations:resultHandler:] + 780
	40  libdispatch.dylib                   0x00000001027b0b64 _dispatch_call_block_and_release + 32
	41  libdispatch.dylib                   0x00000001027b28a4 _dispatch_client_callout + 20
	42  libdispatch.dylib                   0x00000001027c5d38 _dispatch_main_queue_drain + 1092
	43  libdispatch.dylib                   0x00000001027c58e4 _dispatch_main_queue_callback_4CF + 44
	44  CoreFoundation                      0x000000019a561680 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
	45  CoreFoundation                      0x000000019a52117c __CFRunLoopRun + 1996
	46  CoreFoundation                      0x000000019a520334 CFRunLoopRunSpecific + 572
	47  HIToolbox                           0x00000001a59580cc RunCurrentEventLoopInMode + 292
	48  HIToolbox                           0x00000001a595debc ReceiveNextEventCommon + 636
	49  HIToolbox                           0x00000001a595e020 _BlockUntilNextEventMatchingListInModeWithFilter + 76
	50  AppKit                              0x000000019e063a70 _DPSNextEvent + 660
	51  AppKit                              0x000000019e9897b8 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
	52  AppKit                              0x000000019e056b7c -[NSApplication run] + 480
	53  AppKit                              0x000000019e02d44c NSApplicationMain + 888
	54  AppKit                              0x000000019e27b8e4 +[NSWindow _savedFrameFromString:] + 0
	55  UIKitMacHelper                      0x00000001b4c9f8b0 UINSApplicationMain + 972
	56  UIKitCore                           0x00000001cbbffc40 UIApplicationMain + 148
	57  RamiLora.debug.dylib                0x0000000108560288 __debug_main_executable_dylib_entry_point + 96
	58  dyld                                0x000000019a0b8274 start + 2840
)

yarn produces this. Is it important? What is the solution?
We don't use expo. App was born into RN 0.70.0, probably via cli, not expo. Original author is no longer available.

➤ YN0000: ┌ Resolution step
➤ YN0002: │ @expo/cli@npm:0.18.29 doesn't provide expo-modules-autolinking (p3b3aa), requested by @expo/prebuild-config
➤ YN0002: │ @react-native/babel-plugin-codegen@npm:0.74.87 doesn't provide @babel/preset-env (p9b22c), requested by @react-native/codegen
➤ YN0002: │ @react-native/babel-plugin-codegen@npm:0.76.2 doesn't provide @babel/preset-env (p13f92), requested by @react-native/codegen
➤ YN0002: │ babel-plugin-transform-flow-enums@npm:0.0.2 doesn't provide @babel/core (p8377f), requested by @babel/plugin-syntax-flow
➤ YN0002: │ babel-preset-expo@npm:11.0.14 doesn't provide @babel/core (p12748), requested by @babel/plugin-transform-parameters
➤ YN0002: │ babel-preset-expo@npm:11.0.14 doesn't provide @babel/core (p27b8b), requested by @babel/plugin-proposal-decorators
➤ YN0002: │ babel-preset-expo@npm:11.0.14 doesn't provide @babel/core (p2559f), requested by @babel/plugin-transform-export-namespace-from
➤ YN0002: │ babel-preset-expo@npm:11.0.14 doesn't provide @babel/core (p2c671), requested by @babel/plugin-transform-object-rest-spread
➤ YN0002: │ babel-preset-expo@npm:11.0.14 doesn't provide @babel/core (p2c389), requested by @babel/preset-react
➤ YN0002: │ babel-preset-expo@npm:11.0.14 doesn't provide @babel/core (paa32b), requested by @babel/preset-typescript
➤ YN0002: │ react-native@npm:0.76.2 [8760d] doesn't provide @babel/core (pbfeeb), requested by babel-jest
➤ YN0002: │ react-native@npm:0.76.2 [8760d] doesn't provide @babel/preset-env (pb63c3), requested by @react-native/codegen
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
@Voxar
Copy link
Author

Voxar commented Nov 15, 2024

upgrade-helper tells me to add "packageManager": "[email protected]" but creating a whole new project (following https://reactnative.dev/docs/environment-setup) does not include this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant