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

[Bug]: Terminal is not working on Termux. #5496

Closed
4 tasks done
mayef opened this issue Aug 24, 2022 · 8 comments
Closed
4 tasks done

[Bug]: Terminal is not working on Termux. #5496

mayef opened this issue Aug 24, 2022 · 8 comments
Labels
bug Something isn't working os-android Android/Termux related upstream:vscode Needs to be fixed upstream in VSCode

Comments

@mayef
Copy link

mayef commented Aug 24, 2022

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Firefox 103.0.2 (64-bit)
  • Local OS: Windows 10 LTSC 21H2
  • Remote OS: Android 10, Termux 0.118.0, Node.js v16.16.0
  • Remote Architecture: aarch64
  • code-server --version: 4.6.0

Steps to Reproduce

  1. Install code-server@4.6.0 on Termux 0.118.0.
  2. Open Termux app, run code-server.
  3. Open a browser, login code-server, and open a terminal.

Expected

Something like this.

2022-08-24 105543

Actual

20220824104253

Logs

~/.../pictures/Screenshots $ code-server
[2022-08-24T02:34:11.738Z] info  code-server 4.6.0 6d3f9ca6a6df30a1bfad6f073f6fa33c0e63abdb
[2022-08-24T02:34:11.740Z] info  Using user-data-dir ~/.local/share/code-server
[2022-08-24T02:34:11.763Z] info  Using config file ~/.config/code-server/config.yaml
[2022-08-24T02:34:11.763Z] info  HTTP server listening on http://0.0.0.0:8080/ 
[2022-08-24T02:34:11.763Z] info    - Authentication is enabled
[2022-08-24T02:34:11.764Z] info      - Using password from ~/.config/code-server/config.yaml
[2022-08-24T02:34:11.764Z] info    - Not serving HTTPS 
[10:34:26] Extension host agent started.
[IPC Library: Pty Host] The factory function of "vs/platform/terminal/node/ptyHostMain" has thrown an exception
[IPC Library: Pty Host] Error: Platform not supported
    at D (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/platform/terminal/node/ptyHostMain.js:19:764)
    at E (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/platform/terminal/node/ptyHostMain.js:19:110)
    at new E (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/platform/terminal/node/ptyHostMain.js:19:1631)
    at Object.<anonymous> (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/platform/terminal/node/ptyHostMain.js:24:39279)
    at Function.o._safeInvokeFunction (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:5:1337)
    at Function.o._invokeFactory (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:5:1522)
    at o.complete (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:5:1801)
    at o._onModuleComplete (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:6:1112)
    at o._onModuleComplete (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:6:1358)
    at o._onModuleComplete (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:6:1358)
    at o._onModuleComplete (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:6:1358)
    at o._onModuleComplete (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:6:1358)
    at o._resolve (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:6:510)
    at o.defineModule (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:5:6144)
    at i (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10605)
    at Object.R (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:6:6093)
    at Function.o._safeInvokeFunction (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:5:1337)
    at Function.o._invokeFactory (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:5:1522)
    at o.complete (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:5:1801)
    at o._onModuleComplete (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:6:1112)
    at o._onModuleComplete (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:6:1358)
    at o._resolve (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:6:510)
    at o.defineModule (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:5:6144)
    at y (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:6:1825)
    at h (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:4:2554)
    at Object.<anonymous> (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/platform/terminal/node/ptyHostMain.nls.js:3:61)
    at e._createAndEvalScript (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:4:2598)
    at /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:4:2237
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
[IPC Library: Pty Host] Here are the modules that depend on it:
[IPC Library: Pty Host]% [ '===anonymous1===' ]
[10:34:27] Deleted from disk ms-toolsai.jupyter /data/data/com.termux/files/home/.local/share/code-server/extensions/ms-toolsai.jupyter-2022.5.1001610507
[IPC Library: Pty Host] Unknown channel: heartbeat
[IPC Library: Pty Host] Unknown channel: log
[IPC Library: Pty Host] Unknown channel: ptyHost
[IPC Library: Pty Host] Unknown channel: ptyHost
[IPC Library: Pty Host] Unknown channel: ptyHost
[IPC Library: Pty Host] Unknown channel: ptyHost
[IPC Library: Pty Host] Unknown channel: ptyHost
[IPC Library: Pty Host] Unknown channel: ptyHost
[IPC Library: Pty Host] Unknown channel: ptyHost
rejected promise not handled within 1 second: Unknown channel: Channel name 'log' timed out after 1000ms
[10:34:29] [Unknown channel: Channel name 'log' timed out after 1000ms]
[10:34:32] No ptyHost heartbeat after 6 seconds
[10:34:37] No ptyHost heartbeat after 12 seconds
[10:34:54] [100.120.35.17][ac715c7d][ManagementConnection] New connection established.
[10:34:55] [100.120.35.17][23fb10a3][ExtensionHostConnection] New connection established.
[10:34:55] [100.120.35.17][23fb10a3][ExtensionHostConnection] <28883> Launched Extension Host Process.
[IPC Library: Pty Host] Unknown channel: ptyHost
rejected promise not handled within 1 second: Unknown channel: Channel name 'ptyHost' timed out after 1000ms
[10:34:57] [Unknown channel: Channel name 'ptyHost' timed out after 1000ms]
[IPC Library: File Watcher] Loading "@parcel/watcher" failed
[IPC Library: File Watcher] Error: dlopen failed: cannot locate symbol "_ZTV17BruteForceBackend" referenced by "/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/@parcel/watcher/build/Release/watcher.node"...
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1189:18)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at load (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/node-gyp-build/index.js:22:10)
    at Object.<anonymous> (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/@parcel/watcher/index.js:1:42)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at r (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:5:101)
    at e.load (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:4:1720)
    at e.load (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11005)
    at a (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10302)
    at Object.errorback (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10423)
    at e.triggerErrorback (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11369)
    at /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11075
    at e.load (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:4:1737)
    at e.load (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:3:11005)
    at a (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10302)
    at o._loadModule (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:5:10432)
    at o._resolve (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:6:452)
    at o.defineModule (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:5:6144)
    at y (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:6:1825)
    at h (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:4:2554)
    at Object.<anonymous> (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/platform/files/node/watcher/watcherMain.js:14:32126)
    at Object.<anonymous> (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/platform/files/node/watcher/watcherMain.js:14:43638)
    at e._createAndEvalScript (/data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:4:2598)
    at /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/loader.js:4:2237
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
[IPC Library: File Watcher] Here are the modules that depend on it:
[IPC Library: File Watcher]% [ 'vs/platform/files/node/watcher/parcel/parcelWatcher' ]
[10:35:11] Using the in-memory credential store as the operating system's credential store could not be accessed. Please see https://aka.ms/vscode-server-keyring on how to set this up. Details: Cannot find module '../build/Release/keytar.node'
Require stack:
- /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/node_modules/keytar/lib/keytar.js
- /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/bootstrap-amd.js
- /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/out/node/util.js
- /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/out/node/cli.js
- /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/out/node/entry.js
[IPC Library: Pty Host] Unknown channel: ptyHost
[IPC Library: Pty Host] Unknown channel: ptyHost
rejected promise not handled within 1 second: Unknown channel: Channel name 'ptyHost' timed out after 1000ms
[10:35:18] [Unknown channel: Channel name 'ptyHost' timed out after 1000ms]
rejected promise not handled within 1 second: Unknown channel: Channel name 'ptyHost' timed out after 1000ms
[10:35:18] [Unknown channel: Channel name 'ptyHost' timed out after 1000ms]
[10:35:21] No ptyHost response to createProcess after 5 seconds

Screenshot/Video

codeserver

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

Terminal is fine on code-server@4.5.2.

@mayef mayef added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Aug 24, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented Aug 24, 2022

Hmm 🤔 What version of node are you using?

@jsjoeio jsjoeio added waiting-for-info Waiting for more information from submitter and removed bug Something isn't working triage This issue needs to be triaged by a maintainer labels Aug 24, 2022
@mayef
Copy link
Author

mayef commented Aug 25, 2022

Hmm 🤔 What version of node are you using?

v16.16.0

@jsjoeio jsjoeio added os-android Android/Termux related help-wanted needs-investigation This issue needs to be further investigated and removed waiting-for-info Waiting for more information from submitter labels Aug 25, 2022
@horanchikk
Copy link

same

@kawanakaiku
Copy link

kawanakaiku commented Sep 8, 2022

I managed to make the terminal work.
That error is due to process.platform returning android.

sed -i -e 's|switch(process.platform)|switch("linux")|' /data/data/com.termux/files/home/.config/yarn/global/node_modules/code-server/lib/vscode/out/vs/platform/terminal/node/ptyHostMain.js

@jsjoeio
Copy link
Contributor

jsjoeio commented Sep 8, 2022

@kawanakaiku wow, nice find! Do you think this is an upstream issue? I wonder if it can be reproduced with https://xtermjs.org/

@kawanakaiku
Copy link

kawanakaiku commented Sep 8, 2022

@jsjoeio Maybe not since the source https://github.com/microsoft/vscode/blob/main/src/vs/platform/environment/node/userDataPath.js hasn't changed for a year. For xtermjs, I couldn't find out any problems.
( Reading the source, just setting VSCODE_APPDATA variable would also solve the problem. )

@jsjoeio
Copy link
Contributor

jsjoeio commented Sep 8, 2022

Ah darn it. Well sounds like a code-server issue then. Thank you for looking!

@code-asher
Copy link
Member

Since that file is in https://github.com/microsoft/vscode we should try reporting and fixing there.

@code-asher code-asher closed this as not planned Won't fix, can't repro, duplicate, stale Jul 13, 2024
@code-asher code-asher added the upstream:vscode Needs to be fixed upstream in VSCode label Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working os-android Android/Termux related upstream:vscode Needs to be fixed upstream in VSCode
Projects
None yet
Development

No branches or pull requests

5 participants