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

[React Native] No dynCall invoker for signature #44

Closed
hellogerard opened this issue Jul 25, 2019 · 3 comments
Closed

[React Native] No dynCall invoker for signature #44

hellogerard opened this issue Jul 25, 2019 · 3 comments

Comments

@hellogerard
Copy link

I am attempting to use e3kit in a React Native app—please let me know if I should re-open an issue in that repo—and getting the following crash just importing e3kit.

image

I also get this error if I just import virgil-crypto. I am trying to narrow it down and get reproducible steps, but our app is a large app with many dependencies. Everything works fine on a vanilla React Native app started with react-native init. I will post if I get more info, but hoping someone has a few quick ideas.

OS: Mac OS Mojave
react-native: 0.59.9
@virgilsecurity/e3kit: 0.5.0
@virgilsecurity/key-storage-rn: 0.1.3

@vadimavdeev
Copy link
Contributor

Does the crash happen on both iOS and Android? Can you show the full error output with the call stack?

@vadimavdeev
Copy link
Contributor

Please note that it's not safe to use version 3.x of this library in React Native due to the use of insecure random number generator. See this comment for a temporary workaround.
We are currently building a separate package with a react native bridge for Virgil Crypto library for Android and iOS. It is planned for release next week. I'll update the referenced issue when we have the news.

@hellogerard
Copy link
Author

@vadimavdeev Thanks, I did see the other issue and I am monitoring it.

We can close this issue. This was due to a bug on our side. Everything appears to be working now.

Since there is no native btoa or atob functions in React Native, we have setup code that polyfills these functions. This code has been in place for years.

global.btoa = global.btoa || base64.encode;
global.atob = global.btoa || base64.decode;

Can you spot the bug? 😄 Pretty sure the atob functions has been wrong for a long time, but we've never had to use it in the app until now.

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

No branches or pull requests

2 participants