Error using Stoic Identity to call canisters

I’m trying to use Stoic wallet in my project to authenticate canister calls, but I am getting this error:

There was an error - please ensure you have Cookies Enabled (known issue for Brave users)

The StoicIdentity.load() is not loading anything at all it’s just returning false and that error.

If I initialize my actor soon after connecting, it’s giving the error when I try to make the call:

My current setup:

 const updateStoicClient = async () => {
    try {
      if (typeof window !== "undefined") {
        StoicIdentity.load().then(async (identity: any) => {
          if (identity !== false) {
            initStoicActor(identity);
          } else {
            identity = await StoicIdentity.connect();
            initStoicActor(identity);
          }
        });
      }
    } catch (error) {
      console.log("Error in connectStoicWallet:", error);
    }
  };

  const initStoicActor = (identity: any) => {
    setPrincipalId(identity.getPrincipal().toText());

    const _backendActor =
      Actor.createActor<ActorSubclass<BACKENDSERVICE> | null>(
        backendIDL,
        {
          agent: new HttpAgent({
            identity,
            host: host,
          }),
          canisterId: backendCanisterId,
        }
      );

    setBackendActor(_backendActor);
  }

I was using Brave, I tried using Chrome as well and no change, I’m not sure if this is really a cookies problem

I looked in the wallet code, here, it’s looking for _db in localstorage which is not being set, it’s not being set because of the Cookies Being Disabled?

What can I do on my side or something need to be fixed on the wallet side?

@stephenandrews @bob11 @velgajski1


Try this

Thanks @baolongt , I tried on my Chrome and Brave, for some reason I can’t find the experimental third party one on my PC, just a bunch of other experimentals.


It’s name might have changed a slight bit, in these docs it’s called differently: Stoic Wallet, Cookies Problem Solution | ICPSwap

Also make sure to click on the (i) in front of the url and allow 3rd party cookies from there too.

As far as I understand, there hasn’t been any development on Stoic for a while.

1 Like

Thank you, I enabled, reluanched the browser, tried to connect stoic again, but still getting the error : (

Oh no! did you try in another browser. Or you can change to another wallet SDK

Also make sure to click on the (i) in front of the url bar and allow 3rd party cookies from there too.

You might have forgotten this step, by default 3rd party cookies are blocked nowadays.

1 Like