Replies: 1 comment 5 replies
-
Hmm, weird. Maybe there's some issue with the event loop in AWS lambda, such that it thinks the function / promise has completed, while it hasn't? The promise chain inside OpenPGP.js can be fairly complex. I don't know why it would break on the second call, though, unless it has something to do with the ponyfill loading - are you using streams? As a workaround, you could call |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm running to an issue where readMessage just seems to fail silently when called twice after decrypting 2 different private keys.
1st Scenario:
Lambda continues execution with logic to retry with another key
I thought it had something to do with the way I've written the code but I copied the exact code in a unit test and it properly logged the result/error and finishes the execution as expected. To be sure, I tried the scenarios below:
2nd Scenario:
(Modified lambda to continue execution even if the decryption was already successful)
I tried the same thing with my unit test and it also logged the result/error and terminates at the exp finishes the execution as expected.
3rd Scenario:
Variation of the previous ones except on both times, I used the correct private key. The result is the same, the second call to readMessage function just silently finishes and ends the execution of the lambda even though it should have successfully continued and decrypted the file.
It seems then there's a problem calling readMessage more than once. Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions