Skip to content

[iOS] Crash in RCTWebSocketModule didFailWithError  #29525

Description

@bertrandgressier

I reopen this issue #28278

Description

We're seeing some crashes in our Crashlytics dashboard with the following error:

Fatal Exception: NSInvalidArgumentException
*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]

coming from

RCTWebSocketModule.m
-[RCTWebSocketModule webSocket:didFailWithError:]

React Native version:

0.62.2

Steps To Reproduce

WebSocket errors

Expected Results

The app should not crash.

this person #28278 (comment) suggested a fix for this issue

Fatal Exception: NSInvalidArgumentException
0 CoreFoundation 0x1a1571344 (Manquant)
1 libobjc.A.dylib 0x1a1286cc0 (Manquant)
2 CoreFoundation 0x1a15ca550 (Manquant)
3 CoreFoundation 0x1a15d44c8 (Manquant)
4 CoreFoundation 0x1a1458944 (Manquant)
5 CoreFoundation 0x1a144a1c4 (Manquant)
6 gotoconnect 0x10010b874 -[RCTWebSocketModule webSocket:didFailWithError:] + 175 (RCTWebSocketModule.mm:175)
7 gotoconnect 0x100638a3c __33-[RCTSRWebSocket _failWithError:]_block_invoke_2 + 619 (RCTSRWebSocket.m:619)
8 libdispatch.dylib 0x1a1212134 (Manquant)
9 libdispatch.dylib 0x1a12135ac (Manquant)
10 libdispatch.dylib 0x1a121f7d4 (Manquant)
11 CoreFoundation 0x1a14ec8d4 (Manquant)
12 CoreFoundation 0x1a14e758c (Manquant)
13 CoreFoundation 0x1a14e6bc8 (Manquant)
14 GraphicsServices 0x1ab8c85cc (Manquant)
15 UIKitCore 0x1a5699744 (Manquant)
16 gotoconnect 0x1000d6d04 main + 28 (AppDelegate.swift:28)
17 libdyld.dylib 0x1a1363384 (Manquant)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Platform: iOSiOS applications.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions