postman-app-support icon indicating copy to clipboard operation
postman-app-support copied to clipboard

Vscode Extension Postman Error

Open muhammedfurkan opened this issue 1 year ago • 14 comments

Is there an existing issue for this?

  • [X] I have searched the tracker for existing similar issues and I know that duplicates will be closed

Describe the Issue

I cannot use this plugin on VsCode.

The problem I encounter is that when I log in to my postman account, I cannot retrieve the data and postman does not work. I am attaching the relevant logs in the attachment.

(2024-05-29T18:37:00.721Z) [info] [extension] Extension activation completed: 1717007820721
(2024-05-29T18:37:00.721Z) [info] [extension] Extension activation took 29ms
(2024-05-29T18:37:20.463Z) [info] [extension] Extension activation started: 1717007840458
(2024-05-29T18:37:20.512Z) [info] [extension] Extension activation completed: 1717007840512
(2024-05-29T18:37:20.512Z) [info] [extension] Extension activation took 54ms
(2024-05-29T18:38:06.503Z) [info] [extension] Extension activation started: 1717007886497
(2024-05-29T18:38:06.554Z) [info] [extension] Extension activation completed: 1717007886554
(2024-05-29T18:38:06.554Z) [info] [extension] Extension activation took 57ms
(2024-05-29T19:33:18.691Z) [info] [extension] Extension activation started: 1717011198686
(2024-05-29T19:33:18.746Z) [info] [extension] Extension activation completed: 1717011198746
(2024-05-29T19:33:18.746Z) [info] [extension] Extension activation took 60ms
(2024-05-29T19:34:27.598Z) [info] [extension] Extension activation started: 1717011267592
(2024-05-29T19:34:27.620Z) [info] [extension] Extension activation completed: 1717011267620
(2024-05-29T19:34:27.620Z) [info] [extension] Extension activation took 28ms
(2024-05-29T19:34:53.050Z) [info] [extension] Extension activation started: 1717011293044
(2024-05-29T19:34:53.105Z) [info] [extension] Extension activation completed: 1717011293105
(2024-05-29T19:34:53.105Z) [info] [extension] Extension activation took 61ms
(2024-05-29T19:39:36.769Z) [info] [extension] Extension activation started: 1717011576764
(2024-05-29T19:39:36.794Z) [info] [extension] Extension activation completed: 1717011576794
(2024-05-29T19:39:36.794Z) [info] [extension] Extension activation took 30ms
(2024-05-29T19:39:42.133Z) [info] [extension:sidebar:adapter] fetching a correct html for the view mode: {"viewMode":"sidebar"}
(2024-05-29T19:39:42.133Z) [info] [extension:htmlProvider] get sidebar HTML
(2024-05-29T19:39:42.142Z) [info] [extension:workspaceContext:networkClient] fetch recent workspaces: {"baseUrl":"https://bifrost-extension-https-global.gw.postman.com/ws/proxy"}
(2024-05-29T19:39:42.515Z) [error] [extension:workspaceContext:networkClient] the network call failed: {"context":"Failed to fetch recent workspaces"}
(2024-05-29T19:39:42.520Z) [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-05-29T19:39:42.522Z) [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-05-29T19:39:42.523Z) [error] [extension:workspaceContext] Failed to retrieve recent workspaces: {"type":"NETWORK_FAILURE","details":"Failed to fetch recent workspaces: received unexpected data from server"}
(2024-05-29T19:39:48.045Z) [info] [extension:secretManager] Removing the account data
(2024-05-29T19:39:48.049Z) [info] [extension:globalStateManager] clearing storage
(2024-05-29T19:39:48.051Z) [info] [extension:sidebar:manager] setting the view to login app
(2024-05-29T19:39:48.051Z) [info] [extension:sidebar:adapter] fetching a correct html for the view mode: {"viewMode":"login"}
(2024-05-29T19:39:50.857Z) [info] [extension:sidebar:manager] set login state to busy
(2024-05-29T19:39:50.858Z) [info] [extension:auth] Starting the login flow
(2024-05-29T19:40:04.101Z) [info] [extension:auth] Handing the URL redirect to VSCode
(2024-05-29T19:40:04.102Z) [info] [extension:auth:client] finalising the auth handover
(2024-05-29T19:40:04.748Z) [info] [extension:auth] The sign in flow has finished successfully
(2024-05-29T19:40:04.756Z) [info] [extension:sidebar:manager] setting the view to sidebar app
(2024-05-29T19:40:04.756Z) [info] [extension:sidebar:adapter] fetching a correct html for the view mode: {"viewMode":"sidebar"}
(2024-05-29T19:40:04.756Z) [info] [extension:htmlProvider] get sidebar HTML
(2024-05-29T19:40:04.761Z) [info] [extension:workspaceContext:networkClient] fetch recent workspaces: {"baseUrl":"https://bifrost-extension-https-global.gw.postman.com/ws/proxy"}
(2024-05-29T19:40:05.073Z) [error] [extension:workspaceContext:networkClient] the network call failed: {"context":"Failed to fetch recent workspaces"}
(2024-05-29T19:40:05.075Z) [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-05-29T19:40:05.076Z) [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-05-29T19:40:05.077Z) [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

(2024-05-29T18:37:00.697Z) [info] [extension] Extension activation started: 1717007820692
(2024-05-29T18:37:00.721Z) [info] [extension] Extension activation completed: 1717007820721
(2024-05-29T18:37:00.721Z) [info] [extension] Extension activation took 29ms
(2024-05-29T18:37:20.463Z) [info] [extension] Extension activation started: 1717007840458
(2024-05-29T18:37:20.512Z) [info] [extension] Extension activation completed: 1717007840512
(2024-05-29T18:37:20.512Z) [info] [extension] Extension activation took 54ms
(2024-05-29T18:38:06.503Z) [info] [extension] Extension activation started: 1717007886497
(2024-05-29T18:38:06.554Z) [info] [extension] Extension activation completed: 1717007886554
(2024-05-29T18:38:06.554Z) [info] [extension] Extension activation took 57ms
(2024-05-29T19:33:18.691Z) [info] [extension] Extension activation started: 1717011198686
(2024-05-29T19:33:18.746Z) [info] [extension] Extension activation completed: 1717011198746
(2024-05-29T19:33:18.746Z) [info] [extension] Extension activation took 60ms
(2024-05-29T19:34:27.598Z) [info] [extension] Extension activation started: 1717011267592
(2024-05-29T19:34:27.620Z) [info] [extension] Extension activation completed: 1717011267620
(2024-05-29T19:34:27.620Z) [info] [extension] Extension activation took 28ms
(2024-05-29T19:34:53.050Z) [info] [extension] Extension activation started: 1717011293044
(2024-05-29T19:34:53.105Z) [info] [extension] Extension activation completed: 1717011293105
(2024-05-29T19:34:53.105Z) [info] [extension] Extension activation took 61ms
(2024-05-29T19:39:36.769Z) [info] [extension] Extension activation started: 1717011576764
(2024-05-29T19:39:36.794Z) [info] [extension] Extension activation completed: 1717011576794
(2024-05-29T19:39:36.794Z) [info] [extension] Extension activation took 30ms
(2024-05-29T19:39:42.133Z) [info] [extension:sidebar:adapter] fetching a correct html for the view mode: {"viewMode":"sidebar"}
(2024-05-29T19:39:42.133Z) [info] [extension:htmlProvider] get sidebar HTML
(2024-05-29T19:39:42.142Z) [info] [extension:workspaceContext:networkClient] fetch recent workspaces: {"baseUrl":"https://bifrost-extension-https-global.gw.postman.com/ws/proxy"}
(2024-05-29T19:39:42.515Z) [error] [extension:workspaceContext:networkClient] the network call failed: {"context":"Failed to fetch recent workspaces"}
(2024-05-29T19:39:42.520Z) [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-05-29T19:39:42.522Z) [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-05-29T19:39:42.523Z) [error] [extension:workspaceContext] Failed to retrieve recent workspaces: {"type":"NETWORK_FAILURE","details":"Failed to fetch recent workspaces: received unexpected data from server"}
(2024-05-29T19:39:48.045Z) [info] [extension:secretManager] Removing the account data
(2024-05-29T19:39:48.049Z) [info] [extension:globalStateManager] clearing storage
(2024-05-29T19:39:48.051Z) [info] [extension:sidebar:manager] setting the view to login app
(2024-05-29T19:39:48.051Z) [info] [extension:sidebar:adapter] fetching a correct html for the view mode: {"viewMode":"login"}
(2024-05-29T19:39:50.857Z) [info] [extension:sidebar:manager] set login state to busy
(2024-05-29T19:39:50.858Z) [info] [extension:auth] Starting the login flow
(2024-05-29T19:40:04.101Z) [info] [extension:auth] Handing the URL redirect to VSCode
(2024-05-29T19:40:04.102Z) [info] [extension:auth:client] finalising the auth handover
(2024-05-29T19:40:04.748Z) [info] [extension:auth] The sign in flow has finished successfully
(2024-05-29T19:40:04.756Z) [info] [extension:sidebar:manager] setting the view to sidebar app
(2024-05-29T19:40:04.756Z) [info] [extension:sidebar:adapter] fetching a correct html for the view mode: {"viewMode":"sidebar"}
(2024-05-29T19:40:04.756Z) [info] [extension:htmlProvider] get sidebar HTML
(2024-05-29T19:40:04.761Z) [info] [extension:workspaceContext:networkClient] fetch recent workspaces: {"baseUrl":"https://bifrost-extension-https-global.gw.postman.com/ws/proxy"}
(2024-05-29T19:40:05.073Z) [error] [extension:workspaceContext:networkClient] the network call failed: {"context":"Failed to fetch recent workspaces"}
(2024-05-29T19:40:05.075Z) [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-05-29T19:40:05.076Z) [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-05-29T19:40:05.077Z) [error] [extension:workspaceContext] Failed to retrieve recent workspaces: {"type":"NETWORK_FAILURE","details":"Failed to fetch recent workspaces: received unexpected data from server"}


### Screenshots or Videos

![image](https://github.com/postmanlabs/postman-app-support/assets/9547040/9d95277e-9d97-440a-99f3-8afb6918e549)


### Operating System

macOS

### Postman Version

1.0.3

### Postman Platform

Other

### User Account Type

Signed In User

### Additional Context?

_No response_

muhammedfurkan avatar May 29 '24 19:05 muhammedfurkan

Similar issue here

oluwatobiiloba avatar Jun 16 '24 21:06 oluwatobiiloba

I had the same problem. Disable your extension, restart extensions and reenable it. Now I can see my Workspaces. Hope it helps.

moonbyt3 avatar Jun 23 '24 13:06 moonbyt3

I have the same issue. I tried to suggested solution, with no success. What could be the reason for this error? I'm using a full dual stack internet connection and authenticate to Postman with a Google account.

ethaden avatar Jul 01 '24 16:07 ethaden

@ethaden Can you please share the extension log files?

You can access the log files from here.

image

pankajk07 avatar Jul 02 '24 10:07 pankajk07

@ethaden Can you please remove the access token from the log files and re-upload them?

pankajk07 avatar Jul 02 '24 11:07 pankajk07

Thank you for telling me about this stupid mistake. Let me try again.

I logged out, then reset the log file. Than I logged in successfully using my Google account. I saw some error messages in the log file after that (see attachment). But the widget of the postman extension remained empty.

postman-for-vscode-prod.log

ethaden avatar Jul 02 '24 11:07 ethaden

@ethaden Thanks for the log files. Can you also share a screenshot or a screen recording of the same? Also, are you accessing VS Code behind a proxy?

pankajk07 avatar Jul 02 '24 11:07 pankajk07

What kind of screenshots do you need? First, I see the regular login window of the extension. I'm then redirected via browser to the login page where I choose my team, after that I'm redirected to VS Code and just see the completely empty Postman widget (only the controls on top are visible). There wouldn't be much to see on these screenshots, I guess.

There is no proxy configured in neither VS Code nor the OS (Mac OSX).

ethaden avatar Jul 02 '24 11:07 ethaden

@ethaden Can we connect for a 30-minute call, so that we can understand and triage the issue? Please use my scheduling link to setup some time, if possible. https://scheduler.zoom.us/pankaj-khandelwal/postman-vs-code-extension-issue-triage

pankajk07 avatar Jul 02 '24 12:07 pankajk07

Sure, we just need to a find suitable time slot.

I tested the following so far, without success:

  1. I used a different OS (Windows 11, latest patches) with the latest version of VS Code and the addon: Same error
  2. I created a test user account with a completely different email address/username and an empty workspace: Same error
  3. I disabled IPv6 on the Windows machine (usually I have a full dual stack with IPv4 behind a NAT router and native IPv6 address for each individual machine): Same error.

ethaden avatar Jul 02 '24 16:07 ethaden

I did some further testing where I used a different internet connection (using a mobile phone, IPv6 + IPv4 with carrier-grade NAT) and tried to use the extension on a Windows machine. Same error. I guess it is not a network issue.

@pankajk07, we can schedule a call if you like. Can you please send a new invitation? Thank you!

ethaden avatar Jul 23 '24 10:07 ethaden

It says the problem right there:

(2024-05-29T19:39:42.520Z) [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"
    }
}

rwibawa avatar Jul 30 '24 09:07 rwibawa

It says the problem right there:

(2024-05-29T19:39:42.520Z) [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"
    }
}

True, I have also seen that. Unfortuntaley, it is impossible for me to further debug this without access to the source code. And to be honest, I have no practical experiences regarding debugging VS Code extensions. I'm just wondering if I'm the only person in the world having that issue? If so, what is different in all the Postman accounts (Google login, username+password) I've tested while trying to identify the root cause? Or are their issues with my network settings (tested multiple), OS (tested Mac OS and Windows) language preferences (tested English and German), geo location (Germany)?

ethaden avatar Jul 30 '24 10:07 ethaden

@ethaden Can you please share a suitable timing to connect regarding this issue?

postman-ide avatar Jul 30 '24 10:07 postman-ide

I found the reason for the strange behavior and it's a bit weird and - well - awkward.

Let's start with the "weird" part: In my settings, I had disabled HTTP Proxy Support globally. In the past, I faced issues with some other extensions. I changed the setting back to "override" and the Postman extension started to work properly. From the logs I know that the extension uses a kind of proxy, namely "https://bifrost-extension-https-global.gw.postman.com/ws/proxy" as baseUrl for REST calls. However, I would never consider this as a proxy in the general sense. Actually, at my previous employer access to the internet would only be possible from the internal network through an HTTP/HTTPS proxy configured OS-wide or in VS Code. Would the VS Code Postman extension work in this setup? I doubt it, as it would "override" the proxy setting and try to access the "bifrost" proxy directly instead of using the system-wide proxy for that. I might be wrong here, but you might want to change the way you use your REST proxy such that it is not considered to be a "proxy" affected by the VS code proxy setting anymore.

For the "awkward" part: My VS Code instances are configured to synchronize settings. So no matter where I tested the extension, I saw the same strange behavior. It's actually truly platform indepedent! Usually, this is a desired property, but here it caused some interesting and very unexpected debugging problems. :-)

ethaden avatar Aug 01 '24 08:08 ethaden

I found the reason for the strange behavior and it's a bit weird and - well - awkward.

Let's start with the "weird" part: In my settings, I had disabled HTTP Proxy Support globally. In the past, I faced issues with some other extensions. I changed the setting back to "override" and the Postman extension started to work properly. From the logs I know that the extension uses a kind of proxy, namely "https://bifrost-extension-https-global.gw.postman.com/ws/proxy" as baseUrl for REST calls. However, I would never consider this as a proxy in the general sense. Actually, at my previous employer access to the internet would only be possible from the internal network through an HTTP/HTTPS proxy configured OS-wide or in VS Code. Would the VS Code Postman extension work in this setup? I doubt it, as it would "override" the proxy setting and try to access the "bifrost" proxy directly instead of using the system-wide proxy for that. I might be wrong here, but you might want to change the way you use your REST proxy such that it is not considered to be a "proxy" affected by the VS code proxy setting anymore.

For the "awkward" part: My VS Code instances are configured to synchronize settings. So no matter where I tested the extension, I saw the same strange behavior. It's actually truly platform indepedent! Usually, this is a desired property, but here it caused some interesting and very unexpected debugging problems. :-)

Yes, I confirm that set the Proxy Support to "override" resolved the issue: image

rwibawa avatar Aug 01 '24 19:08 rwibawa

I found the reason for the strange behavior and it's a bit weird and - well - awkward.

Let's start with the "weird" part: In my settings, I had disabled HTTP Proxy Support globally. In the past, I faced issues with some other extensions. I changed the setting back to "override" and the Postman extension started to work properly. From the logs I know that the extension uses a kind of proxy, namely "https://bifrost-extension-https-global.gw.postman.com/ws/proxy" as baseUrl for REST calls. However, I would never consider this as a proxy in the general sense. Actually, at my previous employer access to the internet would only be possible from the internal network through an HTTP/HTTPS proxy configured OS-wide or in VS Code. Would the VS Code Postman extension work in this setup? I doubt it, as it would "override" the proxy setting and try to access the "bifrost" proxy directly instead of using the system-wide proxy for that. I might be wrong here, but you might want to change the way you use your REST proxy such that it is not considered to be a "proxy" affected by the VS code proxy setting anymore.

For the "awkward" part: My VS Code instances are configured to synchronize settings. So no matter where I tested the extension, I saw the same strange behavior. It's actually truly platform indepedent! Usually, this is a desired property, but here it caused some interesting and very unexpected debugging problems. :-)

I can affirm that setting the HTTP Proxy Support to override works.

oluwatobiiloba avatar Aug 01 '24 19:08 oluwatobiiloba

I found the reason for the strange behavior and it's a bit weird and - well - awkward. Let's start with the "weird" part: In my settings, I had disabled HTTP Proxy Support globally. In the past, I faced issues with some other extensions. I changed the setting back to "override" and the Postman extension started to work properly. From the logs I know that the extension uses a kind of proxy, namely "https://bifrost-extension-https-global.gw.postman.com/ws/proxy" as baseUrl for REST calls. However, I would never consider this as a proxy in the general sense. Actually, at my previous employer access to the internet would only be possible from the internal network through an HTTP/HTTPS proxy configured OS-wide or in VS Code. Would the VS Code Postman extension work in this setup? I doubt it, as it would "override" the proxy setting and try to access the "bifrost" proxy directly instead of using the system-wide proxy for that. I might be wrong here, but you might want to change the way you use your REST proxy such that it is not considered to be a "proxy" affected by the VS code proxy setting anymore. For the "awkward" part: My VS Code instances are configured to synchronize settings. So no matter where I tested the extension, I saw the same strange behavior. It's actually truly platform indepedent! Usually, this is a desired property, but here it caused some interesting and very unexpected debugging problems. :-)

I can affirm that setting the HTTP Proxy Support to override works.

yes, me too

YMingF avatar Nov 28 '24 06:11 YMingF

yes, by setting the "HTTP Proxy Support" setting to "override" resolved the issue. Thanks.

23f1001675 avatar Aug 12 '25 16:08 23f1001675