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

Error launching vscode when a # exists in the path #56691

Closed
artbycrunk opened this issue Aug 17, 2018 · 8 comments

Comments

@artbycrunk
Copy link

commented Aug 17, 2018

  • VSCode Version: 1.26.1
  • OS Version: Ubuntu 16.04 / Centos 7.3

Steps to Reproduce:

  1. Change the VScode folder to contain a # like VSCode-linux-x64#1.26
  2. Run code from VSCode-linux-x64#1.26/bin/code
osboxes@osboxes:~/editors/VSCode-linux-x64#1.26/bin$ ./code --disable-extensions
The factory method of "vs/platform/node/package" has thrown an exception
{ Error: Cannot find module '/home/osboxes/editors/package.json'
    at Function.Module._resolveFilename (module.js:543:15)
    at Function.Module._load (module.js:473:25)
    at Module.require (module.js:586:17)
    at require (internal/module.js:11:18)
    at Function.i [as __$__nodeRequire] (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:30:770)
    at Object.<anonymous> (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/code/node/cli.js:111:643)
    at Function.t._safeInvokeFunction (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:19:248)
    at Function.t._invokeFactory (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:19:495)
    at t.complete (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:19:732)
    at s._onModuleComplete (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:30:25)
    at s._onModuleComplete (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:30:269)
    at s._resolve (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:29:599)
    at s.defineModule (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:23:862)
    at s._onLoad (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:25:611)
    at Object.callback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:27:890)
    at e.triggerCallback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:810)
    at /home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:616
    at t.load (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:16:146)
    at e.load (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:587)
    at i (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:27:808)
    at Object.errorback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:27:929)
    at e.triggerErrorback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:952)
    at /home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:657
    at ReadFileContext.callback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:16:267)
    at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:420:13) code: 'MODULE_NOT_FOUND' }
Error: Cannot find module '/home/osboxes/editors/package.json'
    at Function.Module._resolveFilename (module.js:543:15)
    at Function.Module._load (module.js:473:25)
    at Module.require (module.js:586:17)
    at require (internal/module.js:11:18)
    at Function.i [as __$__nodeRequire] (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:30:770)
    at Object.<anonymous> (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/code/node/cli.js:111:643)
    at Function.t._safeInvokeFunction (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:19:248)
    at Function.t._invokeFactory (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:19:495)
    at t.complete (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:19:732)
    at s._onModuleComplete (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:30:25)
    at s._onModuleComplete (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:30:269)
    at s._resolve (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:29:599)
    at s.defineModule (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:23:862)
    at s._onLoad (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:25:611)
    at Object.callback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:27:890)
    at e.triggerCallback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:810)
    at /home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:616
    at t.load (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:16:146)
    at e.load (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:587)
    at i (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:27:808)
    at Object.errorback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:27:929)
    at e.triggerErrorback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:952)
    at /home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:657
    at ReadFileContext.callback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:16:267)
    at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:420:13)
The factory method of "vs/platform/node/product" has thrown an exception
{ Error: Cannot find module '/home/osboxes/editors/product.json'
    at Function.Module._resolveFilename (module.js:543:15)
    at Function.Module._load (module.js:473:25)
    at Module.require (module.js:586:17)
    at require (internal/module.js:11:18)
    at Function.i [as __$__nodeRequire] (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:30:770)
    at Object.<anonymous> (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/code/node/cli.js:111:855)
    at Function.t._safeInvokeFunction (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:19:248)
    at Function.t._invokeFactory (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:19:495)
    at t.complete (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:19:732)
    at s._onModuleComplete (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:30:25)
    at s._onModuleComplete (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:30:269)
    at s._resolve (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:29:599)
    at s.defineModule (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:23:862)
    at s._onLoad (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:25:611)
    at Object.callback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:27:890)
    at e.triggerCallback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:810)
    at /home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:616
    at t.load (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:16:146)
    at e.load (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:587)
    at i (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:27:808)
    at Object.errorback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:27:929)
    at e.triggerErrorback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:952)
    at /home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:657
    at ReadFileContext.callback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:16:267)
    at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:420:13) code: 'MODULE_NOT_FOUND' }
Error: Cannot find module '/home/osboxes/editors/product.json'
    at Function.Module._resolveFilename (module.js:543:15)
    at Function.Module._load (module.js:473:25)
    at Module.require (module.js:586:17)
    at require (internal/module.js:11:18)
    at Function.i [as __$__nodeRequire] (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:30:770)
    at Object.<anonymous> (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/code/node/cli.js:111:855)
    at Function.t._safeInvokeFunction (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:19:248)
    at Function.t._invokeFactory (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:19:495)
    at t.complete (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:19:732)
    at s._onModuleComplete (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:30:25)
    at s._onModuleComplete (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:30:269)
    at s._resolve (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:29:599)
    at s.defineModule (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:23:862)
    at s._onLoad (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:25:611)
    at Object.callback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:27:890)
    at e.triggerCallback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:810)
    at /home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:616
    at t.load (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:16:146)
    at e.load (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:587)
    at i (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:27:808)
    at Object.errorback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:27:929)
    at e.triggerErrorback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:952)
    at /home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:13:657
    at ReadFileContext.callback (/home/osboxes/editors/VSCode-linux-x64#1.26/resources/app/out/vs/loader.js:16:267)
    at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:420:13)

Any ideas what could be causing this, and where in the source one could start looking for answers?

Does this issue occur when all extensions are disabled?: Yes/No
Yes

@vscodebot vscodebot bot added the new release label Aug 17, 2018

@artbycrunk

This comment has been minimized.

Copy link
Author

commented Aug 18, 2018

@jrieken
its seems like its because the packageJsonPath lookup is using URI.parse which is stripping off the fragment in the path.. should this lookup be using URI.file instead?

@jrieken

This comment has been minimized.

Copy link
Member

commented Aug 20, 2018

This might actually be an issue with require.toUrl or an issue with how we setup the loader/baseurl.

@jrieken jrieken added bug uri labels Aug 20, 2018

@jrieken jrieken added this to the August 2018 milestone Aug 20, 2018

@vscodebot vscodebot bot removed the new release label Aug 21, 2018

jrieken added a commit to microsoft/vscode-loader that referenced this issue Aug 24, 2018

jrieken added a commit that referenced this issue Aug 24, 2018

@jrieken jrieken closed this Aug 24, 2018

@octref

This comment has been minimized.

Copy link
Member

commented Aug 30, 2018

@jrieken The new one still don't work for me:

  • Download Insiders / Stable into a folder like foo#bar
  • Observer that there is no way to open them

image

@octref octref reopened this Aug 30, 2018

@jrieken

This comment has been minimized.

Copy link
Member

commented Aug 31, 2018

Works for me with those steps. @octref Are you sure that you are testing this with the right version and that you don't have VS Code Insiders already running?

aug-31-2018 08-57-24

@bpasero

This comment has been minimized.

Copy link
Member

commented Aug 31, 2018

@jrieken @octref I cannot reproduce with todays insider release so I am moving this to September.

@bpasero bpasero modified the milestones: August 2018, September 2018 Aug 31, 2018

@artbycrunk

This comment has been minimized.

Copy link
Author

commented Aug 31, 2018

Just tested the latest insider release, works for me.

@jrieken

This comment has been minimized.

Copy link
Member

commented Aug 31, 2018

Ok - enough evidence (and trust in my changes). Closing.

@jrieken jrieken closed this Aug 31, 2018

@jrieken jrieken modified the milestones: September 2018, August 2018 Aug 31, 2018

@bpasero bpasero added the verified label Aug 31, 2018

@octref

This comment has been minimized.

Copy link
Member

commented Aug 31, 2018

Working for me now. I probably had Insider already running yesterday.

@vscodebot vscodebot bot locked and limited conversation to collaborators Oct 15, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants
You can’t perform that action at this time.