Hi there,
This entire week I’ve been having trouble with Identity, after it had been working fine for months.
Here’s the problem:
-
Sometimes the problem is a CORS thing, and I get the dreaded
Access to fetch at [X] from origin [Y] has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
-
Other times I get
Internal Server Error - Request ID: [Z]
-
And yet other times it says the resource basically doesn’t exist.
This has been going on in two separate Identity instances, as far as I can tell:
-
The one I’m most concerned about is tcreative.netlify.app (primary domain tcreative.fi, branch subdomains docs.tcreative.fi and dev.tcreative.fi)
-
This is also happening in nexo3.netlify.app
Based on my investigations, here are my conclusions:
-
It’s not about the package I’m using (
react-netlify-identity-gotrue
), because the problems also happen with the officialnetlify-identity-widget
and when I make an API call directly. -
It’s not about local development, because the problems happen on the production sites as well, and also when I make API calls from Reqbin or Postman.
-
It’s not about my machine, because it works on and off in the exact same browser and device just minutes apart.
-
It’s not about using custom domains or having branch subdomains, because the problem also happens in nexo3.netlify.app
Fixes I’ve tried so far:
-
Adding an
Access-Control-Allow-Origin
header rule to netlify.toml -
Including the official widget script in my
<head>
tag even if I use the React-specific package -
Using the widget instead of the React-specific package
-
Deleting and recreating the Identity instance
-
Using
no-cors
mode in API calls -
Some other stuff I can’t even remember right now
I’ve Googled far and wide and read and tried pretty much everything at this point, but I feel like the problem is quite probably on Netlify’s end.
Any help would be appreciated!