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

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';

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 12
  • Comments: 15 (7 by maintainers)

Most upvoted comments

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.

where to import 'react-native-auth0';?

@Widcket can you take a look at this please

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.

can you send vedio about this error sulation

hmmm @2.1.0 is not going to work either.

jsrsasign is a dependency

2.1.0

npm list jsrasign 
   ┬ react-native-auth0@2.1.0
  └── jsrsasign@8.0.12

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.

I checked, that works for my application.

@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

hmmm @2.1.0 is not going to work either.

jsrsasign is a dependency

2.1.0

npm list jsrasign 
   ┬ react-native-auth0@2.1.0
  └── jsrsasign@8.0.12

2.0.0

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