Closed etechkuldip closed 7 months ago
Hello @etechkuldip
I don't know Openfire but with Prosody there is the cross_domain_websocket
parameter that need to be set with the web url (http://localhost:8080/
in case of npm run preview
).
can be identified by the 403 HTTP response (GET ws://10.0.0.79:5280/xmpp-websocket
) in browser network tab:
HTTP/1.1 403 Forbidden
Date: Sat, 30 Mar 2024 17:23:35 GMT
Content-Length: 401
Connection: Keep-Alive
Content-Type: text/html; charset=utf-8
As it work for me, I ask you to provide a reproducing configuration.
@nioc Thank you for your prompt reply. I comprehend your message, and I will replicate the process after altering my surroundings.
Here is the my new configuration,
var config = { name: "XMPP web", transports: { websocket: "ws://kuldip-pc:5222/ws", }, hasGuestAccess: true, hasRegisteredAccess: true, anonymousHost: null, // anonymousHost: 'anon.domain-xmpp.ltd', isTransportsUserAllowed: false, hasHttpAutoDiscovery: false, resource: "Web-XMPP", defaultDomain: "kuldip-pc", defaultMuc: null, // defaultMuc: 'conference.domain-xmpp.ltd', isStylingDisabled: false, hasSendingEnterKey: false, connectTimeout: 5000, pinnedMucs: [], logoUrl: "", guestDescription: "", };
Now using ws://kuldip-pc:5222/ws , I am getting Server unreachable.
I also increase timeout , but still the problem same.
Here is the openfire server ports list
I know ,you are not familiar but what should be a port and url to connect ? just help me with url or right connection url
You can have a look to this discussion
Probably something like this (without TLS) : ws://your.openfire.host:7070/ws
@nioc Thanks sir, It connected, but I am getting the below error if I uncheck Plain SASL Mechanism.
I want to use wss://kuldip-pc:7443/ws/ but it is not connecting. I don't have to use Plain SASK Mechanism for security reasons. Can you please guide me for WSS?
The auth mechanism allowed by the xmpp.js library is only PLAIN. But it is not a problem using TLS (as the connection is secured).
Does your certificate is OK?
What the console/network tab says using the secure port (wss://…:7443)?
May be using https
scheme instead of wss
.
At least using a proxy (Apache or Nginx) may solve issue.
@nioc Here is the error
And what about network tab for the WS request?
Nothing showing
In the header tab?
Strange behavior 😞
I do not think it is a bug in the app or library (because it works without TLS in your setup and with TLS in mine).
So I think about 2 leads:
curl https://kuldip-pc:7443/ws/
@nioc Allow me some time, I will update you on what you suggest
Looks like a certificate issue 😉 Maybe you can force your browser to trust it (I'm not a cert expert). I suggest using a let's encrypt cert for your production.
Ohh, thanks, Do you know how to fix it or reference, any link ? I am not familiar with it,
For the cert creation: https://certbot.eff.org/ For use in OpenFire (just Googled 😆): https://meetrix.io/blog/xmpp/openfire_ssl.html
I close the issue but feel free to continue discussion.
Openfire now has a plugin that lets you add XMPP Web automatically. You could use that, or use it for inspiration on how to configure a stand-alone instance of XMPP web.
More details on Openfire's plugin: https://discourse.igniterealtime.org/t/new-openfire-plugin-xmpp-web/
Describe the bug
I have been trying to connect Openfire through xmpp-web.
Steps to reproduce
Openfire version : 4.7.5 => Disabled TLS V1.3 under port 5222
Registration
Run App through from Vue.js => "preview": "vite build && vite preview --port 8080",
Expected behavior
At least, I want to see the errors from console, its only showing Error during login.
Relevant log
No response
local.js configuration
XMPP-web version
0.10.0
Installation
Build from source
XMPP server(s)
Openfire
Browser(s)
Chrome
Device(s)
desktop
Other information
No response