React-native-auth0: [2.1.0] TypeError: undefined is not a function, js engine: hermes

Created on 28 Oct 2019  Β·  12Comments  Β·  Source: auth0/react-native-auth0

I have error TypeError: undefined is not a function, js engine: hermes after update from 2.0.0 to 2.1.0. Only on Android and only if Debug is off.

Update: release apk also crash on start.

Minimum steps to reproduce:

  1. react-native init (I tested on version 0.61.2 and 0.61.3 version)
  2. Enable Hermes (one line change, see documentation)
  3. import 'react-native-auth0';

Most helpful comment

That error occurs only if Hermes is enabled.

Minimum steps to reproduce:

  1. react-native init (I tested on version 0.61.2 and 0.61.3 version)
  2. Enable Hermes (one line change, see documentation)
  3. import 'react-native-auth0';

I see jsrsasign dependency was added in this commit and this not works on Hemes.

Please fix it. Hermes is very good thing and will enabled by default in future.

All 12 comments

@Bardiamist - Thanks for the report here and apologies for the trouble. Can you give us a bit more to go on here? Possibly sample code that's causing the issue or a line number where that error is coming from?

Just error on start.

But I can see what error in jsrsasign/lib/jsrsasign.js (thanks Reactotron)

That error occurs only if Hermes is enabled.

Minimum steps to reproduce:

  1. react-native init (I tested on version 0.61.2 and 0.61.3 version)
  2. Enable Hermes (one line change, see documentation)
  3. import 'react-native-auth0';

I see jsrsasign dependency was added in this commit and this not works on Hemes.

Please fix it. Hermes is very good thing and will enabled by default in future.

@Bardiamist I've downgraded to 2.0.0 for hermes support.

For the record:

hmmm @2.1.0 is not going to work either.

jsrsasign is a dependency

2.1.0

npm list jsrasign 
   ┬ [email protected]
  └── [email protected]

2.0.0

 npm list jsrsasign
/Users/mike/projects/temp-app
└── (empty)

@Widcket can you take a look at this please

Thanks everyone for the information. This issue is in our radar, and we’re currently evaluating options.

Having the same problem with 2.1.0. Only downgrading to 2.0.0 fixed it

@Bardiamist & all, I've put a PR that replaces jsrsasign. I've tested it and an Hermes enabled app works fine now. We'll be making a new release next week but in the meantime I'd love you have your feedback.

You can try the branch code by installing the package this way:

yarn add https://github.com/auth0/react-native-auth0.git#temp-idtv-2

I checked, that works for my application.

hmmm @2.1.0 is not going to work either.

jsrsasign is a dependency

2.1.0

npm list jsrasign 
   ┬ [email protected]
  └── [email protected]

2.0.0

 npm list jsrsasign
/Users/mike/projects/temp-app
└── (empty)

Thanks a lot :)
We removed jsrassign in our project and crash issue is fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

datvtwkm picture datvtwkm  Β·  3Comments

ElangoPrince picture ElangoPrince  Β·  7Comments

wincod75 picture wincod75  Β·  3Comments

lukewlms picture lukewlms  Β·  3Comments

robwalkerco picture robwalkerco  Β·  10Comments