Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Failed to login #39

Open
stevenroose opened this issue Jan 28, 2019 · 6 comments
Open

Failed to login #39

stevenroose opened this issue Jan 28, 2019 · 6 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed

Comments

@stevenroose
Copy link

Running latest ejabberd.

Paste from the js console:

authenticated content.js:122:13
CONNECTED 2d6c65fc98d33324d429.js:1:16406
rosterCallback@https://opa.konuro.net/_nuxt/2d6c65fc98d33324d429.js:1:17712
sendIQ/s<@https://opa.konuro.net/_nuxt/24344caf2dcb8748671d.js:2:29020
run@https://opa.konuro.net/_nuxt/24344caf2dcb8748671d.js:2:24412
_dataRecv/<@https://opa.konuro.net/_nuxt/24344caf2dcb8748671d.js:2:32872
forEachChild@https://opa.konuro.net/_nuxt/24344caf2dcb8748671d.js:2:16103
_dataRecv@https://opa.konuro.net/_nuxt/24344caf2dcb8748671d.js:2:32705
_onMessage@https://opa.konuro.net/_nuxt/24344caf2dcb8748671d.js:2:56595
24344caf2dcb8748671d.js:2:21108
error: undefined https://opa.konuro.net/_nuxt/2d6c65fc98d33324d429.js:1 - TypeError: n is undefined 24344caf2dcb8748671d.js:2:21108
running content script content.js:65:13
invalid bearer token, token= null content.js:97:15
authenticated content.js:122:13

@stevenroose stevenroose changed the title Failed to load Failed to login Jan 28, 2019
@stevenroose
Copy link
Author

Using websocket.

@kevinfaveri
Copy link
Collaborator

kevinfaveri commented Feb 4, 2019

Unfortunately, Ejabberd has not yet been thoroughly tested to ensure compatibility.

I will label this issue so it remains open until I have time to ensure compatibility with Ejabberd.

Collaboration is especially appreciated in those cases which involve ensuring compatibility with different XMPP servers. So, anyone reading this, feel invited to help with the development.

@kevinfaveri kevinfaveri self-assigned this Feb 4, 2019
@kevinfaveri kevinfaveri added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed labels Feb 4, 2019
@kevinfaveri
Copy link
Collaborator

kevinfaveri commented Apr 25, 2019

Just tested Opa on latest version with this ejabberd Docker version: https://hub.docker.com/r/rroemhild/ejabberd/

It is working in both http-bind and websocket.
This Docker container enables both http-bind and websocket by default, on the urls:

  • BOSH:
    https://yourdomain:5280/http-bind
  • And for Websocket:
    wss://yourdomain:5280/websocket

And it is working flawlessly with the latest version of Opa available at DockerHub on both connection endpoints...

So, it is probably your current setup (ejabberd) that might not be configured correctly...
Some other things I can think of is:

  • That you might be using a websocket URL starting with 'http' or 'https' (if so, just switch to 'ws' or 'wss' and it should work).
  • Your Websocket module in your ejabberd is not properly enabled and configured?
  • Your Opa json config is not being copied to inside the container? (You can see the contents of Opa config file though Docker using a command like in your Docker machine):
    -- docker exec CONTAINER_NAME cat /app/static/config/app-config.json
  • Incorrect 'XMPP_SERVER_DOMAIN' in the 'app-config.json'? Must be the same XMPP_DOMAIN configured in "Virtual Hosts" of ejabberd web-admin UI.
  • Can you test if the same error occurs if using the HTTP-BIND (BOSH) endpoint?
  • Can you see the log of ejabberd if Opa is connecting?

For reference, here is my test Opa config file for WSS connection:

{
    "XMPP_SERVER_ADDRESS": "wss://myejabberd:5280/websocket",
    "XMPP_SERVER_DOMAIN": "chat",
    "APP_LOCALE": "en-us"
}

@kevinfaveri
Copy link
Collaborator

@stevenroose Can you do the suggested tests at #39 (comment)? If it is not possible to proceed with this Issue I will assume it as closed based on the tests that I did myself.

@stevenroose
Copy link
Author

Is there a way to just run Opa locally without docker? Ideally I'd just have a generated directory that I can upload to a static file server. That was I can also test it easier locally. Currently I can't easily deploy another Opa docker for testing, sorry.

@kevinfaveri
Copy link
Collaborator

@stevenroose You can run Opa with NodeJS, from source. Basically just download the project Master branch or clone with git, and on Command Line inside the project folder run yarn build && yarn start
Also don't forget to edit the app-config.json file as exposed on the ReadME.

https://github.com/credija/opa#nodejs-from-source
https://github.com/credija/opa#configuration

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants