Realtime editor: 404 on the netflux websocket

Hello,

I’m trying to setup the realtime editor, but it doesn’t work.

Looking in the console, the editor tries to connect to “wss://wiki.domain//websocket/xwiki/netflux” and get a 404.

Our wiki is installed without the /wiki subpath (xwiki.webapppath= is explicitly blank), maybe it’s related ?

I tried to find a way to force the url in configuration but I didn’t found one.

What should I do?

Thanks for you help and have a nice day,

No, the WebSocket URL would have been otherwise wss://wiki.domain/xwiki/websocket/xwiki/netflux. I think the problem is related to the double slash. Can you try this in the JavaScript console:

new WebSocket('wss://wiki.domain/websocket/xwiki/netflux');

(basically keep a single slash). Do you still get 404? If not then please open an issue at Issue Navigator - XWiki.org JIRA .

Thanks,
Marius

Hello,

Yes, I get the error with a single slash.

I also tried for science to use

wss://wiki.domain/xwiki/websocket/xwiki/netflux

and now it generate a 500, but it seems to hit Nimbus code, so maybe it’s better ?

[2022-01-18 14:42:15] [info] 2022-01-18 14:42:15,124 [pool-15-thread-1] ERROR o.x.c.o.a.i.OIDCUserManager - Failed to update user informations
[2022-01-18 14:42:15] [info] com.nimbusds.oauth2.sdk.ParseException: Unexpected Content-Type, must be application/json; charset=UTF-8 or application/jwt; charset=UTF-8
[2022-01-18 14:42:15] [info] #011at com.nimbusds.openid.connect.sdk.UserInfoSuccessResponse.parse(UserInfoSuccessResponse.java:259)
[2022-01-18 14:42:15] [info] #011at com.nimbusds.openid.connect.sdk.UserInfoResponse.parse(UserInfoResponse.java:73)
[2022-01-18 14:42:15] [info] #011at org.xwiki.contrib.oidc.auth.internal.OIDCUserManager.updateUserInfo(OIDCUserManager.java:185)
[2022-01-18 14:42:15] [info] #011at org.xwiki.contrib.oidc.auth.internal.OIDCUserManager.lambda$updateUserInfoAsync$0(OIDCUserManager.java:133)
[2022-01-18 14:42:15] [info] #011at org.xwiki.context.concurrent.ExecutionContextRunnable.run(ExecutionContextRunnable.java:71)
[2022-01-18 14:42:15] [info] #011at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[2022-01-18 14:42:15] [info] #011at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[2022-01-18 14:42:15] [info] #011at java.base/java.lang.Thread.run(Thread.java:829)

Does that help?

What servlet container do you use (Tomcat, Jetty)? And which verison? You also didn’t mention the version of XWIki that you’re using. Check the XWiki server logs when you restart XWiki. Do you see any message related to WebSockets? Such as:

The servlet container doesn’t support the Java API for WebSocket (JSR 356).

xwiki is at version 13.10.2
tomcat is at version 9.0.31-1 (deb10u6)

I had indeed the error message in the logs - I fixed the tomcat installation there was an issue and now it’s working :slight_smile:

Thanks for your help!