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

Cannot read property 'prototype' of undefined, js engine: hermes #7198

Open
Master-gg-02 opened this issue Aug 17, 2024 · 2 comments
Open

Cannot read property 'prototype' of undefined, js engine: hermes #7198

Master-gg-02 opened this issue Aug 17, 2024 · 2 comments
Labels
4.x 4.0 related Bug Addressing a bug Investigate

Comments

@Master-gg-02
Copy link

Cannot read property 'prototype' of undefined, js engine: hermes with react-native

Actual behavior

Steps to reproduce the behavior

import { Web3 } from 'web3';

// // private RPC endpoint 
const web3 = new Web3('https://goerli.infura.io/v3/xxxxxx');

// // or public RPC endpoint
// // const web3 = new Web3('https://eth.llamarpc.com'); 

web3.eth.getBlockNumber().then(console.log);

Logs

ERROR  TypeError: Cannot read property 'prototype' of undefined, js engine: hermes
 LOG  Running "miteChain" with {"rootTag":221}
 ERROR  Invariant Violation: "miteChain" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes

Environment

  "dependencies": {
    "react": "18.2.0",
    "react-native": "0.74.5",
    "web3": "^4.11.1"
  }
System:
  OS: macOS 11.6
  CPU: (12) x64 Intel(R) Core(TM) i5-10500 CPU @ 3.10GHz
  Memory: 1.34 GB / 32.00 GB
  Shell:
    version: "5.8"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.0.0
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.19
    path: /usr/local/bin/yarn
  npm:
    version: 8.6.0
    path: /usr/local/bin/npm
  Watchman:
    version: 2023.08.14.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.12.1
    path: /Users/jacky/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - iOS 14.5
      - DriverKit 20.4
      - macOS 11.3
      - tvOS 14.5
      - watchOS 7.4
  Android SDK:
    Android NDK: 22.1.7171670
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2411.12071903
  Xcode:
    version: 12.5.1/12E507
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /Users/jacky/.jenv/shims/javac
  Ruby:
    version: 2.7.6
    path: /Users/jacky/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.5
    wanted: 0.74.5
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: false
@mconnelly8 mconnelly8 added the 4.x 4.0 related label Aug 19, 2024
@mconnelly8
Copy link

Thanks for the submission @Master-gg-02. The team will review this soon.

@mconnelly8
Copy link

Need to investigate. Could be TS setup issue.

@mconnelly8 mconnelly8 added the Bug Addressing a bug label Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 4.0 related Bug Addressing a bug Investigate
Projects
None yet
Development

No branches or pull requests

2 participants