Skip to content

[0.57] _this._registerEvents is not a function on a clean project #21094

@mgcrea

Description

@mgcrea

Environment

$ react-native info

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
      Memory: 520.12 MB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.11.3 - ~/.nvm/versions/node/v8.11.3/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 5.6.0 - ~/.nvm/versions/node/v8.11.3/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
    IDEs:
      Xcode: 10.0/10L232m - /usr/bin/xcodebuild
    npmPackages:
      react: 16.5.0 => 16.5.0 
      react-native: 0.57.0 => 0.57.0 
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-cli: 2.0.1

Description

Bumped an existing 0.56.1 project to 0.57 and encountered an error on simulator start: _this._registerEvents is not a function on a clean project. Tried a new project from scratch and got the same error. Running Xcode 10 Beta.

Same error was mentioned in the following ticket: #20712

screen shot 2018-09-13 at 12 21 14

_this._registerEvents is not a function. (In '_this._registerEvents()', '_this._registerEvents' is undefined)

WebSocket
    index.bundle?platform=ios&dev=true&minify=false:24147:28
connectToDevTools
    index.bundle?platform=ios&dev=true&minify=false:26078:62
<unknown>
    index.bundle?platform=ios&dev=true&minify=false:25863:38
loadModuleImplementation
    index.bundle?platform=ios&dev=true&minify=false:262:14
<unknown>
    index.bundle?platform=ios&dev=true&minify=false:19771:20
loadModuleImplementation
    index.bundle?platform=ios&dev=true&minify=false:262:14
guardedLoadModule
    index.bundle?platform=ios&dev=true&minify=false:150:47
global code
    index.bundle?platform=ios&dev=true&minify=false:81797:4
****

Reproducible Demo

xcode-select -s /Applications/Xcode-beta.app/Contents/Developer
react-native init AwesomeProject
cd AwesomeProject
node_modules/.bin/react-native run-ios

EDIT: Tried another new project and it worked this time. I guess it must be related to caching issues.

Will reopen if I can reliably reproduce.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions