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

removeFromRecentlyOpened Command Broken #58131

Closed
daytonellwanger opened this issue Sep 7, 2018 · 8 comments
Closed

removeFromRecentlyOpened Command Broken #58131

daytonellwanger opened this issue Sep 7, 2018 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded

Comments

@daytonellwanger
Copy link

VSCode Version: 1.27.1-Insiders
OS Version: Win10

Steps to Reproduce:

  1. Create an extension that uses the removeFromRecentlyOpened command (e.g. vscode.commands.executeCommand('vscode.removeFromRecentlyOpened', 'somePath'))
  2. Run the extension

EXPECTED:
Path is removed from list of recently opened files.

ACTUAL:
Command fails with [UriError]: Scheme contains illegal characters.

The stack shows the error is coming from electron:

Error: [UriError]: Scheme contains illegal characters."
1:"    at C:\Program Files\Microsoft VS Code Insiders\resources\app\out\vs\code\electron-main\main.js:59:35"
2:"    at t.e (C:\Program Files\Microsoft VS Code Insiders\resources\app\out\vs\code\electron-main\main.js:59:461)"
3:"    at new t (C:\Program Files\Microsoft VS Code Insiders\resources\app\out\vs\code\electron-main\main.js:60:990)"
4:"    at Function.e.revive (C:\Program Files\Microsoft VS Code Insiders\resources\app\out\vs\code\electron-main\main.js:60:845)"
5:"    at C:\Program Files\Microsoft VS Code Insiders\resources\app\out\vs\code\electron-main\main.js:353:512"
6:"    at Array.map (<anonymous>)"
7:"    at e.call (C:\Program Files\Microsoft VS Code Insiders\resources\app\out\vs\code\electron-main\main.js:353:450)"
8:"    at e.onPromise (C:\Program Files\Microsoft VS Code Insiders\resources\app\out\vs\code\electron-main\main.js:162:803)"
9:"    at e.onRequest (C:\Program Files\Microsoft VS Code Insiders\resources\app\out\vs\code\electron-main\main.js:163:968)"
10:"    at e.onRawMessage (C:\Program Files\Microsoft VS Code Insiders\resources\app\out\vs\code\electron-main\main.js:163:885)"

More info:
I've tried passing in strings that have the path formatted in various ways, and am pretty confident they are valid URIs. Additionally, this is a regression. I can run the same extension, use the same argument to the command, on VS Code 1.26.1 (Stable) and have the expected result.

@vscodebot vscodebot bot added the insiders label Sep 7, 2018
@jrieken jrieken assigned bpasero and unassigned jrieken Sep 7, 2018
@bpasero bpasero assigned aeschli and sandy081 and unassigned bpasero Sep 7, 2018
@bpasero
Copy link
Member

bpasero commented Sep 7, 2018

Arguable a candidate if this is a regression.

@aeschli aeschli added this to the August Recovery 2018 milestone Sep 10, 2018
@sandy081 sandy081 assigned sandy081 and unassigned sandy081 Sep 11, 2018
@sandy081
Copy link
Member

file-uri changes went into 1.27

@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release labels Sep 11, 2018
@aeschli
Copy link
Contributor

aeschli commented Sep 11, 2018

@daytonellwanger Do you remember what the path was?

@daytonellwanger
Copy link
Author

@aeschli looks like you've the issue resolved. Let me know if I can provide further information. I'll verify the fix once it ships.

@jrieken jrieken added the verified Verification succeeded label Sep 12, 2018
@daytonellwanger
Copy link
Author

I just tested this with today's build
(Version: 1.28.0-insider (system setup)
Commit: 7fcd81c
Date: 2018-09-17T09:37:55.086Z
Electron: 2.0.9
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64)
and am still seeing this issue.
Here's the path I was passing as the argument: C:\Users\daellwan\AppData\Local\Temp\tmp-4CFE9B9A2EED67B43699F7C3340FDD091F7E\Visual Studio Live Share.code-workspace

@daytonellwanger
Copy link
Author

Here's how I'm invoking the command and seeing this error:

try {
    await vscode.commands.executeCommand('vscode.removeFromRecentlyOpened', currentWorkspacePath);
} catch (e) {
    debugger;
}

@bpasero
Copy link
Member

bpasero commented Sep 18, 2018

I see this when running vscode.commands.executeCommand('vscode.removeFromRecentlyOpened', 'C:\\Users\\daellwan\\AppData\\Local\\Temp\\tmp-4CFE9B9A2EED67B43699F7C3340FDD091F7E\\Visual Studio Live Share.code-workspace');
on Windows:

image

@bpasero bpasero reopened this Sep 18, 2018
@bpasero bpasero removed candidate Issue identified as probable candidate for fixing in the next release verified Verification succeeded labels Sep 18, 2018
@mjbvz mjbvz added the verified Verification succeeded label Sep 26, 2018
chrmarti added a commit that referenced this issue Oct 11, 2018
@chrmarti chrmarti mentioned this issue Oct 11, 2018
chrmarti added a commit that referenced this issue Oct 11, 2018
chrmarti added a commit that referenced this issue Oct 12, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

7 participants