Skip to content

Cannot run app on Simulator (RCTSRWebSocket assert failed) #31713

Closed
@scaraux

Description

@scaraux

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

I am unable to run our app on the iOS Simulator, as it crashes on startup with an assertion failed:

Assertion failed: ([scheme isEqualToString:@"ws"] || [scheme isEqualToString:@"http"] || [scheme isEqualToString:@"wss"] || [scheme isEqualToString:@"https"]), function -[RCTSRWebSocket _RCTSR_commonInit], file /Users/oscargotting/ntwrk/ntwrk-mobile/node_modules/react-native/Libraries/WebSocket/RCTSRWebSocket.m, line 283.

The scheme seems to be "file" and it doesn't like it

NOTE: I recently moved to an Apple Silicon environment, I have no idea if this may be related.

React Native version:

Run react-native info in your terminal and copy the results here.

System:
    OS: macOS 11.4
    CPU: (8) arm64 Apple M1
    Memory: 195.42 MB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.3.0 - /var/folders/nm/f__glkrj58xc3w8hyw833bch0000gn/T/yarn--1623548223261-0.8641981465718873/node
    Yarn: 1.22.10 - /var/folders/nm/f__glkrj58xc3w8hyw833bch0000gn/T/yarn--1623548223261-0.8641981465718873/yarn
    npm: 7.15.1 - /opt/homebrew/bin/npm
    Watchman: 2021.06.07.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: Not Found
  SDKs:
    iOS SDK:
      Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    Android SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Xcode: 12.5/12E262 - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.4 => 0.63.4 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
✨  Done in 2.98s.

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

  1. Run the app from xcode
  2. Crash happens immediatly after black screen

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions