vscode-extensions-profiles icon indicating copy to clipboard operation
vscode-extensions-profiles copied to clipboard

The extension does not work with WSL

Open 8naf opened this issue 4 years ago • 7 comments

OS: Window 10

This extension does not work with Remote - WSL extension. Running any command returns an error:

[exthost] [error] Error: SQLITE_CANTOPEN: unable to open database file vscode-extension-profiles.Create {"value":"evald24.vscode-extension-profiles","_lower":"evald24.vscode-extension-profiles"}

After reading your source code, I realized the problem is here: https://github.com/evald24/vscode-extensions-profiles/blob/b415251dd0c3145ff382548c0da9f455fb8e6ca7/src/storage.ts#L11-L15 https://github.com/evald24/vscode-extensions-profiles/blob/b415251dd0c3145ff382548c0da9f455fb8e6ca7/src/utils.ts#L56-L61 https://github.com/evald24/vscode-extensions-profiles/blob/b415251dd0c3145ff382548c0da9f455fb8e6ca7/src/utils.ts#L15-L25

When using WSL, the process.platform is linux, but the VS Code path is ${process.env.APPDATA}\\Code, resulting in the state.vscdb file does not exist.

8naf avatar Dec 27 '21 14:12 8naf

I found this package, it can help you check if you are in WSL or not.

8naf avatar Dec 27 '21 15:12 8naf

I suggest you to use vscode.ExtensionContext.globalState, storagePath or globalStoragePath instead of the current approach. I read it here.

I have no experience in creating VS code extensions so I can only give you the information I find 😁.

8naf avatar Dec 27 '21 16:12 8naf

English is not my native language, so the sentences will be confusing, sorry for that 😁.

8naf avatar Dec 27 '21 16:12 8naf

@8NAF Thank you for issue, I will think about it tomorrow)

evald24 avatar Dec 28 '21 15:12 evald24

@8NAF Hi! Minor update 1.1.0 was released, which added support for multilingual extensions.

In order for the extension to display normally, you need to delete and re-add it.

Please give feedback =)

evald24 avatar Jan 07 '22 08:01 evald24

@evald24 Hi, the extension is still not working, I got a new error:

[error] Error: SQLITE_ERROR: no such table: ItemTable vscode-extension-profiles.Create {"value":"evald24.vscode-extension-profiles","_lower":"evald24.vscode-extension-profiles"}

8naf avatar Jan 07 '22 10:01 8naf

I just encountered the exact same issue. Running the extension from the WSL filesystem does not work.

cassis163 avatar May 14 '22 09:05 cassis163