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

[BUG] Method sign() not returning jws #23

Open
bartoccioni opened this issue Oct 28, 2022 · 0 comments
Open

[BUG] Method sign() not returning jws #23

bartoccioni opened this issue Oct 28, 2022 · 0 comments
Labels
Type: Bug Something isn't working

Comments

@bartoccioni
Copy link

bartoccioni commented Oct 28, 2022

Summary

Trying to sign SD I've always got an error during the process

'Something went wrong:'
undefined

after a short debugging session i saw that the sign() method did not return the jsw string and the procedure failed without triggering any error/exception. The cause of this behavior is to be found in the scope of the declaration of the variable jws which is inside a try/catch block and when it is returned is no longer valued(=undefined).

The workaround I've adopted to fix the problem is to move the declaration of jws outside the try/catch block.

image

I hypothesize that this behavior is due to the relatively new version of Node.js (16.16.0) that I have been using lately.

Hope this help.

Regards

Pietro

Environment

  • OS: Windows 11
  • Node: 16.16.0
  • npm: 8.11.0
@bartoccioni bartoccioni added the Type: Bug Something isn't working label Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant