Spurious Agent Error: Invalid certificate: Signature verification failed

I am setting up some web workers in my local environment, I first initialize the api, and then start polling. This reads data from the backend that doesn’t require any authentication validating that the api is working fine, but…

as soon as I try the getOnePlinkoBall method, I get the following spurious Agent Error.

I say spurious because the backend updates correctly and the method is actually successful, but since it throws an error, I can’t retrieve data from the returned promise. Any suggestions on how to fix this?

The solution:

if (isLocal) {
    await auth.agent.fetchRootKey();
}

Thank you as always to @peterparker

3 Likes