question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid cookie causes crash.

See original GitHub issue

異常なCookieが紛れ込むとojが使えなくなります。 私が確認したのは以下のような、versionがNoneのcookieです。 このようなCookieが現れた時、cookieを消せばいいですが、そのようなメッセージを発した方がいいかもしれません。

Set-Cookie3: mc="XXXXXX"; path="/"; domain=".quantserve.com"; path_spec; domain_dot; expires="2020-09-08 14:39:56Z"; HttpOnly=False; version=None
  File "/usr/lib/python3.5/contextlib.py", line 59, in __enter__
    return next(self.gen)
  File "/home/ryo/workspace/github/online-judge-tools/onlinejudge/_implementation/utils.py", line 101, in with_cookiejar
    session.cookies.load()  # type: ignore
  File "/usr/lib/python3.5/http/cookiejar.py", line 1784, in load
    self._really_load(f, filename, ignore_discard, ignore_expires)
  File "/usr/lib/python3.5/http/cookiejar.py", line 1959, in _really_load
    (filename, line))
http.cookiejar.LoadError: invalid Set-Cookie3 format file '/home/ryo/.local/share/online-judge-tools/cookie.jar':

ただし、発生条件がよくわからないです。私の使い方が特殊なせいかもしれません。私以外の人は起きてなさそうなので、、 競プロIDEは付属のブラウザでめぐったサイトのセッション情報をojのcookieに書き込むことで、ブラウザでのログイン情報を使ってojでもログイン済とするようなことをやっていて、その中でwith_cookiejarを叩いており変なCookieを保存してしまったかもしれません。 dispatchが成功するサイトでのみcookieを保存などはやっていますので、あらゆるサイトの情報が集まるわけではないのですが。

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
fukatanicommented, Nov 16, 2019

私がojをmutexなしで複数プロセスで叩いていたのが原因のようです。。一旦クローズします。

0reactions
fukatanicommented, Nov 19, 2019

うーん、正確にはCookie周りのエラーが複数種類起きてたんですが、たしかにversion=Noneは再現しませんでした。だから排他制御が原因かわかりません。 他のエラーというのはcookieに書き込んだ瞬間に別のプロセスでは読みこもうとして、その瞬間は正常なcookieファイルじゃないから読めないというエラーでした。

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid cookies crash Cypress · Issue #962 - GitHub
When a server responds with an invalid Set-Cookie header (e.g. containing a unicode character) then Cypress crashes.
Read more >
Constantly updating cookie causes browser crash
The next day, the browser is always sluggish and frequently crashes. After some investigation, I'm convinced it's caused by a cookie being updated...
Read more >
37426 - [Content Settings] Chrome crashes when ... - Monorail
Issue 37426: [Content Settings] Chrome crashes when setting prompt for cookies/data ; extension 2. Set "Content Settings"->"Cookies"->"Ask me when a site tries ...
Read more >
Fix "Aw, Snap!" page crashes and other page loading errors
In the Incognito tab, try loading the page. If it loads, clear your cache and cookies. Clear your cache and cookies. Tap More...
Read more >
Common Error Messages - Sauce Labs Documentation
For example, if the error regularly appears after a specific Selenium command, there could be something wrong with the test that is causing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found