arjun-g / vs-swagger-viewer

Swagger Viewer lets you preview and validate Swagger 2.0 and OpenAPI files as you type in Visual Studio Code.
MIT License
170 stars 47 forks source link

Preview displaying as blank #22

Closed dbfr3qs closed 6 years ago

dbfr3qs commented 6 years ago

Hi there, I have a 300 line swagger file which is displaying as a blank vscode tab. Any suggestions as to why this may be the case?

image

Running OSX 10.12.6. The swagger file loads perfectly at editor.swagger.io without any errors.

particle6 commented 6 years ago

Looks like there is a solve for this in #19

arcotek-ltd commented 6 years ago

Same issue as @dbfr3qs. The file is .yaml (not .yml), exported from Swaggerhub. Also tried with the same code, exported as JSON. Both result in blank previews.

Preview works in swaggerhub.

VS Code 1.20.

Update

Scrub above. Just previewed again and it now shows the preview. Odd.

dbfr3qs commented 6 years ago

Yep, that works for me - renaming the file to .yaml. I feel a little bit silly that it was such a simple thing but glad to see the PR with a minor fix to support .yml.

treefitty commented 6 years ago

+1 rename yml to yaml worked for me too

fr-les commented 6 years ago

For me (on MacOS) it seems to work for a while, and then stop. Then it won't work again until restarting vscode. The result is the same regardless of whether viewing in vscode or in the browser.

SylwesterZarebski commented 6 years ago

I have also blank window when trying to preview on freshly created tab - without saving file.

iamlothian commented 6 years ago

If i debug the browser window it opens, I can see that sometimes the socket.io events are not being triggered. Could be a synchronous issue, i haven't dug into the code too far.

nplatis commented 6 years ago

Preview is blank for me as well. VSCode 1.22.2 on Linux. If I try to preview on external browser, I receive "Connection refused" error message.

taku-arakaki commented 6 years ago

In Swagger Viewer 1.6.0, I also blanked out the preview. When I tried it with 1.7.0 from GitHub, the problem was solved.

Please update Marketplace version from 1.6.0 to 1.7.0.

imolloy commented 6 years ago

I'm still seeing black previews on 1.7.0 on macOS 10.13.4.

cpheps commented 6 years ago

Also, seeing black previews on 1.7.0 on macOS 10.13.5. This was working a week ago on the same file not sure what has changed. I'm also using vscode Insiders

alexwbaule commented 6 years ago

For me too, it seems to work for a while, and then stop. Then it won't work again until restarting vscode. The result is the same regardless of whether viewing in vscode or in the browser.

taku-arakaki commented 6 years ago

It works well in the following environment on Windows7 and Linux(CentOS7).

vscode version 1.24.0 Swagger Viewer v.1.7.0

LunaticMuch commented 6 years ago

I started to experience the same issue. VSC 1.24.1 Swagger Viewer 1.7.0 macOS 10.12.6

Renaming from YML to YAML didn't work.

LunaticMuch commented 6 years ago

@arjun-g I pulled the new extension.js as result of pull #32 and tested it, but it's not solving the problem. Is there a way to debug it?

andfinally commented 5 years ago

I tried my file in the Swagger editor, which told me it had no paths defined. When I added them in the preview started working - so one thing to try is check for errors in the file.

sudheerah commented 3 years ago

Had the same issue. Tried after saving the file as yml and worked.