# \[BUG?\] Cookies are invalidated after some time

**URL:** <https://discuss.elastic.co/t/bug-cookies-are-invalidated-after-some-time/34252>\
**Category:** Kibana\
**Created:** [November 10, 2015, 2:36pm UTC](https://discuss.elastic.co/t/bug-cookies-are-invalidated-after-some-time/34252 "2015-11-10T14:36:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![WoJ](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/woj/32/4518_2.png) [@WoJ](https://discuss.elastic.co/u/WoJ)\
**Post date:** [November 10, 2015, 2:36pm UTC](https://discuss.elastic.co/t/bug-cookies-are-invalidated-after-some-time/34252/1 "2015-11-10T14:36:36Z")

</div>

Scenario:

- cookies on the browser are cleared
- Kibana is accessed
- no activity with kibana for some time
- any new request to kibana from the same browser yields the message `{"statusCode":400,"error":"Bad Request","message":"Invalid cookie value"}`

The only way to recover access to Kibana is to clear cookies on the browser.

This is on a clean Kibana 4.2.0 without any specific front-ends (reverse proxies, etc.)

Interestingly enough, after deleting all cookies there are none new set up following a Kibana session. It would look like some other cookies are problematic for that app (even though I do not see how as it has no knowledge of cookies set by other domains).

---

<div class="post-metadata">

**Author:** ![rashid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashid/32/12566_2.png) [@rashid](https://discuss.elastic.co/u/rashid)\
**Post date:** [November 11, 2015, 9:34am UTC](https://discuss.elastic.co/t/bug-cookies-are-invalidated-after-some-time/34252/2 "2015-11-11T09:34:01Z")

</div>

Does this happen in an incognito window? Maybe some browser plugin causing issues? Kibana doesn't use cookies.

---

<div class="post-metadata">

**Author:** ![twigbranch](https://avatars.discourse-cdn.com/v4/letter/t/2bfe46/32.png) [@twigbranch](https://discuss.elastic.co/u/twigbranch)\
**Post date:** [November 16, 2015, 4:31am UTC](https://discuss.elastic.co/t/bug-cookies-are-invalidated-after-some-time/34252/3 "2015-11-16T04:31:34Z")

</div>

I just installed Kibana with ES 2.0 and get the same message when trying to access Kibana for the first time.

---

<div class="post-metadata">

**Author:** ![sunbeams001](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunbeams001/32/6211_2.png) [@sunbeams001](https://discuss.elastic.co/u/sunbeams001)\
**Post date:** [November 28, 2015, 11:24am UTC](https://discuss.elastic.co/t/bug-cookies-are-invalidated-after-some-time/34252/4 "2015-11-28T11:24:24Z")

</div>

Got the same bug here, too  
Actually, I have found a situation which reappear this problem  
when I have a cookie like this  
"abc":"123,456"  
the cookie error occurs, and when I delete this cookie, the site gets fine again

I don't know whether kibana or nodejs cause this bug  
pardon my poor english 🙂

---

<div class="post-metadata">

**Author:** ![miah](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/miah/32/6531_2.png) [@miah](https://discuss.elastic.co/u/miah)\
**Post date:** [December 9, 2015, 7:21pm UTC](https://discuss.elastic.co/t/bug-cookies-are-invalidated-after-some-time/34252/5 "2015-12-09T19:21:46Z")

</div>

Everybody at my company gets this all the time. Sometimes its 5 minutes after visiting Kibana, sometimes its after hours. Regardless, its always easiest to just close the kibana tab _immediately_ after using it if you aren't going to continue otherwise this error message _will_ appear.

---

<div class="post-metadata">

**Author:** ![jderieg](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@jderieg](https://discuss.elastic.co/u/jderieg)\
**Post date:** [December 16, 2015, 3:48pm UTC](https://discuss.elastic.co/t/bug-cookies-are-invalidated-after-some-time/34252/6 "2015-12-16T15:48:17Z")

</div>

I get this exact error as well. If I delete the cookie, it reappears after I search or click a couple times in Kibana. It only happens in Chrome. Never happens in Firefox, Safari, Opera. Haven't tried on IE or Edge.

---

<div class="post-metadata">

**Author:** ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)\
**Post date:** [December 18, 2015, 5:27pm UTC](https://discuss.elastic.co/t/bug-cookies-are-invalidated-after-some-time/34252/7 "2015-12-18T17:27:48Z")

</div>

A fix was pushed for this in the 4.3.1 and 4.2.2 releases. For reference, the GitHub issue used to track this was [https://github.com/elastic/kibana/issues/5436](https://github.com/elastic/kibana/issues/5436).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:06pm UTC](https://discuss.elastic.co/t/bug-cookies-are-invalidated-after-some-time/34252/8 "2017-07-06T14:06:16Z")

</div>


