opensourcecatholic / marriage-booklet

To help Catholic couples plan their wedding mass
4 stars 2 forks source link

I18n::InvalidLocale ("socket" is not a valid locale) #87

Closed JohnRDOrazio closed 3 years ago

JohnRDOrazio commented 3 years ago

For whatever reason, I started getting this output again when spinning up a local Rails Server instance:

I18n::InvalidLocale ("socket" is not a valid locale):

app/controllers/application_controller.rb:10:in `switch_locale'
Started GET "/socket.io/?X_LOCAL_SECURITY_COOKIE=&EIO=3&transport=polling&t=1629705029253-72961" for ::1 at 2021-08-23 12:31:57 +0200
Processing by PagesController#home as */*
  Parameters: {"X_LOCAL_SECURITY_COOKIE"=>"", "EIO"=>"3", "transport"=>"polling", "t"=>"1629705029253-72961", "locale"=>"socket"}
Completed 500 Internal Server Error in 7694ms (Allocations: 2689)

Now what in the world is causing this? What is trying to connect to socket.io? Could it be the webpacker-dev-server?

Not sure if it's a bug or not, or if it's supposed to be some obscure built in feature, I don't know enough about Rails to know what's going on. It just seems to have popped up randomly though, and it doesn't seem to affect the webserver instance (pages are rendering, navigation links are working, locales seem to be working).

JohnRDOrazio commented 3 years ago

This "error" is occurring on the WSL2 instance on my personal laptop. When running exactly the same setup and code on the WSL2 instance on my Desktop PC in my office, no such error occurs. Must have something to do with the environment I guess, and not so much with the project code?

JohnRDOrazio commented 3 years ago

I believe I may have found the cause of this error message: https://superuser.com/questions/1448490/how-to-find-source-of-traffic-to-socket-io-on-win-10-desktop

JohnRDOrazio commented 3 years ago

Can confirm that Nvidia GeForce experience was in fact causing this issue. When trying to open GeForce Experience, I saw it had been corrupted and generated an error when trying to open. I uninstalled, redownloaded and reinstalled, and voilà this problem is gone. Closing the issue.