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

[2.1.0] TypeError: undefined is not a function, js engine: hermes #251

Closed
Bardiamist opened this issue Oct 28, 2019 · 15 comments · Fixed by #268
Closed

[2.1.0] TypeError: undefined is not a function, js engine: hermes #251

Bardiamist opened this issue Oct 28, 2019 · 15 comments · Fixed by #268
Assignees

Comments

@Bardiamist
Copy link
Contributor

Bardiamist commented Oct 28, 2019

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';
@joshcanhelp
Copy link
Contributor

@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?

@Bardiamist
Copy link
Contributor Author

Bardiamist commented Oct 29, 2019

Just error on start.

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

@Bardiamist
Copy link
Contributor Author

Bardiamist commented Oct 31, 2019

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.

@export-mike
Copy link

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

@GuillaumeAmat
Copy link

For the record:

  • react-native-auth0@2.1.0 + Hermes = ❌
  • react-native-auth0@2.1.0 + Hermes + Debug mode = 👌

@export-mike
Copy link

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)

@cocojoe
Copy link
Member

cocojoe commented Dec 12, 2019

@Widcket can you take a look at this please

@Widcket
Copy link
Contributor

Widcket commented Dec 20, 2019

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

@ix42
Copy link

ix42 commented Jan 8, 2020

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

@lbalmaceda
Copy link
Contributor

@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

@Bardiamist
Copy link
Contributor Author

I checked, that works for my application.

@keremcubuk
Copy link

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.

@Kumargaurav11998
Copy link

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

@Afaq503
Copy link

Afaq503 commented Oct 5, 2022

can you send vedio about this error sulation

@supersuryaansh
Copy link

Hi, the issue still persists for my application

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.