[Bug]: Terminal not working
Is there an existing issue for this?
- [X] I have searched the existing issues
OS/Web Information
- Web Browser: Chrome
- Local OS: Arch Linux
- Remote OS: Ubuntu
- Remote Architecture: aarch64
code-server --version: 4.4.0
Steps to Reproduce
- open code-server
- open new termina
Expected
Terminal window should open.
Actual
Terminal window is blank.
Logs
[IPC Library: Pty Host] WARN Shell integration cannot be enabled for executable "/usr/bin/bash" and args undefined
...
[22:22:15] Terminal process launching on remote agent { shellLaunchConfig: { name: undefined, executable: '/usr/bin/bash', args: undefined, cwd: '/root/sandbox/StatusPage', env: undefined, useShellEnvironment: true },
Screenshot/Video

Does this issue happen in VS Code?
- [X] I cannot reproduce this in VS Code.
Are you accessing code-server over HTTPS?
- [x] I am using HTTPS.
Notes
I tried to reinstall code-server, and even I ran the docker version from linuxservers with the same results. It's weird because 2 days ago it was working, and I didn't update anything on that server.
Do you have bash installed?
I've seen this happen when I don't have zsh installed. You can also change the default shell in the VS Code Settings UI. I would try that.
I confirm this issue, after updating to 4.4.0 terminal is not working
Do you have bash installed?
I've seen this happen when I don't have zsh installed. You can also change the default shell in the VS Code Settings UI. I would try that.
It was working before update, but yup i have bash installed.
Can you share the logs for the browser and the server? I'm not sure what could be going on here.
I'm getting a similar error, but not anymore when using chrominum.
Server: raspberry pi 4, Manjaro-ARM, code-server AUR package (yeah i know manjaro and AUR).
Client: Fedora 35, normal amd64 chipset, Firefox 100.0.2 vs Chrominum Version 100.0.4896.127 (Official Build) Fedora Project (64-bit)
systemctl status
Mai 31 22:20:56 theEolian code-server[432]: rejected promise not handled within 1 second: TypeError: Cannot read properties of undefined (reading 'windowsEnableConpty')
Mai 31 22:20:56 theEolian code-server[432]: stack trace: TypeError: Cannot read properties of undefined (reading 'windowsEnableConpty'), at new Ae (/usr/lib/code-server/lib/vscode/out/vs/platform/terminal/node/ptyHostMain.js:17:1069>
Mai 31 22:20:56 theEolian code-server[432]: [22:20:56] [Error [TypeError]: Cannot read properties of undefined (reading 'windowsEnableConpty'), at new Ae (/usr/lib/code-server/lib/vscode/out/vs/platform/terminal/node/ptyHostMain.js:>
Mai 31 22:21:00 theEolian code-server[432]: [22:21:00] No ptyHost response to createProcess after 5 seconds
Browser log (a lot of other errors that dont directly seem related excluded, of course firefox only):
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'windowsEnableConpty')
ipc.ts:558:40
Ri tabsTitleControl.ts:1946
(Async: promise callback)
Ri tabsTitleControl.ts:1946
_createInstance menu.ts:1389
createInstance menu.ts:1389
createInstance extensionsWidgets.ts:559
createInstance self-hosted:1124
addInstance tabsTitleControl.ts:1946
n tabsTitleControl.ts:1946
_createInstance menu.ts:1389
createInstance menu.ts:1389
createGroup tabsTitleControl.ts:1946
createGroup self-hosted:1124
_createTerminal extensionsWidgets.ts:559
createTerminal extensionsWidgets.ts:559
AsyncFunctionNext self-hosted:635
(Async: async)
initializeTerminals extensionsWidgets.ts:559
AsyncFunctionNext self-hosted:635
(Async: async)
initializeTerminals self-hosted:1124
renderBody tabsTitleControl.ts:2013
fire event.ts:727
setVisible mainThreadDebugService.ts:297
setVisible testingExplorerFilter.ts:54
map self-hosted:180
setVisible testingExplorerFilter.ts:44
setVisible testingExplorerView.ts:1005
showComposite mainThreadDebugService.ts:297
doOpenComposite mainThreadDebugService.ts:297
openComposite mainThreadDebugService.ts:297
doOpenPanel workbench.web.main.js:2612
openPaneComposite workbench.web.main.js:2612
openPaneComposite preferencesService.ts:50
setPanelHidden preferencesService.ts:50
createWorkbenchLayout editorService.ts:991
fire event.ts:727
setVisible viewportSemanticTokens.ts:135
setVisible gridview.ts:899
setVisible splitview.ts:235
resize splitview.ts:1141
onSashChange splitview.ts:856
fire event.ts:733
i event.ts:40
fire event.ts:727
O sash.ts:549
fire event.ts:727
b canIUse.ts:45
(Async: EventListener.handleEvent)
onFirstListenerAdd canIUse.ts:45
get event/this._event event.ts:653
The connection to the terminal's pty host process is unresponsive, the terminals may stop working. workbench.web.main.js:789:179061
onDidChangeNotification workbench.web.main.js:789
registerListeners workbench.web.main.js:789
fire event.ts:727
addNotification wordHighlighter.ts:508
notify workbench.web.main.js:1598
prompt workbench.web.main.js:1598
y webviewPreloads.ts:2227
fire event.ts:727
fire event.ts:733
K ipc.ts:633
onResponse ipc.ts:716
onBuffer ipc.ts:697
protocolListener ipc.ts:509
fire event.ts:727
fire ipc.net.ts:641
_receiveMessage ipc.net.ts:961
p ipc.net.ts:831
fire event.ts:727
acceptChunk ipc.net.ts:382
o ipc.net.ts:339
onData editorOptions.ts:4146
fire event.ts:727
onload editorOptions.ts:4041
(Async: EventHandlerNonNull)
E editorOptions.ts:4036
create editorOptions.ts:4131
connect editorOptions.ts:4178
r editorOptions.ts:4214
l editorOptions.ts:4256
s editorOptions.ts:4389
i editorOptions.ts:4401
h editorOptions.ts:4415
_createConnection workbench.web.main.js:1731
_getOrCreateConnection workbench.web.main.js:1731
getChannel workbench.web.main.js:1731
withChannel workbench.web.main.js:1731
_withChannel workbench.web.main.js:1731
getRawEnvironment workbench.web.main.js:1731
c workbench.web.main.js:1735
register workbench.web.main.js:1735
registerFileSystemProviders auxiliaryBarPart.ts:151
initServices auxiliaryBarPart.ts:151
open auxiliaryBarPart.ts:151
m auxiliaryBarPart.ts:151
<anonymous> fake:1
<anonymous> fake:1
_invokeFactory loader.js:1185
complete loader.js:1195
_onModuleComplete loader.js:1821
_resolve loader.js:1781
defineModule loader.js:1424
v loader.js:1871
<anonymous> fake:8
<anonymous> fake:1
I have the same issue after updating to 4.4.0. I used the docker image on an arm64 machine.
New installation 4.4.0, Ubuntu 20.04 on arm64,
"The terminal process failed to launch: A native exception occurred during launch (forkpty(3) failed.)."
[IPC Library: Pty Host] WARN Shell integration cannot be enabled for executable "/bin/bash" and args []
It appears that my issue appears with code-server is run from a chroot/jailkit account. Seems to work fine on a regular user; non-root account on Ubuntu. Wondering if it's a missing dependency issue of something simply not copied over to the jailed account.
It appears that my issue appears with code-server is run from a chroot/jailkit account. Seems to work fine on a regular user; non-root account on Ubuntu. Wondering if it's a missing dependency issue of something simply not copied over to the jailed account.
@code-asher any ideas?
I found out that you can mount your /dev and /dev/pts folders to your jailkit account and it works. I.e.
mount -o bind /dev /[your jailkit root]/dev mount -t devpts devpts /[your jailkit root]/dev/pts
However, this mounts everything in your root /dev to the jailkit and may defeat the purpose of jailkit altogether; to provide isolation. Other forums have indicated that /dev/pts is the only device necessary and doesn't pose a "big risk" as each device has it's own owner/group; but I couldn't get it to work with just that. I'm wondering what else is actually needed and is a dependency? I don't want to give full access to items like /dev/mem (memory) to a jailkit'd user.
Does anything in this issue help? https://github.com/microsoft/vscode-remote-release/issues/4233
At first glance seems like /dev/ptmx and /dev/pts should do it.
Can confirm. Running code-server on OSX, with a vanilla docker-code-server, running on Docker locally.
No terminal start, nothing in any of the logs that I could find.
Downgrading to 4.3.0 seems to fix it
@bcotton nothing in the browser logs either? I'm on OSX and have 4.4.0 running locally (not in Docker) and the terminal works
@bcotton nothing in the browser logs either?
Nope, I checked the "window" logs. Tailed all logs in the running image, in addition to the output of coder command line.
is there somewhere else to check?
If you open up code-server in a browser like Chrome, then View > Developer > Developer Tools and look in the Console tab there might be something helpful
in addition to the output of coder command line
wait are you using code-server or coder?
wait are you using code-server or
coder?
I'm using coder to start code-server in a docker container.
@bcotton oh! thanks for clarifying. That sounds specific to coder then. Do you mind opening an issue there with steps to reproduce it? Sorry for the confusion!
@jsjoeio I had the same issue today after upgrade code-server from 4.4.0 to 4.5.0 and I don't use 'coder'.
The background steps for the upgrade:
- Using code-server 4.40 ssh forward with chrome + safari on client side
- Install script upgrade failed on rpm
- Manually run
rpm -U --replacefiles --replacepkgs ~/.cache/code-server/code-server-4.5.0-amd64.rpm - Restart service
I could open more terminals, but I didn't see the content and titles of the terminals and otherwise exactly as the description/screenshot.
Likewise, I think it was caused by browser some cache or cookies. Because after I returned from a few local errands, the problem magically resolved itself. I had problem on client node with Safari and Chrome, server side RHEL 8.6, logs from the systemd coda-server service are clean, and I can't give you any more information backwards from the browsers, unfortunately.
Using code-server 4.5.0, as started directly via code-server, the following occurs when I use ctrl+shift+p and then run the command to create a new terminal.

code-server 4.4.0 worked fine without this issue. Note that in case its relevant, using 4.4.0 instead of 4.5.0 also avoided issue #5343 which I also ran into using 4.5.0.
I've installed code-server in a docker image defined here: https://github.com/pangeo-data/jupyter-earth/blob/master/hub.jupytearth.org-image/Dockerfile. It is based on ubuntu:22.04.
I believe this might be a duplicate of https://github.com/coder/code-server/issues/5321
If someone wants to check, here is the PR which fixed it: https://github.com/coder/code-server/pull/5332
@jsjoeio for me, the base path was not /, so any fix related to that seems to be relevant!
I hope we're right then 🤞🏼 Hoping to get 4.5.1 out soon. Sorry for all the trouble!
@jsjoeio do you think the regression about syntax highlighting (#5343) was resolved by #5332 as well? I could not find a clear error message or similar, but only conclude it didn't properly syntax-highlight as before in for example a .py file.
@consideRatio I would bet so! CI just finished and now i'm testing 4.5.1 (what we'll publish) locally. I'll run it behind Caddy and check syntax highlighting now. Thanks for mentioning it!
Everything appears to be working for me!
The same bug occurs on FreeBSD. Maybe due to that the '@parcel/watcher' package does not support FreeBSD.
Maybe due to that the '@parcel/watcher' package does not support FreeBSD.
Hmm...any ideas for ways we can fix that? Would it be worth raising upstream?
My problem was in configuration of flags in chrome, so i think that wasn't code-server bug.
That's helpful! Do you remember which flag it was?
That's helpful! Do you remember which flag it was?
If I remember correctly, something with canvas. I can check that in about 3 hours.