Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty IPFS cache missing from Delete browsing data dialog #13302

Closed
da2x opened this issue Dec 27, 2020 · 6 comments · Fixed by brave/brave-core#7578
Closed

Empty IPFS cache missing from Delete browsing data dialog #13302

da2x opened this issue Dec 27, 2020 · 6 comments · Fixed by brave/brave-core#7578

Comments

@da2x
Copy link

da2x commented Dec 27, 2020

Steps to Reproduce

  1. Browse some ipfs://hashes
  2. Go to brave://settings/clearBrowserData
  3. Delete the browsing cache using the dioalog.

Expected result:

It should garbage collect the IPFS repository. More details.

Actual result:

IPFS data remains in the IPFS repo/cache on disk.

Reproduces how often:

Every time.

Brave version (brave://version info)

1.19.67

Version/Channel Information:

Beta only.

Other Additional Information:

Issuing a call to run the IPFS garbage collector should do the trick.

@diracdeltas
Copy link
Member

this is a great idea; cc @yrliou

@pes10k pes10k added the priority/P2 A bad problem. We might uplift this to the next planned release. label Jan 5, 2021
@diracdeltas
Copy link
Member

diracdeltas commented Jan 11, 2021

should this be an extra switch or just be cleared whenever the user selects clear cache? i slightly prefer the latter.

@da2x
Copy link
Author

da2x commented Jan 11, 2021

I can’t see any reason to make it a separate option. However, it might be good to change the string to say something like "Clear browsing and IPFS caches," but only when IPFS is enabled.

@yrliou yrliou self-assigned this Jan 11, 2021
@yrliou
Copy link
Member

yrliou commented Jan 13, 2021

Screen Shot 2021-01-12 at 4 23 10 PM

Note that these options chromium support could be deleted for a specific time range, but it is not something ipfs repo gc command supports, I think for now we'll just run ipfs repo gc when Cached images and files option is selected which will purge the whole cache expect for pinned files and won't support time-ranged deletion.

@yrliou
Copy link
Member

yrliou commented Jan 14, 2021

Test plan specified in brave/brave-core#7578

@kjozwiak
Copy link
Member

kjozwiak commented Jan 19, 2021

Verification PASSED on macOS 11.1 x64 using the following build:

Brave | 1.19.85 Chromium: 88.0.4324.89 (Official Build) (x86_64)
--- | ---
Revision | 4534be84786f5269fb52e9bf82643af61e2fedaf-refs/branch-heads/4324@{#1721}
OS | macOS Version 11.1 (Build 20C69)
kjozwiak@Kamils-MacBook-Pro 1.0.3 % ./go-ipfs_v0.7.0_darwin-amd64 --api=/ip4/127.0.0.1/tcp/45005 repo stat
NumObjects: 28
RepoSize:   53568
StorageMax: 1000000000
RepoPath:   /Users/kjozwiak/Library/Application Support/BraveSoftware/Brave-Browser/brave_ipfs
Version:    fs-repo@10
  • opened ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/wiki/Vincent_van_Gogh.html and waited till the entire website loaded
kjozwiak@Kamils-MacBook-Pro 1.0.3 % ./go-ipfs_v0.7.0_darwin-amd64 --api=/ip4/127.0.0.1/tcp/45005 repo stat
NumObjects: 348
RepoSize:   3493272
StorageMax: 1000000000
RepoPath:   /Users/kjozwiak/Library/Application Support/BraveSoftware/Brave-Browser/brave_ipfs
Version:    fs-repo@10
  • cleared data via brave://settings/clearBrowserData and ensured that Cached images and files was not selected

Screen Shot 2021-01-18 at 5 25 09 PM

kjozwiak@Kamils-MacBook-Pro 1.0.3 % ./go-ipfs_v0.7.0_darwin-amd64 --api=/ip4/127.0.0.1/tcp/45005 repo stat
NumObjects: 348
RepoSize:   3493272
StorageMax: 1000000000
RepoPath:   /Users/kjozwiak/Library/Application Support/BraveSoftware/Brave-Browser/brave_ipfs
Version:    fs-repo@10
  • cleared data via brave://settings/clearBrowserData and ensured that Cached images and files was selected this time around

Screen Shot 2021-01-18 at 5 25 14 PM

kjozwiak@Kamils-MacBook-Pro 1.0.3 % ./go-ipfs_v0.7.0_darwin-amd64 --api=/ip4/127.0.0.1/tcp/45005 repo stat
NumObjects: 13
RepoSize:   60667
StorageMax: 1000000000
RepoPath:   /Users/kjozwiak/Library/Application Support/BraveSoftware/Brave-Browser/brave_ipfs
Version:    fs-repo@10
  • opened ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/wiki/Vincent_van_Gogh.html and waited till the entire website loaded
kjozwiak@Kamils-MacBook-Pro 1.0.3 % ./go-ipfs_v0.7.0_darwin-amd64 --api=/ip4/127.0.0.1/tcp/45005 repo stat
NumObjects: 329
RepoSize:   3442996
StorageMax: 1000000000
RepoPath:   /Users/kjozwiak/Library/Application Support/BraveSoftware/Brave-Browser/brave_ipfs
Version:    fs-repo@10
  • went into brave://settings/clearBrowserData and selecting Cached images and files under the On Exit tab
  • closed the browser and waiting ~20s
  • re-launched the browser
  • went into brave://ipfs and loaded the local node by selecting Start
  • waited till the node connected to several peers

Screen Shot 2021-01-18 at 5 27 29 PM

kjozwiak@Kamils-MacBook-Pro 1.0.3 % ./go-ipfs_v0.7.0_darwin-amd64 --api=/ip4/127.0.0.1/tcp/45005 repo stat
NumObjects: 13
RepoSize:   70273
StorageMax: 1000000000
RepoPath:   /Users/kjozwiak/Library/Application Support/BraveSoftware/Brave-Browser/brave_ipfs
Version:    fs-repo@10

Verification passed on

Brave 1.19.85 Chromium: 88.0.4324.89 (Official Build) (64-bit)
Revision 4534be84786f5269fb52e9bf82643af61e2fedaf-refs/branch-heads/4324@{#1721}
OS Ubuntu 18.04 LTS
bartlomiej@bartlomiej-VirtualBox:~/.config/BraveSoftware/Brave-Browser/oecghfpdmkjlhnfpmmjegjacfimiafjp/1.0.3$ ./go-ipfs_v0.7.0_linux-amd64 --api=/ip4/127.0.0.1/tcp/45005 repo stat
NumObjects: 28
RepoSize:   178771
StorageMax: 1000000000
RepoPath:   /home/bartlomiej/.config/BraveSoftware/Brave-Browser/brave_ipfs

  • opened ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/wiki/Vincent_van_Gogh.html and waited till the entire website loaded
bartlomiej@bartlomiej-VirtualBox:~/.config/BraveSoftware/Brave-Browser/oecghfpdmkjlhnfpmmjegjacfimiafjp/1.0.3$ ./go-ipfs_v0.7.0_linux-amd64 --api=/ip4/127.0.0.1/tcp/45005 repo stat
NumObjects: 49
RepoSize:   1109311
StorageMax: 1000000000
RepoPath:   /home/bartlomiej/.config/BraveSoftware/Brave-Browser/brave_ipfs
Version:    fs-repo@10
  • cleared data via brave://settings/clearBrowserData and ensured that Cached images and files was not selected
    image

Ipfs data was not deleted

bartlomiej@bartlomiej-VirtualBox:~/.config/BraveSoftware/Brave-Browser/oecghfpdmkjlhnfpmmjegjacfimiafjp/1.0.3$ ./go-ipfs_v0.7.0_linux-amd64 --api=/ip4/127.0.0.1/tcp/45005 repo stat
NumObjects: 49
RepoSize:   1109311
StorageMax: 1000000000
RepoPath:   /home/bartlomiej/.config/BraveSoftware/Brave-Browser/brave_ipfs
Version:    fs-repo@10
  • cleared data via brave://settings/clearBrowserData and ensured that Cached images and files was selected this time around
    image
bartlomiej@bartlomiej-VirtualBox:~/.config/BraveSoftware/Brave-Browser/oecghfpdmkjlhnfpmmjegjacfimiafjp/1.0.3$ ./go-ipfs_v0.7.0_linux-amd64 --api=/ip4/127.0.0.1/tcp/45005 repo stat
NumObjects: 13
RepoSize:   254742
StorageMax: 1000000000
RepoPath:   /home/bartlomiej/.config/BraveSoftware/Brave-Browser/brave_ipfs
Version:    fs-repo@10
  • opened ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/wiki/Vincent_van_Gogh.html and waited till the entire website loaded
bartlomiej@bartlomiej-VirtualBox:~/.config/BraveSoftware/Brave-Browser/oecghfpdmkjlhnfpmmjegjacfimiafjp/1.0.3$ ./go-ipfs_v0.7.0_linux-amd64 --api=/ip4/127.0.0.1/tcp/45005 repo stat
NumObjects: 326
RepoSize:   4601493
StorageMax: 1000000000
RepoPath:   /home/bartlomiej/.config/BraveSoftware/Brave-Browser/brave_ipfs
Version:    fs-repo@10
  • went into brave://settings/clearBrowserData and selecting Cached images and files under the On Exit tab
  • closed the browser and waiting ~20s
  • re-launched the browser
  • went into brave://ipfs and loaded the local node by selecting Start
  • waited till the node connected to several peers

image

bartlomiej@bartlomiej-VirtualBox:~/.config/BraveSoftware/Brave-Browser/oecghfpdmkjlhnfpmmjegjacfimiafjp/1.0.3$ ./go-ipfs_v0.7.0_linux-amd64 --api=/ip4/127.0.0.1/tcp/45005 repo stat
NumObjects: 13
RepoSize:   1243533
StorageMax: 1000000000
RepoPath:   /home/bartlomiej/.config/BraveSoftware/Brave-Browser/brave_ipfs
Version:    fs-repo@10

Verification PASSED on Win 10 x64 using the following build:

Brave | 1.19.86 Chromium: 88.0.4324.96 (Official Build) (64-bit)
-- | --
Revision | 68dba2d8a0b149a1d3afac56fa74648032bcf46b-refs/branch-heads/4324@{#1784}
OS | Windows 10 OS Version 2009 (Build 19042.746)
C:\Users\kamil\AppData\Local\BraveSoftware\Brave-Browser\User Data\lnbclahgobmjphilkalbhebakmblnbij\1.0.3
λ go-ipfs_v0.7.0_windows-amd64 --api=/ip4/127.0.0.1/tcp/45005 repo stat
NumObjects: 28
RepoSize:   55836
StorageMax: 1000000000
RepoPath:   C:\Users\kamil\AppData\Local\BraveSoftware\Brave-Browser\User Data\brave_ipfs
Version:    fs-repo@10
  • opened ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/wiki/Vincent_van_Gogh.html and waited till the entire website loaded
C:\Users\kamil\AppData\Local\BraveSoftware\Brave-Browser\User Data\lnbclahgobmjphilkalbhebakmblnbij\1.0.3
λ go-ipfs_v0.7.0_windows-amd64 --api=/ip4/127.0.0.1/tcp/45005 repo stat
NumObjects: 344
RepoSize:   3437479
StorageMax: 1000000000
RepoPath:   C:\Users\kamil\AppData\Local\BraveSoftware\Brave-Browser\User Data\brave_ipfs
Version:    fs-repo@10
  • cleared data via brave://settings/clearBrowserData and ensured that Cached images and files was not selected

image

C:\Users\kamil\AppData\Local\BraveSoftware\Brave-Browser\User Data\lnbclahgobmjphilkalbhebakmblnbij\1.0.3
λ go-ipfs_v0.7.0_windows-amd64 --api=/ip4/127.0.0.1/tcp/45005 repo stat
NumObjects: 344
RepoSize:   3437479
StorageMax: 1000000000
RepoPath:   C:\Users\kamil\AppData\Local\BraveSoftware\Brave-Browser\User Data\brave_ipfs
Version:    fs-repo@10
  • cleared data via brave://settings/clearBrowserData and ensured that Cached images and files was selected this time around

image

C:\Users\kamil\AppData\Local\BraveSoftware\Brave-Browser\User Data\lnbclahgobmjphilkalbhebakmblnbij\1.0.3
λ go-ipfs_v0.7.0_windows-amd64 --api=/ip4/127.0.0.1/tcp/45005 repo stat
NumObjects: 13
RepoSize:   45791
StorageMax: 1000000000
RepoPath:   C:\Users\kamil\AppData\Local\BraveSoftware\Brave-Browser\User Data\brave_ipfs
Version:    fs-repo@10
  • opened ipfs://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq/wiki/Vincent_van_Gogh.html and waited till the entire website loaded
C:\Users\kamil\AppData\Local\BraveSoftware\Brave-Browser\User Data\lnbclahgobmjphilkalbhebakmblnbij\1.0.3
λ go-ipfs_v0.7.0_windows-amd64 --api=/ip4/127.0.0.1/tcp/45005 repo stat
NumObjects: 329
RepoSize:   3424858
StorageMax: 1000000000
RepoPath:   C:\Users\kamil\AppData\Local\BraveSoftware\Brave-Browser\User Data\brave_ipfs
Version:    fs-repo@10
  • went into brave://settings/clearBrowserData and selecting Cached images and files under the On Exit tab
  • closed the browser and waiting ~20s
  • re-launched the browser
  • went into brave://ipfs and loaded the local node by selecting Start
  • waited till the node connected to several peers

image

C:\Users\kamil\AppData\Local\BraveSoftware\Brave-Browser\User Data\lnbclahgobmjphilkalbhebakmblnbij\1.0.3
λ go-ipfs_v0.7.0_windows-amd64 --api=/ip4/127.0.0.1/tcp/45005 repo stat
NumObjects: 13
RepoSize:   77817
StorageMax: 1000000000
RepoPath:   C:\Users\kamil\AppData\Local\BraveSoftware\Brave-Browser\User Data\brave_ipfs
Version:    fs-repo@10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants