ShardBrowser icon indicating copy to clipboard operation
ShardBrowser copied to clipboard

[Bug] macOS profile deletion appears to leave browser cache behind

Open formilw opened this issue 1 month ago • 1 comments

What happened

On macOS, ShardX appears to leave per-profile browser cache behind after profiles are deleted.

I currently have 25 profiles in the launcher, but found more than 90 UUID-named directories under:

~/Library/Caches/shardx-launcher/user-data/

The parent ~/Library/Caches/shardx-launcher directory occupied 5.62 GB. That is the total cache size, not a measurement of orphaned cache alone.

I manually cleared the ShardX cache and checked the remaining profiles. They still worked and their website logins remained intact. I did not delete the persistent profile data under ~/Library/Application Support/shardx-launcher.

The extra directories look like cache left from previously deleted profiles. I did not match every directory against the current profile IDs before clearing it, so I cannot say that every extra directory was orphaned.

Environment

  • macOS; exact OS and launcher versions were not recorded when I found the cache.
  • ShardX Launcher with 25 profiles remaining.

Steps to check

  1. On macOS with the default data location, create a profile and browse enough pages to populate its cache.
  2. Close the browser and locate its directory under ~/Library/Caches/shardx-launcher/user-data/.
  3. Delete the profile through the launcher.
  4. Check whether its corresponding cache directory is removed. If deletion retains the profile in Trash, also check after permanent deletion or expiry.
  5. Repeat with several profiles and compare the remaining cache directories with the profiles still present.

These are suggested reproduction steps; my observation was the accumulated directories described above, not a controlled before/after test of one profile deletion.

Expected behavior

Deleting a profile should also clean up its separate macOS browser cache, at least once the profile is permanently deleted. Cache for profiles that still exist should remain untouched.

Possible cause

In the current source, profile::delete() removes the profile configuration and store::user_data_root().join(id), but does not explicitly remove the separate macOS cache directory. The Trash path calls this same function.

Chromium documents that macOS profiles under Library/Application Support use a corresponding cache path under Library/Caches. Removing only the persistent user-data directory therefore appears to leave that separate cache behind. This is a likely explanation, not a confirmed reproduction on the current source revision.

Could profile deletion also remove the matching macOS cache? A way to review and clean up cache already left by deleted profiles would help too. A regression check should cover deletion and Trash expiry while preserving another profile's cache and persistent data.

formilw avatar Oct 25 '26 09:10 formilw

in v2.1.3

ProxyShard avatar Nov 04 '26 14:11 ProxyShard