deltaDAO / self-description-signer

A simple script to create Gaia-X Self Descriptions
6 stars 6 forks source link

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

Open bartoccioni opened 1 year ago

bartoccioni commented 1 year ago

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