Web worker function errors

Hi all,

These two functions are running in web workers, and it seems that if an error occurs (such as empty or incorrect input—I’m not sure which at the moment), they are not throwing any errors. Instead, the web workers simply hang indefinitely.

createIdentityRequestWithKeys(e.data);
createCredentialTransactionNoSeed(
        e.data.credentialInput,
        e.data.expiry
    );

these functions should throw an error when an error case occurs.

By the way, these functions are working well on web and iOS and if I wait a little and run, they are working on Android, too. looks like I’m sending a value empty or incorrect and getting no error.

Hi there
Are you by any chance you @concordium/web-sdk version 7.5.0?
This looks a lot like a bug which was introduced in that exact version. If so, using 7.5.1 or higher should fix it.

Hi @limemloh I updated the version and tested, but still have the same problem.

Okay, then it would be helpful with some more information.
Even better would be a minimal example reproducing this.

These web workers were loading somehow slowly on Android, but I fixed the issue by redefining the worker on each render(React.js).

1 Like