vsmejkal / chrome-workspaces

Tab management Chrome extension
MIT License
51 stars 16 forks source link

file:// stops entire workspace from opening #29

Closed behinddesign closed 5 months ago

behinddesign commented 8 months ago

File stops entire workspace from opening. Probably due to the lack of file permissions granted to the application.

Submitted pull request to at least allow the entire group to open, otherwise all tabs are lost with no way to recover.

Solution to this is to request file permissions, but this might not be to everyone's taste.

bcsj commented 7 months ago

Nice to see this addressed, funnily enough I actually ran into this exact same issue a month ago.

For anyone else who runs into the issue, rest assured, all is not lost, the tabs are in fact recoverable, here is how:

  1. Click the workspace extension to open the menu where you would select the workspace.
  2. Right click and choose to inspect in the drop-down, you will get the chrome dev-tools opened like on any other website. (Note that you have to keep the extension's menu open, if you close it the dev-tools close too)
  3. Go to the Console tab.
  4. Type chrome.storage.local.get("workspaceList"), you might have to wait for the Promise to return data to you, but it won't visually confirm this, so just wait a few sec and browse the object.
  5. Promise will contain PromiseResult which has the array workspaceList with all you workspace IDs.
  6. You can't see the names of the workspaces, only their hash-ID. I think the workspaces are in the same order as in the extension's dropdown menu though, so should be easy to count yourself to the one you were having trouble to open.
  7. Just grap the workspace_qw3uh1rh (or whatever yours is called) and type chrome.storage.local.get("workspace_qw3uh1rh") into the console and wait for a new Promise.
  8. In the PromiseResult you will find workspace_qw3uh1rh which has a tabs array with all your lost tabs.

Hope that helped somebody.

BasicallyPolaris commented 5 months ago

When using the chrome extension as unpacked extension in developer mode this error does not occur, unless the current branch I am working on already has a fix, it however is not the fix from @behinddesign, as the tabs don't get removed on load

vsmejkal commented 5 months ago

I've been studying this issue and it seems to be introduced by local file access restriction in Chrome 118. Navigation to file URLs was disabled for all extensions, unless the “Allow access to file URLs” option is enabled on the extension’s details page.

I pushed the fix that shows popup when a user navigates to file URL without having “Allow access to file URLs” option enabled.

More details if interested: