gh image check-token says "no session token found" for a Firefox that's logged in. The user_session cookie was in cookies.sqlite-wal, not cookies.sqlite, because Firefox hadn't checkpointed yet.
Not a gh-image bug. kooky reads through browserutils/sqlite3, which never opens the -wal file, so every Chromium and Firefox store reads as of its last checkpoint. On a browser that's been open a while, that can hide hours of writes.
Fix is upstream in browserutils/sqlite3#1. Once it lands, kooky needs a dependency bump and gh-image needs a kooky bump. I built gh-image against the patch and check-token returns Token is valid (source: browser cookies) with nothing else changed.
Easy to misfile as a browser-detection problem, since it looks the same. The tell: cookies.sqlite-wal is non-empty, and user_session is missing from the main file while the browser is clearly signed in. Copy the db without its -wal to check, since the sqlite3 CLI reads the log and will show you the cookie.
Workaround: copy cookies.sqlite and cookies.sqlite-wal together somewhere, read user_session from the copy, and pass it as GH_SESSION_TOKEN.
gh image check-tokensays "no session token found" for a Firefox that's logged in. Theuser_sessioncookie was incookies.sqlite-wal, notcookies.sqlite, because Firefox hadn't checkpointed yet.Not a gh-image bug. kooky reads through
browserutils/sqlite3, which never opens the-walfile, so every Chromium and Firefox store reads as of its last checkpoint. On a browser that's been open a while, that can hide hours of writes.Fix is upstream in browserutils/sqlite3#1. Once it lands, kooky needs a dependency bump and gh-image needs a kooky bump. I built gh-image against the patch and
check-tokenreturnsToken is valid (source: browser cookies)with nothing else changed.Easy to misfile as a browser-detection problem, since it looks the same. The tell:
cookies.sqlite-walis non-empty, anduser_sessionis missing from the main file while the browser is clearly signed in. Copy the db without its-walto check, since the sqlite3 CLI reads the log and will show you the cookie.Workaround: copy
cookies.sqliteandcookies.sqlite-waltogether somewhere, readuser_sessionfrom the copy, and pass it asGH_SESSION_TOKEN.