react-native: ERROR TypeError: undefined is not a function, js engine: hermes -- WebView React Natve

Description

<WebView
        source={{ uri: newUrl }}
        onLoadEnd={() => {
          setLoading(false);
        }}
      />

error

React Native Version

0.71.7

Output of npx react-native info

System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 AMD Ryzen 7 4700U with Radeon Graphics
    Memory: 17.72 GB / 31.40 GB
  Binaries:
    Node: 19.8.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.5.1 - C:\Program Files\nodejs\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
    Windows SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Visual Studio: 17.5.33516.290 (Visual Studio Community 2022)
  Languages:
    Java: 11.0.16.1 - C:\Program Files\Microsoft\jdk-11.0.16.101-hotspot\bin\javac.EXE
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0
    react-native: 0.71.7 => 0.71.7
    react-native-windows: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

npx expo start --dev-client

Snack, code example, screenshot, or link to a repository

error

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 2
  • Comments: 16

Most upvoted comments

I have solved it by commenting out “//RNCWebViewModule.shouldStartLoadWithLockIdentifier(shouldStart, lockIdentifier);”, present in WebView.android.js (Line 42).

@aum1618 yes with latest version its working now

Description

<WebView
        source={{ uri: newUrl }}
        onLoadEnd={() => {
          setLoading(false);
        }}
      />

error

React Native Version

0.71.7

Output of npx react-native info

System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 AMD Ryzen 7 4700U with Radeon Graphics
    Memory: 17.72 GB / 31.40 GB
  Binaries:
    Node: 19.8.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 9.5.1 - C:\Program Files\nodejs\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
    Windows SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Visual Studio: 17.5.33516.290 (Visual Studio Community 2022)
  Languages:
    Java: 11.0.16.1 - C:\Program Files\Microsoft\jdk-11.0.16.101-hotspot\bin\javac.EXE
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0
    react-native: 0.71.7 => 0.71.7
    react-native-windows: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

npx expo start --dev-client

Snack, code example, screenshot, or link to a repository

error

This error casually is just misunderstood of what is URL and URI, if u use “www.google.com” on a URI that’s an error, the correct way is “https://www.google.com” because she’s a complete URI