Skip to content

Postman in VSCode doesn't format JSON correctly. #13230

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

Closed
1 task done
RichardYusteDAW opened this issue Oct 31, 2024 · 49 comments
Closed
1 task done

Postman in VSCode doesn't format JSON correctly. #13230

RichardYusteDAW opened this issue Oct 31, 2024 · 49 comments
Assignees

Comments

@RichardYusteDAW
Copy link

Is there an existing issue for this?

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

Describe the Issue

I press the pretty option, but it doesn't format the line breaks correctly.

VSCode 1.95

Steps To Reproduce

  1. press the pretty option

Screenshots or Videos

Captura

Operating System

Windows

Postman Version

1.3

Postman Platform

Other

User Account Type

Signed In User

Additional Context?

No response

@RichardYusteDAW RichardYusteDAW changed the title Postman in VSCode doesn't format JSON correctly." Postman in VSCode doesn't format JSON correctly. Oct 31, 2024
@chemargar
Copy link

Richard, Do you have a temporal solution to this issue? I tried to change to a lower version of this extension but It doesn't work

@sarah-gelt
Copy link

+1 same issue here

image

VSCode details

Version: 1.95.0 (Universal)
Commit: 912bb683695358a54ae0c670461738984cbb5b95
Date: 2024-10-28T20:16:24.561Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Darwin arm64 23.6.0

Postman plugin details
image

@eroSilva
Copy link

+1 same issue here

VSCode details

Version: 1.95.0 (Universal)
Commit: 912bb683695358a54ae0c670461738984cbb5b95
Date: 2024-10-28T20:16:24.561Z (2 days ago)
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Darwin arm64 23.6.0

Postman extension version:
v1.3.0

@bordom
Copy link

bordom commented Nov 1, 2024

+1 same issue here

Postman extension version:
v1.3.0

Running on macOS 14.7
with VSCode:

Version: 1.95.1
Commit: 65edc4939843c90c34d61f4ce11704f09d3e5cb6
Date: 2024-10-31T05:14:54.222Z (1 day ago)
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Darwin arm64 23.6.0

Also it might be worth mentioning that subsequent REST calls do not update the response in the "Pretty" view.
Only the "Raw" view is updated with the new response data.

@kakhagh
Copy link

kakhagh commented Nov 1, 2024

same here

Version: 1.95.1
Commit: 65edc4939843c90c34d61f4ce11704f09d3e5cb6
Date: 2024-10-31T05:14:54.222Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Linux x64 5.15.0-124-generic

however response from https://postman-echo.com/get?a=1&b=2 is formatted....

@duwejeferson
Copy link

Same here, Win 11 with WSL

Version: 1.95.1 (system setup)
Commit: 65edc4939843c90c34d61f4ce11704f09d3e5cb6
Date: 2024-10-31T05:14:54.222Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22631

@Dev-wonderful
Copy link

The temporary solution to this as highlighted in issue #13231 is to downgrade your VS Code version to 1.94.2, I haven't tried it but it works for the person

@DebbieB1
Copy link

DebbieB1 commented Nov 1, 2024

Same. Seems like this is a recent issue. I thought I'd clicked a formatting button somewhere and messed things up.

Version: 1.95.1 (user setup)
Commit: 65edc4939843c90c34d61f4ce11704f09d3e5cb6
Date: 2024-10-31T05:14:54.222Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.19045

@Salty-Sailor
Copy link

Due to VSCode being upgraded to version 1.95.1, my current workaround is to downgrade back to 1.94.2. Waiting for the official fix for this bug :)

@jaysonsosweet
Copy link

Annnnnnnnnnd.... same here.

@Bejjoeqq
Copy link

Bejjoeqq commented Nov 5, 2024

Same here :)

@divergent-synapse
Copy link

Oh, I thought I messed up a setting. Same issue here!

@DebbieB1
Copy link

DebbieB1 commented Nov 5, 2024

Yeah, I wasted a good bit of time trying to figure out what I'd done wrong. Rolling back to 1.94.2 has me working for now.

Has anyone seen an ETA on this fix? I'm not sure if I want to turn off automatic updates for now or not so that I don't have to keep rolling back.

@juliboron
Copy link

+1

@pankajk07
Copy link
Member

Hey folks, the issue seems to be in the underlying chrome of the latest version (1.95.1) of VSCode. We have raised the problem with the VSCode team in here and await their response.

As of now the only possible way to mitigate this is to downgrade your VS Code to an older version like v1.94.2.
We are actively tracking this issue and will update here if there is any development.

@ibrahim-sma
Copy link

Currently I am observing 2 issues in my POSTMAN in VS Code APP. Looks like both has open issues
Issue1: Response body pretty option is not working (Existing Issue #13230 )
Issue2: Glitch in Response received. Same as #13215
Postman always displays the older response, instead of current one.
Steps to Repro Issue2:

  • Perform a new Request in VScode. Current State: Request1, Response1
  • Perform another request in VSCode for same resource. Current State: Request2, Response1
  • Now switch tabs in response body and check the response. Current State: Request2, Response2
    Description:
    When multiple requests on performed on the same resource, the response is always of the (n-1)th request.

@pankajk07
Copy link
Member

Update: The VS Code team has recommended launching the VSCode instance by executing the following command.

code --disable-features=PlzDedicatedWorker

Currently, this is the mitigation step for this issue.
The VS Code team has added the issue to their November milestone and hopefully will be fixed in the next release

@ibrahim-sma
Copy link

ibrahim-sma commented Nov 6, 2024

Update: The VS Code team has recommended launching the VSCode instance by executing the following command.

code --disable-features=PlzDedicatedWorker

Currently, this is the mitigation step for this issue. The VS Code team has added the issue to their November milestone and hopefully will be fixed in the next release

Thanks @pankajk07 After using this workaround both the issues got resolved #13215 #13230

@parth-fundrev
Copy link

same issue here

@DSchau DSchau unpinned this issue Nov 8, 2024
@seanodaniels
Copy link

seanodaniels commented Nov 19, 2024

@seanodaniels how did you get it to work?

I'm running from terminal in the correct directory: .\Code.exe --disable-features=PlzDedicatedWorker

but it's still showing the output bad formatted

Which version of the extension are you using?

I am using Postman extension v1.4.1.

FWIW, I am on Windows and this is what I did.

  • Create a Windows desktop shortcut for VS Code
  • Right click on the shortcut and choose Properties
  • In the resulting window, enter this into the "Target" field:

"C:\Users\sodan\AppData\Local\Programs\Microsoft VS Code\Code.exe" --disable-features=PlzDedicatedWorker

YMMV.

@lAmirshahinxl
Copy link

same here
I know it reason (It for new vs code version)
I still waiting for new postman release to it automatically fix

@akiraacs
Copy link

Same error for me.

Version: 1.95.3 (user setup)
Commit: f1a4fb101478ce6ec82fe9627c43efbf9e98c813
Date: 2024-11-13T14:50:04.152Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.19045

@GianniCodato-PixartPrinting

Same problem here.
Thank you for the workaround
Looking forward to here news about a fix

@gilbertomarcano
Copy link

Same error here. Workaround didn't work.

@WorkHardes
Copy link

same issue for me on code version 1.95.3 on arch linux

@uzbeki
Copy link

uzbeki commented Nov 25, 2024

any progress?
VSCode version 1.95.3
Windows 11 x64

@Perdolique
Copy link

Perdolique commented Nov 25, 2024

Doesn't work in

Postman 1.4.1
VSCode 1.95.3

@AdaoNatalino
Copy link

Same thing, workaround doesn't work for me.

@sonht1109
Copy link

Also, did u guys get issue like, the body response still keep showing the previous result when we choose "Pretty" tab? I mean it didnt show the latest result of api regardless of multiple API calling times.

Screen.Recording.2024-11-28.at.10.22.43.mov

@pankajk07
Copy link
Member

Also, did u guys get issue like, the body response still keep showing the previous result when we choose "Pretty" tab? I mean it didnt show the latest result of api regardless of multiple API calling times.

Screen.Recording.2024-11-28.at.10.22.43.mov

@sonht1109 That is another side-effect of the underlying VS Code changes that caused the issue mentioned in here.

@itsjasur
Copy link

Any update?

@Perdolique
Copy link

Perdolique commented Dec 2, 2024

Postman extension v1.5.0 still has this issue.

@pknrs
Copy link

pknrs commented Dec 3, 2024

Still not working as of now, --disable-features=PlzDedicatedWorker workaround works perfectly.

@farissmechbal
Copy link

Same here.
Postman extension v1.5.0
Version: 1.95.3
Commit: f1a4fb101478ce6ec82fe9627c43efbf9e98c813
Date: 2024-11-13T14:50:04.152Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.1.0

@markvu2607
Copy link

same here.

@abmenzel
Copy link

abmenzel commented Dec 6, 2024

+1

1 similar comment
@ashoknar
Copy link

ashoknar commented Dec 7, 2024

+1

@codewithleader
Copy link

Same here...

@codewithleader
Copy link

Update: The VS Code team has recommended launching the VSCode instance by executing the following command.

code --disable-features=PlzDedicatedWorker

Currently, this is the mitigation step for this issue. The VS Code team has added the issue to their November milestone and hopefully will be fixed in the next release

you're the best! 🚄

@alex-unruh
Copy link

+1

@pankajk07
Copy link
Member

The VS Code team has released the new version (v1.96.0), which fixes the extension's formatting and stale response issue. Please update your VS code version and continue working on the Postman extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests