termux-user-repository / tur

A place for all types of Termux packages.
Other
483 stars 87 forks source link

[Bug]: ms python extension not working on code-oss #1197

Open shaheen-coder opened 2 months ago

shaheen-coder commented 2 months ago

Problem description

the python extension not working ( stuck in loading loop)

What steps will reproduce the bug?

enabling python extension

code-oss :

1.90.0
89de5a8d4d6205e5b11647eb6a74844ca23d2573
arm64

python extension :

Python
v2024.14.1
ms-python

code-oss error log :

INFO Started local extension host with pid 31040.
workbench.desktop.main.js:sourcemap:655  INFO Started initializing default profile extensions in extensions installation folder. file:///data/data/com.termux/files/home/.vscode-oss/extensions
workbench.desktop.main.js:sourcemap:655  WARN Failed to create default profile extensions manifest in extensions installation folder. file:///data/data/com.termux/files/home/.vscode-oss/extensions Unable to create file 'vscode-userdata:/data/data/com.termux/files/home/.vscode-oss/extensions/extensions.json' that already exists when overwrite flag is not set
workbench.desktop.main.js:sourcemap:655  INFO Completed initializing default profile extensions in extensions installation folder. file:///data/data/com.termux/files/home/.vscode-oss/extensions
workbench.desktop.main.js:sourcemap:655  INFO [perf] Render performance baseline is 412ms
workbench.desktop.main.js:sourcemap:1265 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.
mountTo @ workbench.desktop.main.js:sourcemap:1265
workbench.desktop.main.js:sourcemap:1265 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.
mountTo @ workbench.desktop.main.js:sourcemap:1265
workbench.desktop.main.js:sourcemap:655   ERR Extension 'ms-python.debugpy CANNOT USE these API proposals 'portsAttributes, contribIssueReporter, debugVisualization'. You MUST start in extension development mode or use the --enable-proposed-api command line flag
workbench.desktop.main.js:sourcemap:655   ERR Extension 'ms-python.python CANNOT USE these API proposals 'contribEditorContentMenu, quickPickSortByLabel, testObserver, quickPickItemTooltip, terminalDataWriteEvent, terminalExecuteCommandEvent, contribIssueReporter'. You MUST start in extension development mode or use the --enable-proposed-api command line flag
workbench.desktop.main.js:sourcemap:655   ERR [ms-python.debugpy]: issue/reporter is a proposed menu identifier. It requires 'package.json#enabledApiProposals: ["contribIssueReporter"]' and is only available when running out of dev or with the following command line switch: --enable-proposed-api ms-python.debugpy
workbench.desktop.main.js:sourcemap:655   ERR [ms-python.python]: issue/reporter is a proposed menu identifier. It requires 'package.json#enabledApiProposals: ["contribIssueReporter"]' and is only available when running out of dev or with the following command line switch: --enable-proposed-api ms-python.python
workbench.desktop.main.js:sourcemap:655   ERR [ms-python.python]: editor/content is a proposed menu identifier. It requires 'package.json#enabledApiProposals: ["contribEditorContentMenu"]' and is only available when running out of dev or with the following command line switch: --enable-proposed-api ms-python.python
workbench.desktop.main.js:sourcemap:655   ERR spawn /data/data/com.termux/files/home/.vscode-oss/extensions/ms-python.python-2024.14.0-universal/python-env-tools/bin/pet ENOENT: Error: spawn /data/data/com.termux/files/home/.vscode-oss/extensions/ms-python.python-2024.14.0-universal/python-env-tools/bin/pet ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
workbench.desktop.main.js:sourcemap:802 Extension activation failed, run the 'Developer: Toggle Developer Tools' command for more information.
c @ workbench.desktop.main.js:sourcemap:802
workbench.desktop.main.js:sourcemap:1847 Activating extension 'ms-python.python' failed: Extension 'ms-python.python' CANNOT use API proposal: terminalShellIntegration.
Its package.json#enabledApiProposals-property declares:  but NOT terminalShellIntegration.
 The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ms-python.python.
$onExtensionActivationError @ workbench.desktop.main.js:sourcemap:1847
workbench.desktop.main.js:sourcemap:1847 Cannot activate the 'Python Debugger' extension because its dependency 'Python' failed to activate
$onExtensionActivationError @ workbench.desktop.main.js:sourcemap:1847
workbench.desktop.main.js:sourcemap:138 [Extension Host] rejected promise not handled within 1 second: Error: Extension 'ms-python.python' CANNOT use API proposal: testObserver.
Its package.json#enabledApiProposals-property declares:  but NOT testObserver.
 The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ms-python.python (at console.<anonymous> (/data/data/com.termux/files/usr/lib/code-oss/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:143:63006))
C @ workbench.desktop.main.js:sourcemap:138
workbench.desktop.main.js:sourcemap:138 [Extension Host] stack trace: Error: Extension 'ms-python.python' CANNOT use API proposal: testObserver.
Its package.json#enabledApiProposals-property declares:  but NOT testObserver.
 The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ms-python.python
    at P (/data/data/com.termux/files/usr/lib/code-oss/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:141:57957)
    at get testResults (/data/data/com.termux/files/usr/lib/code-oss/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:163:25120)
    at C.activate (/data/data/com.termux/files/home/.vscode-oss/extensions/ms-python.python-2024.14.0-universal/out/client/extension.js:2:938870)
    at /data/data/com.termux/files/home/.vscode-oss/extensions/ms-python.python-2024.14.0-universal/out/client/extension.js:2:2457
    at Array.map (<anonymous>)
    at v.activateWorkspace (/data/data/com.termux/files/home/.vscode-oss/extensions/ms-python.python-2024.14.0-universal/out/client/extension.js:2:2447) (at console.<anonymous> (/data/data/com.termux/files/usr/lib/code-oss/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:143:63006))
C @ workbench.desktop.main.js:sourcemap:138
workbench.desktop.main.js:sourcemap:1847 [ms-python.python]Extension 'ms-python.python' CANNOT use API proposal: testObserver.
Its package.json#enabledApiProposals-property declares:  but NOT testObserver.
 The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ms-python.python
$onExtensionRuntimeError @ workbench.desktop.main.js:sourcemap:1847
workbench.desktop.main.js:sourcemap:1847 Error: Extension 'ms-python.python' CANNOT use API proposal: testObserver.
Its package.json#enabledApiProposals-property declares:  but NOT testObserver.
 The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ms-python.python
    at P (vscode-file://vscode-app/data/data/com.termux/files/usr/lib/code-oss/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:141:57957)
    at get testResults (vscode-file://vscode-app/data/data/com.termux/files/usr/lib/code-oss/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:163:25120)
    at C.activate (vscode-file://vscode-app/data/data/com.termux/files/home/.vscode-oss/extensions/ms-python.python-2024.14.0-universal/out/client/extension.js:2:938870)
    at vscode-file://vscode-app/data/data/com.termux/files/home/.vscode-oss/extensions/ms-python.python-2024.14.0-universal/out/client/extension.js:2:2457
    at Array.map (<anonymous>)
    at v.activateWorkspace (vscode-file://vscode-app/data/data/com.termux/files/home/.vscode-oss/extensions/ms-python.python-2024.14.0-universal/out/client/extension.js:2:2447)
$onExtensionRuntimeError @ workbench.desktop.main.js:sourcemap:1847

What is the expected behavior?

No response

System information

termux-info:

Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=29588
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages-cf.termux.dev/apt/termux-main stable main
# sources.list.d/pointless.list
deb https://its-pointless.github.io/files/21 termux extras
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
# x11-repo (sources.list.d/x11.list)
deb https://packages-cf.termux.dev/apt/termux-x11 x11 main
termux-tools version:
1.42.2
Android version:
12
Kernel build information:
Linux localhost 4.19.191-perf-01022-gec293e668c0c #1 SMP PREEMPT Fri Mar 10 18:54:33 CST 2023 aarch64 Android
Device manufacturer:
Xiaomi
Device model:
22120RN86G
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.api versionCode:51
com.termux.x11 versionCode:14
813ethan commented 2 months ago

try enable proposed api for the package in .vscode-oss/argv.json

if fail also add "terminalShellIntegration" in the "enabledApiProposals" bracket in the corresponding package's package.json

shaheen-coder commented 2 months ago

Still not working 😭 It's throwing error like #enabledApiProposals-property declares: but NOT terminalShellIntegration and testObserver

licy183 commented 3 days ago

It can't be fixed by TUR. It is illegal to patch product.json, see https://wiki.archlinux.org/title/Visual_Studio_Code#Extensions_support.

Try steps in https://github.com/microsoft/vscode-python/issues/24013