Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-21004

Sometimes the WYSIWYG editor cannot connect to the realtime session

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 15.5-rc-1, 14.10.13
    • 13.10
    • WebSocket
    • None
    • Unit
    • Trivial
    • N/A
    • N/A

    Description

      When entering the realtime WYSIWYG edit mode there's an info box displayed above the editor saying:

      Connecting to the collaborative session. Please wait...

      that doesn't disappear. The JavaScript console has:

      Firefox can’t establish a connection to the server at ws://localhost:8080/xwiki/websocket/xwiki/netflux. netflux-client.js:366:65
      

      and the server logs contain this exception:

      2023-06-12 13:41:25.861:WARN :oejs.HttpChannel:qtp1053631449-100: /xwiki/websocket/xwiki/netflux
      java.lang.IllegalStateException: Duplicate key JSESSIONID (attempted merging values javax.servlet.http.Cookie@2df1d83f and javax.servlet.http.Cookie@566c837d)
      	at java.base/java.util.stream.Collectors.duplicateKeyException(Collectors.java:133)
      	at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:180)
      	at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
      	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
      	at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:274)
      	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
      	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
      	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
      	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
      	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
      	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
      	at org.xwiki.websocket.internal.XWikiWebSocketRequestStub.parseCookies(XWikiWebSocketRequestStub.java:143)
      	at org.xwiki.websocket.internal.XWikiWebSocketRequestStub.<init>(XWikiWebSocketRequestStub.java:67)
      	at org.xwiki.websocket.internal.DefaultWebSocketContext.createExecutionContext(DefaultWebSocketContext.java:145)
      	at org.xwiki.websocket.internal.DefaultWebSocketContext.initialize(DefaultWebSocketContext.java:78)
      	at org.xwiki.websocket.internal.XWikiEndpointConfigurator.modifyHandshake(XWikiEndpointConfigurator.java:68)
      	at org.eclipse.jetty.websocket.javax.server.internal.JavaxWebSocketCreator.createWebSocket(JavaxWebSocketCreator.java:162)
      	at org.eclipse.jetty.websocket.core.server.internal.CreatorNegotiator.lambda$negotiate$0(CreatorNegotiator.java:64)
      	at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1450)
      	at org.eclipse.jetty.server.handler.ContextHandler.handle(ContextHandler.java:1487)
      	at org.eclipse.jetty.websocket.core.server.internal.CreatorNegotiator.negotiate(CreatorNegotiator.java:63)
      	at org.eclipse.jetty.websocket.core.server.internal.AbstractHandshaker.upgradeRequest(AbstractHandshaker.java:76)
      	at org.eclipse.jetty.websocket.core.server.internal.HandshakerSelector.upgradeRequest(HandshakerSelector.java:39)
      	at org.eclipse.jetty.websocket.core.server.WebSocketMappings.upgrade(WebSocketMappings.java:241)
      	at org.eclipse.jetty.websocket.servlet.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:160)
      	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202)
      	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1571)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1383)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1544)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1305)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:192)
      	at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:51)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
      	at org.eclipse.jetty.server.Server.handle(Server.java:563)
      	at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:505)
      	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:762)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:497)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282)
      	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:314)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
      	at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
      	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:421)
      	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:390)
      	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:277)
      	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:139)
      	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:933)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1077)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      

      I don't know why the JSESSIONID is duplicated, but in any case XWikiWebSocketRequestStub should be bulletproofed.

      Attachments

        Activity

          People

            mflorea Marius Dumitru Florea
            mflorea Marius Dumitru Florea
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: