jackyzy823 / fxa-selfhosting

Selfhosting your own Firefox Accounts (FxA)!
Mozilla Public License 2.0
94 stars 13 forks source link

Can't connect to channelserver #16

Closed alnmy closed 1 year ago

alnmy commented 1 year ago

I modified the dockerfile for channelserver to use mozilla/channelserver@sha256:01f9251637cc3679b8cf31493569a79a27b41f952d4eb3d5306e1ee8d9d3feea

When I try use the www.fxa login on another device, in the logs I get: WebChannel error: No Such Channel in the console log.

Essentially, I cannot add the FxA server to other devices after I added one because channelserver is failing.

Channelserver has these logs (repeats for a bit longer):

channelserver_1                     | {"Logger":"channelserver-1.0.0","Type":"channelserver:log","Pid":1,"Severity":7,"Timestamp":1675526094669937662,"Fields":{"msg":"Starting server: \"0.0.0.0:8000\""}}
channelserver_1                     | {"Logger":"channelserver-1.0.0","Type":"channelserver:log","Pid":1,"Severity":6,"Timestamp":1675526094719605325,"Fields":{"msg":"Establishing connection to Stat Server","port":"8125","server":"localhost"}}
channelserver_1                     | {"Logger":"channelserver-1.0.0","Type":"channelserver:log","Pid":1,"Severity":6,"Timestamp":1675526094805945007,"Fields":{"msg":"Establishing connection to Stat Server","port":"8125","server":"localhost"}}
channelserver_1                     | {"Logger":"channelserver-1.0.0","Type":"channelserver:log","Pid":1,"Severity":6,"Timestamp":1675526094859267084,"Fields":{"msg":"Establishing connection to Stat Server","port":"8125","server":"localhost"}}

My config: https://pastebin.com/EUPrVsEg

Nginx config: https://pastebin.com/raw/j1xYa7Ti

jackyzy823 commented 1 year ago

The channel server part is not well tested because i do not use that :( .

Some more details are very helpful.

  1. Have you tried to use mozilla's channelserver and check if it works ?

  2. Have you configured the mobile device to custom account/sync url before you scan the QR code?

WebChannel error: No Such Channel in the console log.

This may not be related to channel service. it may be a bridge between fxa Web UI and browser part of fxa account system.

alnmy commented 1 year ago

The channel server part is not well tested because i do not use that :( .

Some more details are very helpful.

1. Have you tried to use mozilla's channelserver and check if it works ?

2. Have you configured the mobile device  to custom account/sync url before you scan the QR code?

WebChannel error: No Such Channel in the console log.

This may not be related to channel service. it may be a bridge between fxa Web UI and browser part of fxa account system.

Hello, the original issue has gone away even though I have done nothing since then, and I am not quite sure what caused it. However, now I have a new issue on the mobile device given when I try to pair with the QR code or logging in normally. image I am using Firefox for iOS. If relevant, here are my settings that I used: Use Custom FxA Content Server: Yes, https://www.fxa.alnn.xyz/ Use Custom Sync Token Server: Yes, https://token.fxa.alnn.xyz/token/1.0/sync/1.5

jackyzy823 commented 1 year ago

The commit which fixes this issue is in develop branch , just not been migrated yet.

You can add these lines to _init/auth/oauthserver-prod.tmpl.yml and re-run ./init.sh to update the config and then restart servers.

alnmy commented 1 year ago

Thanks very much for the help, all related issues now seem to be solved.