GithubHelp home page GithubHelp logo

Comments (32)

nishadthajudeen001 avatar nishadthajudeen001 commented on April 28, 2024 3

Reactotron was causing the issue in release mode, I was able to fix that by commenting out the reactotron code during the release build.

from hermes.

liylmn avatar liylmn commented on April 28, 2024 3

Reactotron was causing the issue in release mode, I was able to fix that by commenting out the reactotron code during the release build.

Could you please elaborate on the same issue,thanks @nishadthajudeen001

Only the Release version APP was crashing with this error for us -"Error: invalid host, js engine: hermes",

This issue got resolved when we took the release after commenting out the Reactotron code.

bro, thank you so much. Just delete these few libraries
reactotron-react-native
reactotron-redux
reactotron-redux-saga

from hermes.

nishadthajudeen001 avatar nishadthajudeen001 commented on April 28, 2024 2

Reactotron was causing the issue in release mode, I was able to fix that by commenting out the reactotron code during the release build.

Could you please elaborate on the same issue,thanks @nishadthajudeen001

Only the Release version APP was crashing with this error for us -"Error: invalid host, js engine: hermes",

This issue got resolved when we took the release after commenting out the Reactotron code.

from hermes.

Ajmal0197 avatar Ajmal0197 commented on April 28, 2024 2

let getEnhancers = () => {
if (process.env.NODE_ENV === 'development') {
const reactotron = require('../../ReactotronConfig').default;
[reactotron.createEnhancer!()];
}
return [];
};

This worked for me thanks:

const getEnhancers = (getDefaultEnhancers) => {
  if (process.env.NODE_ENV === 'development') {
    const reactotron = require('../helpers/ReactotronConfig').default;
    return getDefaultEnhancers().concat(reactotron.createEnhancer());
  }
  return getDefaultEnhancers();
};

// https://redux-toolkit.js.org/usage/usage-guide#use-with-redux-persist
const store = configureStore({
  reducer: persistedReducer,
  middleware: (getDefaultMiddleware) =>
    getDefaultMiddleware({
      serializableCheck: {
        ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER], //
      },
    }),
  enhancers: getEnhancers,
});

from hermes.

vinesh4Real avatar vinesh4Real commented on April 28, 2024 1

Reactotron was causing the issue in release mode, I was able to fix that by commenting out the reactotron code during the release build.

Could you please elaborate on the same issue,thanks @nishadthajudeen001

Only the Release version APP was crashing with this error for us -"Error: invalid host, js engine: hermes",
This issue got resolved when we took the release after commenting out the Reactotron code.

bro, thank you so much. Just delete these few libraries reactotron-react-native reactotron-redux reactotron-redux-saga

I can confirm. Removing reactotron and reactotron related libraries fixed it.

from hermes.

vinesh4Real avatar vinesh4Real commented on April 28, 2024 1

@Ajmal0197 @tmikov I managed to solve it. Make sure you dont import anything unless you are in development mode.

In our entry file, we were careful to import our reactotron config file (has all the tron config and imports) only if we are in dev mode. Like so,

if (__DEV__) {
  import('./ReactotronConfig').then(() =>
    // eslint-disable-next-line no-console
    console.tron.log('Reactotron Configured'),
  );
}

But we were also using redux enhancers in our redux store declaration, where the import existed regardless of the environment. This is where the error was from. I solved it by importing only after confirming dev environment,

let getEnhancers = () => {
  if (process.env.NODE_ENV === 'development') {
    const reactotron = require('../../ReactotronConfig').default;
    [reactotron.createEnhancer!()];
  }
  return [];
};

const store = configureStore({
  reducer: rootReducer,
  enhancers: getEnhancers(),
});

from hermes.

Ajmal0197 avatar Ajmal0197 commented on April 28, 2024 1

@Ajmal0197 that's what I mean, you assigned it but its not called. Add open close brackets getEnhancers()
Se

We can use like this in es6. It's working i have checked properly in release/debug mode

from hermes.

Ajmal0197 avatar Ajmal0197 commented on April 28, 2024 1

✅ ✅ ✅
This is solution for now:
infinitered/reactotron#1398 (comment)

from hermes.

tmikov avatar tmikov commented on April 28, 2024

Hi, I am sorry you are having this problem, but unfortunately your report doesn't provide enough information to diagnose it, or even to identify that Hermes is the culprit. Unless you can provide a detailed reproduction with the latest version of Hermes, there is not much we can do.

from hermes.

karam1ashqar avatar karam1ashqar commented on April 28, 2024

same thing happening to me, only in RELEASE, react native app, it happens whenever i try to launch the app, always crashing on launch,

any update your end ? @hacnam0306

"Unhandled JS Exception: Error: invalid host, js engine: hermes"

from hermes.

hacnam0306 avatar hacnam0306 commented on April 28, 2024

same thing happening to me, only in RELEASE, react native app, it happens whenever i try to launch the app, always crashing on launch,

any update your end ? @hacnam0306

"Unhandled JS Exception: Error: invalid host, js engine: hermes"

same bro

from hermes.

Abramovick avatar Abramovick commented on April 28, 2024

Also been having the same issue, anyone figured out the solution?

from hermes.

tmikov avatar tmikov commented on April 28, 2024

Note that this exception is coming from React Native, not Hermes. AFACT, it is thrown from one of these locations:

I recommend trying with the latest versions of RN and asking in React Native.

from hermes.

luanlcampos avatar luanlcampos commented on April 28, 2024

Same problem here using RN 0.73.1. Any news on that issue?

from hermes.

karam1ashqar avatar karam1ashqar commented on April 28, 2024

It was an npm issue for me, I had npm install with --force or legacy peer reps to fix it

from hermes.

matheusPcruz18 avatar matheusPcruz18 commented on April 28, 2024

same thing happening to me, only in RELEASE, react native app, it happens whenever i try to launch the app, always crashing on launch,

any update your end ? @hacnam0306

"Unhandled JS Exception: Error: invalid host, js engine: hermes"

Same issue here, RN 0.71.14. Only on production IOS.

from hermes.

hacnam0306 avatar hacnam0306 commented on April 28, 2024

hi guys , i fixed it randomly by remove some useless library , checkout the version of reanimated , clean project by delete yarn.lock & node module and reinstall again <3

from hermes.

nishadthajudeen001 avatar nishadthajudeen001 commented on April 28, 2024

hacnam0306 Any further update on this?
can you please share more details on this -?
useless library , checkout the version of reanimated

from hermes.

liylmn avatar liylmn commented on April 28, 2024

Reactotron was causing the issue in release mode, I was able to fix that by commenting out the reactotron code during the release build.

Could you please elaborate on the same issue,thanks @nishadthajudeen001

from hermes.

Ajmal0197 avatar Ajmal0197 commented on April 28, 2024

Reactotron was causing the issue in release mode, I was able to fix that by commenting out the reactotron code during the release build.

Could you please elaborate on the same issue,thanks @nishadthajudeen001

Only the Release version APP was crashing with this error for us -"Error: invalid host, js engine: hermes",
This issue got resolved when we took the release after commenting out the Reactotron code.

bro, thank you so much. Just delete these few libraries reactotron-react-native reactotron-redux reactotron-redux-saga

I can confirm. Removing reactotron and reactotron related libraries fixed it.

After wasting whole day your soln worked. Any way to keep reactotron also and app crash free

from hermes.

Ajmal0197 avatar Ajmal0197 commented on April 28, 2024

There is no need for library uninstallation, for now I am manually commenting or uncommenting every reactotron instance during release or debug mode.

from hermes.

tmikov avatar tmikov commented on April 28, 2024

So, this looks like a problem in Reactotron? @Ajmal0197 I see you reported it to Infinite Red, but then closed the issue?

from hermes.

Ajmal0197 avatar Ajmal0197 commented on April 28, 2024

So, this looks like a problem in Reactotron? @Ajmal0197 I see you reported it to Infinite Red, but then closed the issue?

It's temporarily solved will reopen it. Forgot to reopen.

from hermes.

lachu97 avatar lachu97 commented on April 28, 2024

SIGABRT: Unhandled JS Exception: Error: invalid host, js engine: hermes
I too getting this same error,that too only in production..I tried it using iphone SE ios version 17+

from hermes.

vinesh4Real avatar vinesh4Real commented on April 28, 2024

@Ajmal0197 Dont you need to call that function?

from hermes.

Ajmal0197 avatar Ajmal0197 commented on April 28, 2024

@Ajmal0197 Dont you need to call that function?

Already calling see last line. Also u can follow this
infinitered/reactotron#1398

from hermes.

vinesh4Real avatar vinesh4Real commented on April 28, 2024

@Ajmal0197 that's what I mean, you assigned it but its not called. Add open close brackets getEnhancers()

from hermes.

matheusPcruz18 avatar matheusPcruz18 commented on April 28, 2024

I just removed all reactotron code from my project and it worked. Thank you guys.

from hermes.

nishadthajudeen001 avatar nishadthajudeen001 commented on April 28, 2024

check this link infinitered/reactotron#1398, latest build 5.0.4 is the culprit for the issue. We will continue to comment out when we take release build still reactotron resolve the issue

from hermes.

TrustDec avatar TrustDec commented on April 28, 2024

Change reactotron-react-native in package.json to 5.0.3, instead of ^5.0.3, otherwise the actual version of reactotron-react-native in node_modules is 5.0.4

from hermes.

sebasgarcia29 avatar sebasgarcia29 commented on April 28, 2024

Hello, I remove the dependencies from reactotron-react-native, reactotron-redux, reactotron-redux-saga and reactotron-plugin-zustand works for me, thank you for advices @nishadthajudeen001 !

from hermes.

OmarUsman777 avatar OmarUsman777 commented on April 28, 2024

I have removed the reactotron configuration from my app, Now it shows blank screen, when i quit the app and start it agian it works fine. But for the first time why is it showing the blank screen?

P.S: This issue is only caused when i try to release the ios app.

from hermes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.