Code-server: 1.408-vsc1.32.0 report error : TypeError: Path must be a string.

Created on 27 Mar 2019  路  8Comments  路  Source: cdr/code-server


  • code-server version:
$code-server --version 
1.408-vsc1.32.0
  • OS Version:
CentOS 7.3

Description

update 1.32.0-310to1.408-vsc1.32.0,error report:

$./code-server /home/code-server/workspace -h 127.0.0.1 -p 8444 --cert /home/ssl/code/cert.crt --cert-key /home/ssl/code/cert.key --allow-http --password=Secret8866.
ERROR { TypeError: Path must be a string. Received true
    at assertPath (path.js:28:11)
    at Object.resolve (path.js:1168:7)
    at /home/travis/build/codercom/code-server/packages/server/out/cli.js:340:50624
    at <anonymous>
  [stack]: 'TypeError: Path must be a string. Received true\n    at assertPath (path.js:28:11)\n    at Object.resolve (path.js:1168:7)\n    at /home/travis/build/codercom/code-server/packages/server/out/cli.js:340:50624\n    at <anonymous>',
  [message]: 'Path must be a string. Received true' }
*** Error in `./code-server': free(): invalid pointer: 0x00007f69b98651c0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x81489)[0x7f69b951f489]
./code-server(_ZN4node5StartEiPPc+0x3d9)[0x858a89]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f69b94c03d5]
./code-server(_start+0x29)[0x81e7b9]
======= Memory map: ========
00400000-01fdf000 r-xp 00000000 fd:01 526141                             /home/code-server/code-server
021df000-021e0000 r--p 01bdf000 fd:01 526141                             /home/code-server/code-server
021e0000-021fa000 rw-p 01be0000 fd:01 526141                             /home/code-server/code-server
021fa000-02210000 rw-p 00000000 00:00 0 
03c3b000-0420c000 rw-p 00000000 00:00 0                                  [heap]
......
......

Steps to Reproduce

  1. get binary package
    wget https://github.com/codercom/code-server/releases/download/1.408-vsc1.32.0/code-server1.408-vsc1.32.0-linux-x64.tar.gz
  2. unzip package
    tar -xvzf code-server1.408-vsc1.32.0-linux-x64.tar.gz
  3. replace code-server binary
    cp code-server1.408-vsc1.32.0-linux-x64/code-server code-server/
  4. start code-server
    ./code-server /home/code-server/workspace -h 127.0.0.1 -p 8444 --cert /home/ssl/code/cert.crt --cert-key /home/ssl/code/cert.key --allow-http --password=Secret8866.
  5. then ,it report error
bug

Most helpful comment

Will fix.

All 8 comments

Hi,
Sorry for replying things that's unrelated to your issue.

How do you solve the problem running code-server binary on CentOS ?

code-server: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by code-server)
code-server: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by code-server)

Hi,
Sorry for replying things that's unrelated to your issue.

How do you solve the problem running code-server binary on CentOS ?

code-server: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by code-server)
code-server: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by code-server)

use strings /usr/lib64/libstdc++.so.6|grep GLIBCXX query GLIBCXX's include version,
you should update your gcc version锛宯ewer gcc will provide GLIBCXX high version,

Same error when code-server is started via Docker.

Ubuntu 18.04 x64, latest Docker version.

Same error when code-server is started via Docker.

Ubuntu 18.04 x64, latest Docker version.

$ find / -name libstdc++.so.6
......
$strings /path/to/libstdc++.so.6 | grep GLIBCXX

it will show all GLIBCXX's version, if not your want, you need newer libstdc++.so, because libstdc++.so.6' is a soft connection withlibstdc++.so`. i will update gcc , Because the new version will provide a new version of libstdc++.so
Above are guesses, because I am not using ubuntu now, you can try it

GLIBCXX 3.4 to 3.4.25.

Same error, running on Arch Linux latest.

Error occurs only when append --cert --cert-key Params.

Will fix.

Have you updated docker image with this fix?
Here is what I get right now:

> docker run -t -p 8443:8443 -v "${PWD}:/root/project" codercom/code-server code-server --port 8443 --cert "certs/vscode-cert.crt" --cert-key="certs/vscode-cert.key"
Unable to find image 'codercom/code-server:latest' locally
latest: Pulling from codercom/code-server
e58ad9fd24ca: Already exists
0a4c669d2dea: Already exists
ab60767ef52b: Already exists
8cc3b738fbea: Already exists
3fa26e854312: Already exists
dec824975a6a: Already exists
5f4dc2891447: Already exists
efba7b779ad8: Already exists
Digest: sha256:a5a8d639e412d91e7caa1df6652dc1696c3cb838cf7afcd064968bd757b8eebc
Status: Downloaded newer image for codercom/code-server:latest
ERROR { TypeError: Path must be a string. Received true
    at assertPath (path.js:28:11)
    at Object.resolve (path.js:1168:7)
    at /src/packages/server/out/cli.js:325:50620
    at <anonymous>
  [stack]: 'TypeError: Path must be a string. Received true\n    at assertPath (path.js:28:11)\n    at Object.resolve (path.js:1168:7)\n    at /src/packages/server/out/cli.js:325:50620\n    at <anonymous>',
  [message]: 'Path must be a string. Received true' }
free(): invalid pointer

No it's not released yet. You could build your own docker image though, that's what I did for now.

$ git clone https://github.com/codercom/code-server
$ docker image build -t coder-selfcompiled .
$ codercom/code-server with the chosen name in the build command>

The docker build command may take some time to complete, took around 20 mins on a 2core vps.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

infogulch picture infogulch  路  3Comments

KSXGitHub picture KSXGitHub  路  3Comments

balazssoltesz picture balazssoltesz  路  3Comments

grant picture grant  路  3Comments

korzq picture korzq  路  3Comments