I’ve been encountering this issue somewhat frequently over the course of the past few months. Every so often, when my React web app attempts to send a magic link, the stytch SDK returns the error:
" SDKAPIUnreachableError: Error authenticating session Unable to contact the Stytch servers. Are you online?"
We’re using the npm package “@stytch/react” v1.0.2. I did notice that in the past 5 months the package has been bumped all the way to v7.0.2. I’ll bump mine. However, this still seems to be a recurring issue that is not specific to the SDK version.
Has there been any known outages on your servers? Again, this isn’t super frequent. We have users connected to our web app all day long. But it’s frequent enough that I find it strange.
The past outages were around:
- Sep 6, 2023 7:44:34 PM UTC
- Sep 1, 2023 3:40:29 PM UTC
- Aug 22, 2023 1:05:50 PM UTC
- Aug 19, 2023 9:22:27 PM UTC
- Aug 14, 2023 3:56:21 PM UTC
Hey Louis – thanks for posting!
SDKAPIUnreachableErrors generally indicate some sort of network connectivity issue, such as poor internet signal or phone service (for users on mobile devices). These errors occur when our frontend SDK (running in the user’s browser) can’t successfully connect to Stytch servers – but they don’t generally indicate an issue with our servers themselves.
In most cases, you shouldn’t run into the same error upon retrying (as long as any underlying network issues have been resolved). I do think that upgrading to the latest SDK version is a good idea regardless.
Have you or your users been running into these errors persistently when you’re confident that there are no network connectivity issues, or do you think that transient network issues could explain the behavior that you’re seeing?
I can’t say with 100% confidence that it’s not a network error. In fact, it’s very possible it is. We’ll continue monitoring it. At least, it’s good to know it’s not an issue on your servers. I had to ask though since I couldn’t find any information about this error in your documentation.
Hey Louis – sounds good! Happy to help if you continue to monitor and start seeing it in situations that don’t seem network-related. Thanks again for posting!