Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot log in when running docker version 9.0 #53

Closed
binarydad opened this issue May 29, 2022 · 9 comments
Closed

Cannot log in when running docker version 9.0 #53

binarydad opened this issue May 29, 2022 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@binarydad
Copy link

I'm using the same docker script as the previous version. Let me know how I can help with troubleshooting. Thanks!!

sudo docker run -d -p 9200:80 -e APP_HTTP=https://xmpp.mydomain.com:5443/bosh -e XMPP_HTTP=https://xmpp.mydomain.com:5443/bosh -e APP_WS=wss://xmpp.mydomain.com:5443/ws -e XMPP_WS=https://xmpp.mydomain.com:5443/ws -e APP_DEFAULT_DOMAIN=xmpp.mydomain.com --name Xmpp nioc/xmpp-web

image

@nioc nioc added the question Further information is requested label May 29, 2022
@nioc
Copy link
Owner

nioc commented May 29, 2022

Hello @binarydad, xmpp client used (xmpp.js) is different from stanza.io and does not require to use the domain part (and if you provide it, it does not meet xmpp server authentication mechanism). I forgot to mention this point in the release note...
If your xmpp domain is xmpp.mydomain.com, do not login with ryan@xmpp.mydomain.com but just ryan.
Try it and let me know.

@nioc
Copy link
Owner

nioc commented May 30, 2022

Can you add console errors/warns/logs and/or network websocket responses for a more accurate analysis? 😉

Also, you can remove these environment variables which are not used anymore (since BOSH is not supported by xmpp.js):

  • APP_HTTP
  • XMPP_HTTP

So command will become:

sudo docker run -d -p 9200:80
  -e APP_WS=wss://xmpp.mydomain.com:5443/ws
  -e XMPP_WS=https://xmpp.mydomain.com:5443/ws
  -e APP_DEFAULT_DOMAIN=xmpp.mydomain.com
  --name Xmpp
  nioc/xmpp-web

@ThatOneCalculator
Copy link

I can't login to my remote server, seems chat.domain-web.ltd is hardcoded?

Running with npm run dev

image
image

@nioc
Copy link
Owner

nioc commented May 30, 2022

@ThatOneCalculator Yes it is hard-coded but in the local.js file.

In docker usage, is it overridden by APP_WS environment variable.
In archive installation, admin must set it owns values in the file as described in README.MD.

@ThatOneCalculator
Copy link

Ah got it, thanks :)

@binarydad
Copy link
Author

I tried that, but am still getting errors. What else can I provide? I shortened the docker args to this:

sudo docker run -d -p 9200:80 -e APP_WS=wss://xmpp.mydomain.com:5443/ws -e XMPP_WS=https://xmpp.mydomain.com:5443/ws -e APP_DEFAULT_DOMAIN=xmpp.mydomain.com --name Xmpp nioc/xmpp-web

Also, does it matter that I'm using a reverse proxy to get to the container?

image

image

@nioc
Copy link
Owner

nioc commented May 30, 2022

@binarydad what is the result when you login with just ryan?

First screenshot show that websocket is called and responds but your XMPP server replies that is a host it handles (as it is shown also in console error).

The first sent message should be something like this:
<open xmlns="urn:ietf:params:xml:ns:xmpp-framing" xml:lang="en" to="xmpp.mydomain.com" version="1.0"/>

But in your case, it says localhost.

I will have a look, maybe something is missing in my xmpp.js instantiation.

Which XMPP server do you use (Prosody, ...) ?

@nioc nioc closed this as completed in c034f81 May 30, 2022
@nioc
Copy link
Owner

nioc commented May 30, 2022

Ok I missed to instantiate domain, pull the 0.9.1 and it should be ok.

If you enter a full jid like this user@xmpp.mydomain.com, it will use xmpp.mydomain.com as XMPP domain.
If you enter a local jid like this user, it will use defaultDomain value from local.js (overriden by APP_DEFAULT_DOMAIN environment variable) as XMPP domain.

@binarydad
Copy link
Author

That was it! I'm logged in. Thank you!

I see a couple other minor things, but I'll add tickets for those.

I really love this UI. Much better than others I've seen.

@nioc nioc self-assigned this Jun 4, 2022
@nioc nioc added bug Something isn't working and removed question Further information is requested labels Jun 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants