Getting error: ECDSA: invalid signature length

@zeljko getting this error using defender-autotask-client, though I have added "fs" package

@kbhargav5
Just to confirm, your code is executed in browser or in server(node.js environment)?

If code is executed in browser then that error makes sense as fs is part of Node.js runtime, it does not exist in browser runtime.

@zeljko ,
it is executed in browser runtime. am making a fetch request to autotask webhook, and if I get status:pending, I will query autotaskrunID which I get from fetch response untill it is success. I need to run this in browser so that I can get the signature of the user and send this as request body to autotask via webhook.

Unfortunately this package is designed to run in Node.js environment.

Request for browser support has been noted.

@kbhargav5
There are some temporary solutions to this problem like ones described here but there is no guarantee that it will work.

Best,
Zeljko

ok, moving this to server side will add extra http request. We already have one http request with calling webhook request

@zeljko, Is there any other way, we can handle this in the client side

@kbhargav5
At the moment there is no way to do it from client side.
Using client packages in a browser environment is not recommended as sensitive API KEYS would be exposed publicly.

We have added item to the backlog that would enable getting result and status from the client, just like invocation webhooks are working.

Best,
Zeljko