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

Real-web fails with ReferenceError: Property 'TextDecoder' doesn't exist, js engine: hermes #4214

Closed
hipaven opened this issue Jan 12, 2022 · 1 comment
Labels
hermes Bugs and features related to running on the React Native hermes engine O-Community T-Bug Waiting-For-Reporter Waiting for more information from the reporter before we can proceed

Comments

@hipaven
Copy link

hipaven commented Jan 12, 2022

How frequently does the bug occur?

All the time

Description

import { ApolloClient, HttpLink, InMemoryCache } from "@apollo/client";
import * as Realm from "realm-web";

I am using above 2 realm features to call realm Graphql API in react native
Initially I got Error: While trying to resolve module @apollo/client. I added 'cjs' in metro config sourceexts. Now I am getting below error - . I assume the issue is with realm-web. Can you assist to resolve this issue.
ReferenceError: Property 'TextDecoder' doesn't exist, js engine: hermes
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that
the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that
the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes.
ReferenceError: Property 'TextDecoder' doesn't exist, js engine: hermes
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that
the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that
the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes

Stacktrace & log output

ReferenceError: Property 'TextDecoder' doesn't exist, js engine: hermes
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that
the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that
the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes.
ReferenceError: Property 'TextDecoder' doesn't exist, js engine: hermes
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that
the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that
the application entry file path is incorrect.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native., js engine: hermes

Can you reproduce the bug?

Yes, always

Reproduction Steps

npx react-native start
npx react-native run-android

with below
import { ApolloClient, HttpLink, InMemoryCache } from "@apollo/client";
import * as Realm from "realm-web";

Version

Node - v16.13.1 React - 17.0.2 React -Native 0.66.4

What SDK flavour are you using?

MongoDB Realm (i.e. Sync, auth, functions)

Are you using encryption?

No, not using encryption

Platform OS and version(s)

Windows 10.0.19043 Build 19043

Build environment

Which debugger for React Native: ..
Node - v16.13.1
React - 17.0.2
React -Native 0.66.4
"@apollo/client": "^3.5.7",
"realm-web": "^1.5.1"
"graphql": "^16.2.0",
IDE - Visual studio code

Cocoapods version

No response

@hipaven hipaven added the T-Bug label Jan 12, 2022
@fronck fronck added the hermes Bugs and features related to running on the React Native hermes engine label Jan 13, 2022
@sync-by-unito sync-by-unito bot added the Waiting-For-Reporter Waiting for more information from the reporter before we can proceed label Jan 13, 2022
@kneth
Copy link
Contributor

kneth commented Jan 13, 2022

Duplicate of #4178

@kneth kneth marked this as a duplicate of #4178 Jan 13, 2022
@sync-by-unito sync-by-unito bot closed this as completed Jan 13, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
hermes Bugs and features related to running on the React Native hermes engine O-Community T-Bug Waiting-For-Reporter Waiting for more information from the reporter before we can proceed
Projects
None yet
Development

No branches or pull requests

3 participants