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

Fatal Exception: NSInvalidArgumentException -[__NSCFNumber length] Unrecognized Selector Error #81

Open
AndyDesign999 opened this issue Apr 10, 2024 · 3 comments

Comments

@AndyDesign999
Copy link

When attempting to create a user in QuickBlox, the following error occurs:

Fatal Exception: NSInvalidArgumentException
-[__NSCFNumber length]: unrecognized selector sent to instance 0x9c49da903795e696

Device Information:
Device: iPhone 13 Pro Max
iOS Version: 16.1.1

Additional Information:

Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x9e88 __exceptionPreprocess
1  libobjc.A.dylib                0x178d8 objc_exception_throw
2  CoreFoundation                 0x17e84c +[NSObject(NSObject) _copyDescription]
3  CoreFoundation                 0x1ffa0 ___forwarding___
4  CoreFoundation                 0x88350 _CF_forwarding_prep_0
5  Linkdee                        0x828924 -[QBUsersModule create:resolver:rejecter:] + 50 (QBUsersModule.m:50)
6  CoreFoundation                 0x74704 __invoking___
7  CoreFoundation                 0x20b6c -[NSInvocation invoke]
8  CoreFoundation                 0x20584 -[NSInvocation invokeWithTarget:]
9  Linkdee                        0x44298c -[RCTModuleMethod invokeWithBridge:module:arguments:] + 587 (RCTModuleMethod.mm:587)
10 Linkdee                        0x444b70 facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&, int, (anonymous namespace)::SchedulingContext) + 196 (RCTNativeModule.mm:196)
11 Linkdee                        0x4447f8 invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int) + 419 (Optional.h:419)
12 libdispatch.dylib              0x24b4 _dispatch_call_block_and_release
13 libdispatch.dylib              0x3fdc _dispatch_client_callout
14 libdispatch.dylib              0x127f4 _dispatch_main_queue_drain
15 libdispatch.dylib              0x12444 _dispatch_main_queue_callback_4CF
16 CoreFoundation                 0x9a6f8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
17 CoreFoundation                 0x7c058 __CFRunLoopRun
18 CoreFoundation                 0x80ed4 CFRunLoopRunSpecific
19 GraphicsServices               0x1368 GSEventRunModal
20 UIKitCore                      0x3a23d0 -[UIApplication _run]
21 UIKitCore                      0x3a2034 UIApplicationMain
22 Linkdee                        0x63f0 main + 8 (main.m:8)
23 ???                            0x1a72c0960 (Missing)
Error
@VladimirNybozhinsky
Copy link

Hi @AndyDesign999 !
This is Vladimir from QuickBlox.
Please provide us with the complete REST logs (from Xcode). There should be QB SDK logs from application launch to request and "wrong" response (error). You can learn how to collect logs here: Log Collection Guides - QuickBlox Help Center

This is so that we can see what parameters you are passing to the methods.

In general, this error means
that here it expects NSString instead of NSNumber, that's why it fails. So convert this to NSString and then the problem will be solved.

You are passing some parameter of a neural format: NSNumber instead of NSString.

Best regards, Vladimir

@AndyDesign999
Copy link
Author

Hi @VladimirNybozhinsky,

Thank you for reaching out and for providing the specific parameter causing the issue. It seems that the problem lies in the data type of the externalId parameter. I noticed that I am currently passing externalId as 'tWNQLD2Gr0ZJRwGP6Qny1UAHxTk1' while creating the user, which might be causing the issue.

@VladimirNybozhinsky
Copy link

Hello @AndyDesign999 ! Cool! Let us know if you managed to fix this problem.

Best regards, Vladimir

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

2 participants