Repository navigation
Conversation
browser_cookie3.chromium was missing from both extraction paths, so `rdt login` failed with "No Reddit cookies found" on systems whose browser is Chromium rather than Chrome — the default on Arch, Omarchy and other distros — even with a valid logged-in session. The subprocess path also broke on the first browser that returned *any* cookie, so a browser holding only tracking cookies (csv, edgebucket) shadowed the one that actually had reddit_session; the caller then rejected the result and reported "no cookies found". It now breaks on REQUIRED_COOKIES, matching _extract_direct. Net -3 lines: the accumulate-then-check dance is gone, and `import browser_cookie3 as bc` keeps the longer browser list on one line.
ozanboz
force-pushed
the
fix/chromium-cookie-extraction
branch
from
September 10, 2026 22:25
746c832 to
9ab71b7
Compare
caioniehues
added a commit
to caioniehues/rdt-cli
that referenced
this pull request
Nov 28, 2026
Auth - Find Reddit cookies in every profile of Firefox/LibreWolf (including the XDG ~/.config/mozilla/firefox location of Firefox 147+, snap, flatpak) and Chrome/Chromium/Brave/Edge/Vivaldi. Firefox DBs are read from a copy that includes the -wal file, so fresh logins are seen and the browser lock is avoided. Only logged-in sessions count (reddit_session, or a token_v2 JWT with sub=user); anonymous jars are skipped. Drops the uv subprocess path. Covers upstream jackwener#9, jackwener#16, jackwener#23. - RDT_COOKIE / RDT_SESSION / RDT_MODHASH env auth; public commands no longer extract browser cookies on their own (upstream jackwener#17). - rdt login reports the source and no longer claims "already authenticated" after silently extracting. Upstream fixes - search falls back to api.reddit.com when search.json is 403 (jackwener#27, jackwener#28). - comment sends api_type/thing_id/text and raises on json.errors (jackwener#14). Reading posts - read/upvote/save/comment accept reddit.com and redd.it post URLs. - read/show --markdown: post + full comment tree as Markdown; --article appends the linked page of link posts via the defuddle CLI. - morechildren requests are batched at 100 IDs (was 414 URI Too Long); when Reddit blocks the API (403), --expand-more warns and keeps loaded comments. - Error codes are no longer swallowed as Rich markup. Tests - Unit tests no longer write to the real ~/.config/rdt-cli. - New tests for browser discovery, env auth, Markdown, URL parsing, batching.
ticoAg
added a commit
to ticoAg/rdt-cli
that referenced
this pull request
Nov 28, 2026
…hromium fallback)
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
rdt loginreports "No Reddit cookies found" on a machine that is logged intoreddit.com, because the browser is Chromium, not Chrome.
browser_cookie3.chromiumis a separate entry point (
~/.config/chromiumvs~/.config/google-chrome) and it wasmissing from both extraction paths. Chromium is the packaged default on Arch, Omarchy
and other distros, so the login flow is unusable there.
Second bug in the same code:
_extract_subprocessbroke on the first browser thatreturned any cookie, so a browser holding only tracking cookies (
csv,edgebucket)shadowed the one that actually had
reddit_session— the caller then rejected the jarvia
REQUIRED_COOKIESand reported "no cookies found" while a valid session sat in thenext browser on the list. It now breaks on
REQUIRED_COOKIES, same as_extract_direct.Change
Net -3 lines. Adding
chromiummade the browser lists exceed the 120-char rufflimit, so
import browser_cookie3 as bckeeps them on one line instead of wrappingthem; the subprocess script's accumulate-then-check dance collapses into breaking on
the required cookie, and
requiredis derived fromREQUIRED_COOKIESrather thanduplicating the rule.
Verification
Arch/Omarchy, Chromium 152,
--password-store=gnome-libsecret:Authenticated response (
modhashreturned), so it is a real logged-in session.No new dependency:
chromiumships in thebrowser-cookie3package already in use.