Skip to content

[Bug]: Can't run the NPM release - shows 404 #4900

Closed
@edvincent

Description

@edvincent

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Version 98.0.4758.102 (Official Build) (x86_64)
  • Local OS: MacOS 12.2.1 (21D62)
  • Remote OS: Ubuntu 20.04 LTS - Linux ip-172-26-9-167 5.4.0-1018-aws #18-Ubuntu SMP Wed Jun 24 01:15:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Remote Architecture: x86_64
  • code-server --version: 4.0.2 & 4.0.1
  • NodeJS version: 14.19.0 & 14.18.3

Steps to Reproduce

On a brand-new Ubuntu 20.04 instance:

sudo apt-get update
sudo apt-get install -y \
  build-essential \
  pkg-config \
  python3 \
  g++ \
  libx11-dev \
  libxkbfile-dev \
  libsecret-1-dev
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.bashrc
nvm install 14
npm config set python python3
npm install -g rimraf # This is currently needed otherwise the install fails, I'll try to send a PR to fix this
npm install -g [email protected]

And then accessing it through a local SSH tunnel using ssh -i Downloads/LightsailDefaultKey-us-west-2.pem ubuntu@UBUNTU_INSTANCE_IP -L 8080:localhost:8080 (for this brand new repro - but still happened when exposing the port directly, or with a reverse proxy etc... The SSH tunnel happens to be more light-weight to setup to be able to try with multiple versions of NodeJS and of code-server ;P)

Expected

Able to launch and access code-server.

Actual

I can log-in completely fine, but get a 404 once logged in. If --auth none is passed, I straight go to the error page.

Logs

ubuntu@ip-172-26-14-230:~$ code-server --verbose
[2022-02-23T17:25:36.846Z] info  Wrote default config file to ~/.config/code-server/config.yaml
[2022-02-23T17:25:37.284Z] trace child:11000 got message {"message":{"type":"handshake","args":{"bind-addr":"127.0.0.1:8080","auth":"password","password":"PASSWORD","config":"/home/ubuntu/.config/code-server/config.yaml","verbose":true,"user-data-dir":"/home/ubuntu/.local/share/code-server","extensions-dir":"/home/ubuntu/.local/share/code-server/extensions","log":"trace","host":"127.0.0.1","port":8080,"proxy-domain":[],"_":[],"usingEnvPassword":false,"usingEnvHashedPassword":false}}}
[2022-02-23T17:25:37.287Z] info  code-server 4.0.2 5cdfe74686aa73e023f8354a9a6014eb30caa7dd
[2022-02-23T17:25:37.287Z] info  Using user-data-dir ~/.local/share/code-server
[2022-02-23T17:25:37.287Z] trace Using extensions-dir ~/.local/share/code-server/extensions
[2022-02-23T17:25:37.303Z] info  Using config file ~/.config/code-server/config.yaml
[2022-02-23T17:25:37.303Z] info  HTTP server listening on http://127.0.0.1:8080/
[2022-02-23T17:25:37.303Z] info    - Authentication is enabled
[2022-02-23T17:25:37.303Z] info      - Using password from ~/.config/code-server/config.yaml
[2022-02-23T17:25:37.303Z] info    - Not serving HTTPS
[2022-02-23T17:25:52.516Z] trace heartbeat
[17:25:52] Extension host agent started.
[17:25:52] Started scanning user extensions
[17:25:52] resolveShellEnv(): running (macOS/Linux)
[17:25:52] getUnixShellEnvironment#runAsNode undefined
[17:25:52] getUnixShellEnvironment#noAttach undefined
[17:25:52] getUnixShellEnvironment#env {
  SHELL: '/bin/bash',
  NVM_RC_VERSION: '',
  NVM_INC: '/home/ubuntu/.nvm/versions/node/v14.19.0/include/node',
  PWD: '/home/ubuntu',
  LOGNAME: 'ubuntu',
  XDG_SESSION_TYPE: 'tty',
  MOTD_SHOWN: 'pam',
  HOME: '/home/ubuntu',
  LANG: 'C.UTF-8',
  LS_COLORS: 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:',
  LC_TERMINAL: 'iTerm2',
  SSH_CONNECTION: '205.251.233.179 32243 172.26.14.230 22',
  NVM_DIR: '/home/ubuntu/.nvm',
  LESSCLOSE: '/usr/bin/lesspipe %s %s',
  XDG_SESSION_CLASS: 'user',
  TERM: 'xterm-256color',
  LESSOPEN: '| /usr/bin/lesspipe %s',
  USER: 'ubuntu',
  LC_TERMINAL_VERSION: '3.4.15',
  SHLVL: '1',
  NVM_CD_FLAGS: '',
  XDG_SESSION_ID: '3',
  XDG_RUNTIME_DIR: '/run/user/1000',
  SSH_CLIENT: '205.251.233.179 32243 22',
  XDG_DATA_DIRS: '/usr/local/share:/usr/share:/var/lib/snapd/desktop',
  PATH: '/home/ubuntu/.nvm/versions/node/v14.19.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin',
  DBUS_SESSION_BUS_ADDRESS: 'unix:path=/run/user/1000/bus',
  NVM_BIN: '/home/ubuntu/.nvm/versions/node/v14.19.0/bin',
  SSH_TTY: '/dev/pts/0',
  _: '/home/ubuntu/.nvm/versions/node/v14.19.0/bin/code-server',
  LOG_LEVEL: 'trace',
  CODE_SERVER_PARENT_PID: '10989',
  NODE_OPTIONS: '--max-old-space-size=2048 ',
  VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH: '/home/ubuntu/.nvm/versions/node/v14.19.0/lib/node_modules/code-server/vendor/modules/code-oss-dev/remote/node_modules',
  VSCODE_CWD: '/home/ubuntu',
  ELECTRON_RUN_AS_NODE: '1',
  ELECTRON_NO_ATTACH_CONSOLE: '1'
}
[17:25:52] getUnixShellEnvironment#shell /bin/bash
[17:25:52] getUnixShellEnvironment#spawn ["-ilc"] '/home/ubuntu/.nvm/versions/node/v14.19.0/bin/node'  -p '"2626021becbb" + JSON.stringify(process.env) + "2626021becbb"'
[2022-02-23T17:25:52.740Z] debug redirecting from / to ./login
[17:25:52] Extension VSIX downlads cache dir does not exist
[17:25:52] Scanned user extensions: 0
[17:25:52] [Theme Service] Scanning for theme extension...
[17:25:52] [Theme Service] theme-abyss
[17:25:52] [Theme Service] theme-defaults
[17:25:52] [Theme Service] theme-kimbie-dark
[17:25:52] [Theme Service] theme-monokai
[17:25:52] [Theme Service] theme-monokai-dimmed
[17:25:52] [Theme Service] theme-quietlight
[17:25:52] [Theme Service] theme-red
[17:25:52] [Theme Service] theme-solarized-dark
[17:25:52] [Theme Service] theme-solarized-light
[17:25:52] [Theme Service] theme-tomorrow-night-blue
[17:25:53] getUnixShellEnvironment#raw 2626021becbb{"SHELL":"/bin/bash","NVM_RC_VERSION":"","NVM_INC":"/home/ubuntu/.nvm/versions/node/v14.19.0/include/node","LOG_LEVEL":"trace","NODE_OPTIONS":"--max-old-space-size=2048 ","VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH":"/home/ubuntu/.nvm/versions/node/v14.19.0/lib/node_modules/code-server/vendor/modules/code-oss-dev/remote/node_modules","ELECTRON_RUN_AS_NODE":"1","PWD":"/home/ubuntu","LOGNAME":"ubuntu","XDG_SESSION_TYPE":"tty","MOTD_SHOWN":"pam","HOME":"/home/ubuntu","LANG":"C.UTF-8","LS_COLORS":"rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:","LC_TERMINAL":"iTerm2","SSH_CONNECTION":"205.251.233.179 32243 172.26.14.230 22","NVM_DIR":"/home/ubuntu/.nvm","LESSCLOSE":"/usr/bin/lesspipe %s %s","XDG_SESSION_CLASS":"user","TERM":"xterm-256color","LESSOPEN":"| /usr/bin/lesspipe %s","USER":"ubuntu","LC_TERMINAL_VERSION":"3.4.15","SHLVL":"1","NVM_CD_FLAGS":"","VSCODE_CWD":"/home/ubuntu","XDG_SESSION_ID":"3","XDG_RUNTIME_DIR":"/run/user/1000","SSH_CLIENT":"205.251.233.179 32243 22","ELECTRON_NO_ATTACH_CONSOLE":"1","XDG_DATA_DIRS":"/usr/local/share:/usr/share:/var/lib/snapd/desktop","PATH":"/home/ubuntu/.nvm/versions/node/v14.19.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin","DBUS_SESSION_BUS_ADDRESS":"unix:path=/run/user/1000/bus","NVM_BIN":"/home/ubuntu/.nvm/versions/node/v14.19.0/bin","SSH_TTY":"/dev/pts/0","CODE_SERVER_PARENT_PID":"10989","_":"/home/ubuntu/.nvm/versions/node/v14.19.0/bin/node"}2626021becbb

[17:25:53] getUnixShellEnvironment#stderr bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell

[17:25:53] getUnixShellEnvironment#result {
  SHELL: '/bin/bash',
  NVM_RC_VERSION: '',
  NVM_INC: '/home/ubuntu/.nvm/versions/node/v14.19.0/include/node',
  LOG_LEVEL: 'trace',
  NODE_OPTIONS: '--max-old-space-size=2048 ',
  VSCODE_INJECT_NODE_MODULE_LOOKUP_PATH: '/home/ubuntu/.nvm/versions/node/v14.19.0/lib/node_modules/code-server/vendor/modules/code-oss-dev/remote/node_modules',
  PWD: '/home/ubuntu',
  LOGNAME: 'ubuntu',
  XDG_SESSION_TYPE: 'tty',
  MOTD_SHOWN: 'pam',
  HOME: '/home/ubuntu',
  LANG: 'C.UTF-8',
  LS_COLORS: 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:',
  LC_TERMINAL: 'iTerm2',
  SSH_CONNECTION: '205.251.233.179 32243 172.26.14.230 22',
  NVM_DIR: '/home/ubuntu/.nvm',
  LESSCLOSE: '/usr/bin/lesspipe %s %s',
  XDG_SESSION_CLASS: 'user',
  TERM: 'xterm-256color',
  LESSOPEN: '| /usr/bin/lesspipe %s',
  USER: 'ubuntu',
  LC_TERMINAL_VERSION: '3.4.15',
  SHLVL: '1',
  NVM_CD_FLAGS: '',
  VSCODE_CWD: '/home/ubuntu',
  XDG_SESSION_ID: '3',
  SSH_CLIENT: '205.251.233.179 32243 22',
  XDG_DATA_DIRS: '/usr/local/share:/usr/share:/var/lib/snapd/desktop',
  PATH: '/home/ubuntu/.nvm/versions/node/v14.19.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin',
  DBUS_SESSION_BUS_ADDRESS: 'unix:path=/run/user/1000/bus',
  NVM_BIN: '/home/ubuntu/.nvm/versions/node/v14.19.0/bin',
  SSH_TTY: '/dev/pts/0',
  CODE_SERVER_PARENT_PID: '10989',
  _: '/home/ubuntu/.nvm/versions/node/v14.19.0/bin/node'
}
[2022-02-23T17:25:54.282Z] debug no valid cookie doman {"host":"localhost"}
[2022-02-23T17:25:54.283Z] debug redirecting from /login to ./
[2022-02-23T17:26:52.518Z] debug 0 active connections

Screenshot/Video

Screen Shot 2022-02-23 at 09 27 02

Does this issue happen in VS Code?

  • I cannot reproduce this in VS Code.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

  • It happens when using no SSL, SSL (both self-signed or through an nginx reverse proxy and validated with letsencrypt), or even --link.
  • Happens when installing globally, but also when installing in a specific package to be able to get rid of the following warning: npm WARN @coder/[email protected] requires a peer of @google-cloud/logging@^4.5.2 but none is installed. You must install peer dependencies yourself.
  • Still happens when installing g++ libx11-dev libxkbfile-dev libsecret-1-dev before installing the package, which gets rid of some of the WARN during the install for lack of node-gyp - warning Error running install script for optional dependency.

Possibly Related

There have been other 404 reports using yarn.

Metadata

Metadata

Assignees

No one assigned

    Labels

    high-priorityThis issue needs to be resolved ASAP

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions