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

Unhandled Promise Rejection #9

Open
raza-basit opened this issue Aug 31, 2017 · 3 comments
Open

Unhandled Promise Rejection #9

raza-basit opened this issue Aug 31, 2017 · 3 comments

Comments

@raza-basit
Copy link

raza-basit commented Aug 31, 2017

Dependencies:
expo = 20.0.0
react = 16.0.0-alpha.12
react-native = 0.47.0
react-native-openpgp = 1.0.3

var options, encrypted;

options = {
  data: 'Hello, World!',      // input as String
  passwords: ['secret stuff'] // multiple passwords possible
};

openpgp.encrypt(options)
  .then((ciphertext) => {
    encrypted = ciphertext.data; // '-----BEGIN PGP MESSAGE ... END PGP MESSAGE-----'
  })
  .catch((error) => {
    console.log("Something went wrong: " + error);
  }); 

Got Unhanded promise rejection error when try to execute above code example

Possible Unhandled Promise Rejection (id: 0):
Object {}  

@orhan will you please guide me, where I am doing wrong.

Thanks

@orhan
Copy link
Owner

orhan commented Aug 31, 2017

Have you create a key pair already?

PS: Have you 'detached' your Expo project, because I don't think you can link native libraries with Expo right?

@raza-basit
Copy link
Author

raza-basit commented Aug 31, 2017

Yes, I have already generated the key pair .
I have also detached EXPO. now running on android device instead of emulator, but the error is remain same,

After link the lib with react-native got the below error

Error in callNativeModule():4,0,,85
Did not get valid calls back from JS: [[4],[0],[],[85]]

@raza-basit
Copy link
Author

Error in callNativeModule():4,0,,85
Did not get valid calls back from JS: [[4],[0],[],[85]]

figured out ... it happens because I was using console.log in my code.

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