Skip to content

Regression on 0.55.0 crash: WebSocketModule.close got 1 arguments, expected 3 #18696

@ThaJay

Description

@ThaJay

Closing a websocket crashes the app

Environment

$ react-native info
Scanning folders for symlinks in /media/dj/dev/scan-app/node_modules (9ms)

Environment:
  OS: Linux 4.13
  Node: 9.10.1
  Yarn: Not Found
  npm: 5.6.0
  Watchman: 4.7.0
  Xcode: N/A
  Android Studio: Not Found

Packages: (wanted => installed)
  react: ^16.3.0-rc.0 => 16.3.0-rc.0
  react-native: ^0.55.0 => 0.55.0

Steps to Reproduce

  1. open websocket connection. example:
const ws = new WebSocket(makeSocketURL())
  1. close websocket connection. example:
ws.close()

Expected Behavior

the websocket connection closes, no error

Actual Behavior

Logcat:

--------- beginning of crash
04-04 14:28:15.716 19745 19780 E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
04-04 14:28:15.716 19745 19780 E AndroidRuntime: Process: com.chipta, PID: 19745
04-04 14:28:15.716 19745 19780 E AndroidRuntime: com.facebook.react.bridge.NativeArgumentsParseException: WebSocketModule.close got 1 arguments, expected 3
04-04 14:28:15.716 19745 19780 E AndroidRuntime: 	at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:353)
04-04 14:28:15.716 19745 19780 E AndroidRuntime: 	at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
04-04 14:28:15.716 19745 19780 E AndroidRuntime: 	at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
04-04 14:28:15.716 19745 19780 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:754)
04-04 14:28:15.716 19745 19780 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:95)
04-04 14:28:15.716 19745 19780 E AndroidRuntime: 	at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
04-04 14:28:15.716 19745 19780 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:163)
04-04 14:28:15.716 19745 19780 E AndroidRuntime: 	at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
04-04 14:28:15.716 19745 19780 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:760)
04-04 14:28:16.322 19745 19745 D ReactNative: ReactInstanceManager.detachViewFromInstance()

related:
#18623

Metadata

Metadata

Assignees

No one assigned

    Labels

    Impact: RegressionDescribes a behavior that used to work on a prior release, but stopped working recently.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions