Skip to content

nbin: Make extract location more robust #1287

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

Closed
robpurdue opened this issue Jan 20, 2020 · 8 comments
Closed

nbin: Make extract location more robust #1287

robpurdue opened this issue Jan 20, 2020 · 8 comments
Labels
blocked This issue cannot proceed due to external factors

Comments

@robpurdue
Copy link

robpurdue commented Jan 20, 2020

  • code-server version: 2.1698-vsc1.41.1
  • OS Version: linux-x86_64

Description

When running VS Code, the "Open Folder" command produces the error

"Unable to open {folder}: Unable to read file (Error: File not found)..."

Version 2.1692-vsc1.39.2 works correctly.

Steps to Reproduce

  1. Launch VS Code
  2. Choose "Open folder" from Welcome window or from File menu

Examples

Expected Behavior (2.1692-vsc1.39.2):

1 39 2_open_folder

Current Behavior (2.1698-vsc1.41.1):

1 41 1_open_folder

@robpurdue robpurdue added the bug Something isn't working label Jan 20, 2020
@robpurdue robpurdue changed the title Cannot open folders in VS Code in 2. Cannot open folders in VS Code in 2.1698-vsc1.41.1 Jan 20, 2020
@4oo4
Copy link

4oo4 commented Jan 20, 2020

I'm having this same behavior too. Not sure if it's related but I'm also unable to open a terminal, it's stuck at "Starting...". If that's something different I can open a separate issue. I see this in docker logs:

Error: The module '/home/code/.cache/nbin/1.2.7/spdlog.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1076:18)
    at Module.load (internal/modules/cjs/loader.js:832:32)
    at Function.Module._load (internal/modules/cjs/loader.js:744:14)
    at Module.require (internal/modules/cjs/loader.js:869:19)
    at Module.patchedRequire [as require] (/src/build/code-serverdaily-vsc1.41.1-linux-x86_64-built/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
    at require (internal/modules/cjs/helpers.js:74:18)
    at bindings (/src/build/code-serverdaily-vsc1.41.1-linux-x86_64-built/node_modules/bindings/bindings.js:112:48)
    at Object.<anonymous> (/src/build/code-serverdaily-vsc1.41.1-linux-x86_64-built/node_modules/spdlog/index.js:3:35)
    at Module._compile (internal/modules/cjs/loader.js:976:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1018:10)
    at Module.load (internal/modules/cjs/loader.js:832:32)
    at Function.Module._load (internal/modules/cjs/loader.js:744:14)
    at Module.require (internal/modules/cjs/loader.js:869:19)
    at Module.patchedRequire [as require] (/src/build/code-serverdaily-vsc1.41.1-linux-x86_64-built/node_modules/diagnostic-channel/dist/src/patchRequire.js:14:46)
    at require (internal/modules/cjs/helpers.js:74:18)
    at t.load (/src/build/code-serverdaily-vsc1.41.1-linux-x86_64-built/out/vs/loader.js:16:119)
    at e.load (/src/build/code-serverdaily-vsc1.41.1-linux-x86_64-built/out/vs/loader.js:13:586)
    at i (/src/build/code-serverdaily-vsc1.41.1-linux-x86_64-built/out/vs/loader.js:29:189)
    at Object.errorback (/src/build/code-serverdaily-vsc1.41.1-linux-x86_64-built/out/vs/loader.js:29:313)
    at e.triggerErrorback (/src/build/code-serverdaily-vsc1.41.1-linux-x86_64-built/out/vs/loader.js:13:955)
    at /src/build/code-serverdaily-vsc1.41.1-linux-x86_64-built/out/vs/loader.js:13:659
    at /src/build/code-serverdaily-vsc1.41.1-linux-x86_64-built/out/vs/loader.js:16:494
    at nbin.js:670:13 {
  phase: 'loading',
  moduleId: 'spdlog',
  neededBy: [ '===anonymous3===' ]
}

@mirekphd
Copy link

mirekphd commented Jan 20, 2020

There seems to be a root requirement newly introduced by nbin in version 2.1698 of code-server. I managed to restore runs under arbitrary UIDs (an Openshift requirement) only after creating and making modifiable by any user the /home/coder/.cache folder that raises EACCES error:

Error: EACCES: permission denied, mkdir '/home/coder/.cache/nbin'

@4oo4
Copy link

4oo4 commented Jan 20, 2020

@mirekphd Interesting, I got that too but figured it was something weird with my build process. That error goes away when I chown the .cache directory, but then I get that error with spdlog.

@code-asher
Copy link
Member

code-asher commented Jan 21, 2020 via email

@mirekphd
Copy link

mirekphd commented Jan 22, 2020

The most common permissions for /tmp are:
777 = rwxrwxrwx

Therefore I would reverse the default cache location, defaulting to /tmp as before (where majority have all rights by default) and alowing the "special needs" users to set a non-standard location within /home/coder (where UID and thus access rights can vary with every user on secure platforms such as Openshift). Not only for backward compatibility, but also for frequency of use - only minority cannot execute from /tmp folder, most users can.

@4oo4
Copy link

4oo4 commented Jan 22, 2020

@code-asher I'll give that a try and let you know. Thanks for the tip

@code-asher
Copy link
Member

Opened coder/nbin#40 to address this.

@nhooyr nhooyr added blocked This issue cannot proceed due to external factors and removed bug Something isn't working labels Jan 27, 2020
@nhooyr nhooyr changed the title Cannot open folders in VS Code in 2.1698-vsc1.41.1 nbin: Make extract location more robust Jan 27, 2020
@nhooyr
Copy link
Contributor

nhooyr commented Feb 3, 2020

See #1306

@nhooyr nhooyr closed this as completed Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This issue cannot proceed due to external factors
Projects
None yet
Development

No branches or pull requests

5 participants