Couldn't parse Expires in cookie

During replication, when using the session authentication, I always see “Couldn’t parse Expires in cookie” in the logs. If I understand correctly, this cookie comes from the Sync Gateway, but Couchbase Lite apparently cannot parse its expiration date.

Sync Gateway: 3.0.3
Couchbase Lite C SDK: 3.0.2

Umm… can we see your logs???

Sure :sweat_smile:
logs.zip (6.3 KB)

Ok, so the cookie comes from the Google Cloud load balancer we have in front of our Sync Gateway instances. The cookie is meant to be used for sticky sessions. Is that a use case that is supported by Couchbase Lite and Sync Gateway or even all that useful?

I am unfamiliar with this term, but basically Cookies in CBL only function as blobs pretty much. They are there just so that they can be sent to the remote that knows what to do with them. That being said it does check it for “correctness” first (see here). I believe that this date string is based on Section 5.1.1 of the Cookie RFC. What form is it taking in the sticky session?

The goal of the sticky session is for the load balancer to connect the same client to the same node from one request to the next. But I’m uncertain if that makes much of a difference for Sync Gateway instances. Does it?

The logs contain the full request and response of the WebSocket connect request, but here is the relevate header:
Set-Cookie: GCLB=COWjp4rwlqauaQ; path=/; HttpOnly; expires=Tue, 22-Nov-2022 07:21:38 GMT

Just FYI, I don’t see Couchbase Lite sending a GCLB cookie in the request even though it previously received that cookie.

This is not super urgent. I just saw the warning and was wondering what is up with it.

I do not think that we, currently, support this on the C platform.

I’ve opened CBL-3941 to track the issue.