zowe / zowe-explorer-vscode

Visual Studio Code Extension for Zowe, which lets users interact with z/OS Data Sets, Unix System Services, and Jobs on a remote mainframe instance. Powered by Zowe SDKs.
Eclipse Public License 2.0
173 stars 92 forks source link

Can't connect to mainframe in Theia #2095

Closed t1m0thyj closed 1 year ago

t1m0thyj commented 1 year ago

Describe the bug

In Theia 1.33.0, attempts to connect to mainframe with ZE result in this error: "Failed to establish a socket connection to proxies"

To Reproduce

  1. Start Theia in a Docker container: docker run -it --init --name theia -p 3000:3000 t1m0thyj/theia-alpine
  2. Copy ZE VSIX into the container: docker cp dist/vscode-extension-for-zowe-2.6.0-SNAPSHOT.vsix theia:/home/theia/plugins
  3. Go to Theia (http://localhost:3000) and install ZE from VSIX
  4. Open Zowe Explorer panel and add a new profile
  5. Try to search for data sets and see the error in the screenshot below

Expected behavior

Should be able to search for data sets as long as the profile contains valid connection info.

Screenshots

image

Desktop (please complete the following information):

Additional context

This is likely caused by a bug in Theia: https://github.com/eclipse-theia/theia/issues/11911 Perhaps we can comment on that issue to provide additional info. Also, a workaround may be to downgrade to an older version of Theia.

Interestingly, Zowe CLI successfully connects to the mainframe in the Theia terminal with these commands:

mkdir test && cd test && npm init -y && npm install @zowe/cli
npx zowe files ls ds SYS1.PARMLIB
github-actions[bot] commented 1 year ago

Thank you for creating a bug report. If you haven't already, please ensure you have provided steps to reproduce it and as much context as possible.

t1m0thyj commented 1 year ago

Confirmed this seems to be a Theia bug, and left a comment on the linked Theia issue.

Until it is fixed, a workaround is to set http.proxySupport to off: image

t1m0thyj commented 1 year ago

@anaxceron Can we add this to the list of ZE known issues here?

Theia Mainframe Connection Error

Symptom:

When performing any action that requires a mainframe connection like searching for data sets you see a proxy error.

Sample message:

"z/OSMF REST API Error" that includes Failed to establish a socket connection to proxies

image

Solution:

In Theia settings, search for "proxy" and change the http.proxySupport setting to off: image

anaxceron commented 1 year ago

Added this as a known issue to the Known Zowe Explorer Issues article w/ PR 2777