I am using localhost subdomains in development, so my URLs look like this: http://ryjl3-tyaaa-aaaaa-aaaba-cai.localhost:8000/
I need to do this to use ES modules natively while in development, because native ES modules do not set the Referer properly for the IC (there is no canisterId query parameter).
This has been working fine so far, but I just tried to do an update call for the first time from the frontend, and I keep getting this error message in response:
{
"message": "Fail to verify certificate",
"stack": "Error: Fail to verify certificate\n at pollForResponse (http://ryjl3-tyaaa-aaaaa-aaaba-cai.localhost:8000/_snowpack/pkg/@dfinity/agent.js:13815:15)\n at async caller (http://ryjl3-tyaaa-aaaaa-aaaba-cai.localhost:8000/_snowpack/pkg/@dfinity/agent.js:14000:35)\n at async graphQLFetcher (http://ryjl3-tyaaa-aaaaa-aaaba-cai.localhost:8000/:39:21)"
}
I assume this is because I am using localhost subdomains, and the certificate verification process is not looking for thatā¦perhaps?
More information about why I am using localhost subdomains: How does replica know which canister to serve from - #9 by nomeata