fix: use snap-accessible profile directory for snap-installed browsers#195
Merged
Merged
Conversation
On Ubuntu (and other distros), Chromium is often installed as a Snap package with AppArmor confinement. Snap apps can only write to ~/snap/<snap-name>/common/, so launching Chromium with --user-data-dir=~/.notebooklm-mcp-cli/ fails with exit code 21 (ProcessSingleton error). Changes: - Return full path from shutil.which() instead of just executable name (required for snap detection) - Detect snap browsers via /snap/ in resolved binary path - Use ~/snap/chromium/common/notebooklm-mcp-cli/chrome-profiles/ as profile directory for snap browsers - Update profile lock, headless auth, and cache cleanup to be snap-aware
Owner
|
Hey Daniele, thanks for submitting the PR! It's been merged and will be included in the next release. Appreciate the contribution, bro! |
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
On Ubuntu (and other distros), Chromium is often installed as a Snap package with AppArmor confinement. Snap apps can only write to
~/snap/<snap-name>/common/, so launching Chromium with--user-data-dir=~/.notebooklm-mcp-cli/fails with:Solution
/snap/in resolved binary path~/snap/chromium/common/notebooklm-mcp-cli/chrome-profiles/as profile directory for snap browsersshutil.which()(required for snap detection)Changes
src/notebooklm_tools/utils/cdp.pysrc/notebooklm_tools/utils/config.pyget_snap_chrome_profile_dir()functiontests/test_auth_migration.pyTesting
nlm login --chromeworks with snap Chromium on Ubuntu 25.10