org.eclipse.jetty.http.BadMessageException: 400: Invalid cookie

0
Hi Mendix, me again with some upgrade problems from 9.12 to 9.24. Due to my previous problems in 9.24 I decided to try a full new migration from 9.12.14 to 9.24.5. This went straightforward. Just 1 error to fix and I could compile the project. Then I ran immediatly into this issue: HTTP ERROR 400 Invalid cookie URI: /index.html STATUS: 400 MESSAGE: Invalid cookie SERVLET: - CAUSED BY: org.eclipse.jetty.http.BadMessageException: 400: Invalid cookie CAUSED BY: org.eclipse.jetty.http.CookieParser$InvalidCookieException: Invalid cookie Caused by: org.eclipse.jetty.http.BadMessageException: 400: Invalid cookie at org.eclipse.jetty.server.Cookies.getCookies(Cookies.java:106) at org.eclipse.jetty.server.Request.getCookies(Request.java:870) at org.eclipse.jetty.server.session.SessionHandler.checkRequestedSessionId(SessionHandler.java:1603) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1492) at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1307) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129) 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:416) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:385) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:272) at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:140) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:936) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1080) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: org.eclipse.jetty.http.CookieParser$InvalidCookieException: Invalid cookie at org.eclipse.jetty.http.RFC6265CookieParser.parseField(RFC6265CookieParser.java:381) at org.eclipse.jetty.http.CookieParser.parseFields(CookieParser.java:50) at org.eclipse.jetty.server.Cookies.getCookies(Cookies.java:102) ... 23 more   I removed all cookies in browser, tried Chrome, Firefox but nothing works. Forum isn't helping either. Also tried after upgrading most common marketplace modules (Community Commons, NanoflowCommons, Deeplink, Encryption, ModelReflection). But no success.   Anyone ideas?
asked
2 answers
0

Hi Dave,

I don’t know if this would help you, but I also had problems when upgrading the Mendix Studio Pro version for my project. In my case I had problems with the OIDC SSO marketplace module and I noticed that it was because in the Studio Pro updates they changed how the session cookies are handled (Change is between versions 9.20 and 9.24, after Mendix 10 they reverted back the cookies handling).

So a possible solution is to see if you have any marketplace modules installed that would handle the session data cookies (such as SAML, OIDC, SSO) and make sure you update those modules too.

I hope that helps you find your solution to that problem, best regards!

answered
0

A custom setting at least solves my problem for now. This is setting: RequestHandling.AllowLegacyCookies.

 

After an update of the Deeplink module to version 10.0.3 issue was fixed.

answered