postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.81k stars 839 forks source link

VSCode Extension receiving unexpected responses #13107

Closed kferrone closed 6 days ago

kferrone commented 2 weeks ago

Is there an existing issue for this?

Describe the Issue

The vscode extension just stopped working one day. The error log looks like this:

(2024-08-29T15:07:59.011Z) [info] [extension] Extension activation started: 1724944079010
(2024-08-29T15:07:59.017Z) [info] [extension] Extension activation completed: 1724944079017
(2024-08-29T15:07:59.017Z) [info] [extension] Extension activation took 7ms
(2024-08-29T15:08:09.798Z) [info] [extension:sidebar:adapter] fetching a correct html for the view mode: {"viewMode":"sidebar"}
(2024-08-29T15:08:09.798Z) [info] [extension:htmlProvider] get sidebar HTML
(2024-08-29T15:08:09.825Z) [info] [extension:workspaceContext:networkClient] fetch recent workspaces: {"baseUrl":"https://bifrost-extension-https-global.gw.postman.com/ws/proxy"}
(2024-08-29T15:08:09.990Z) [error] [extension:workspaceContext:networkClient] the network call failed: {"context":"Failed to fetch recent workspaces"}
(2024-08-29T15:08:09.992Z) [error] [extension:workspaceContext:networkClient] parsing the response failed: {"error":{"issues":[{"code":"invalid_type","expected":"object","received":"string","path":[],"message":"Expected object, received string"}],"name":"ZodError"}}
(2024-08-29T15:08:09.992Z) [error] [extension:workspaceContext] Failed to fetch the recent workspace from the API: {"type":"OTHER","details":"Failed to fetch recent workspaces: received unexpected data from server"}
(2024-08-29T15:08:09.993Z) [error] [extension:workspaceContext] Failed to retrieve recent workspaces: {"type":"NETWORK_FAILURE","details":"Failed to fetch recent workspaces: received unexpected data from server"}

Steps To Reproduce

I just installed it and logged in. One day it just stopped working and giving the error above. Not sure how to reproduce other than hope I'm not the only one.

Screenshots or Videos

No response

Operating System

macOS

Postman Version

10.21.11

Postman Platform

Other

User Account Type

Signed In User

Additional Context?

The extension version: v1.2.1 vscode version: 1.92.2

pankajk07 commented 2 weeks ago

@kferrone Can you try setting the Http: Proxy Support to override in VS Code and retry logging in?

image
kferrone commented 6 days ago

Setting Proxy Support to Override did the trick. Thank you. It says override is the default but I had it set to On for some reason?

kferrone commented 5 days ago

@pankajk07

I found out why I had Proxy Support set to on. In one of my vscode workspaces I have the GCP extension. https://marketplace.visualstudio.com/items?itemName=GoogleCloudTools.cloudcode

This has a kubernetes explorer. I just got the reverse error now.

VS Code is overriding HTTP request options such as custom CA certificates set in the KubeConfig for this cluster. Please set 'http.proxySupport' in settings to either 'on' or 'off'. Note that you may need to restart VS Code for this setting change to take effect.
Cannot list namespaces: VS Code is overriding HTTP request options such as custom CA certificates set in the KubeConfig for this cluster. Please set 'http.proxySupport' in settings to either 'on' or 'off'. Note that you may need to restart VS Code for this setting change to take effect.. The Kubernetes Explorer will use the argocd namespace.

If I turn it on, I can use the Kubernetes explorer but not postman. If it set to override, Postman is fine but cloud code won't show kubernetes.

This just means Postman and the Google Cloud Code extensions don't like to be running together.

No issues for me, just letting you know. I usually use the Microsoft Kubernetes extension anyway which plays just fine with Postman.