mozilla / fxa-content-server

DEPRECATED - Migrated to https://github.com/mozilla/fxa
Mozilla Public License 2.0
163 stars 120 forks source link

Unable to sign up #7056

Closed championshuttler closed 5 years ago

championshuttler commented 5 years ago

Description

After setting up the project , when I try to signup I am getting the error https://pastebin.com/YAghL34j Describe the issue that you're seeing.

I try to debug the error but unable to do so.

I am checking the status auth-server db mysql PORT 8000 is showing the errors in ./pm2 status Output is here https://pastebin.com/FdGEVbfu

For the |pm2 logs| here is the output https://pastebin.com/kVzJ0uyQ

Expected result

Able to signup / login

Actual result

Unable to signup/ login

Environment

I tried with both Node 8 and Node 10. Facing same issue

What browser and operating system are you using?

Tried with Firefox and Chrome MacOS 10.13

shane-tomlinson commented 5 years ago

@championshuttler - From this line, it looks like you do not have Docker running:

20|pairing | See 'docker run --help'. 20|pairing | docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

r-arvind commented 5 years ago

Screenshot from 2019-03-20 00-12-52

@shane-tomlinson I am facing the same issue, can you explain as to what is happening and how to fix it?

Edit: Isn't the content-server supposed to work with remote Firefox Accounts Server?

hritvi commented 5 years ago

@r-arvind @championshuttler there is some issue with the localhost. Instead, you would be able to signin at 127.0.0.1:3030. Even I tried a lot to search for an appropriate reason for this issue, but at last, concluded that there is some problem with my local PC. But as this issue is more frequent and not dependent on the local machine, I think that it would need some more discussions.

lmorchard commented 5 years ago

I haven't looked too deeply into this issue, but just talking about localhost versus 127.0.0.1: Those are definitely not interchangeable as URLs. They might go to the same place, network-wise, but in an URL they are different distinct origins with respect to security concerns and such.

If you look in the Web Console, you should see an error that reads something like: Content Security Policy: The page’s settings blocked the loading of a resource at... This means that the site has directed the browser to only load certain kinds of resources from certain origins - i.e. in this case, only from 127.0.0.1 per the Content-Security-Policy header served up with the page. (You can also see this header if you look in the Network tab in the Web Console)

I think for FxA in development, everything is tied to 127.0.0.1:3000 as the expected origin.

r-arvind commented 5 years ago

Wow, it works at 127.0.0.1. That was unexpected, never realized that localhost won't work. I was struggling to find the issue for a long long time. Thanks!!

shane-tomlinson commented 5 years ago

Thanks for the info @hritvi! I'm going to close this issue.

hritvi commented 5 years ago

Thanks @lmorchard for clearing all my origin related doubts. Until now I used to think that 127.0.0.1 points to localhost only and both are the same things :sweat_smile: .