Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-1482

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

      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

      h3. Stacktrace & log output
      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      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
      

      h3. Can you reproduce the bug?
      Yes, always

      h3. 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

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: