Why Turbo doesn't work on localhost?

Hi,

First, thanks for making Turbo, it saves so much time!

Even, if I’m quite a newbie, I’m able to make it works flawlessly for quite simple but useful cases.
However, for a reason I don’t understand, It only works when deployed and not when I’m testing on localhost (see error below).

Do you have any clue why?
It make testing such a burden…

Thanks a lot.

Hey there!

The error TypeError: Failed to fetch doesn’t have to do with turbo, it might just me a malformed URL or a CORS error.

If you are using turbo out-of-the-box there shouldn’t be any CORS errors, so maybe trying the solutions on this article might help?
TypeError: Failed to fetch and CORS in JavaScript | bobbyhadz.

Also, have you tried running localhost on an incognito tab, or a different browser?

It’s an SSL error. Are you using an SSL certificate on your localhost? Can you manually open that same URL in the error directly from your browser? If not, change requests to http instead of https?

@marco-beduschi Thanks. It works fine in Firefox but not in Chrome.
@tleish It is indeed an error linked to SSL. But how can I force my local express app to make http and not https request? Thanks.