42Crunch / vscode-openapi

VisualStudio Code OpenAPI tools
GNU Affero General Public License v3.0
335 stars 41 forks source link

Badge icon is missing #252

Closed andrioidApacta closed 9 months ago

andrioidApacta commented 10 months ago

When I came back from Christmas holidays, the API editor icon disappeared when I clicked on it and I can't seem to get it back.

I've tried; uninstalling, installing an old version, reloading my VScode, updating my VScode. It's also missing from the badge-list, if I right click the extension badge (see below)

Screenshot 2024-01-02 at 08 17 18

I'm stumped, and funny how you first realize how awful it is editing OpenAPI schema files when I can't use your wonderful extension.

ak1394 commented 10 months ago

Hi @andrioidApacta ! What is VS Code version you're using, and what OS you're on?

As well, could you run Developer: Show Logs... from the command palette (you can open it with (Cmd or Ctrl)-Shift-P) and then choose Extention Host and post here the logs?

andrioidApacta commented 10 months ago

Hi @ak1394 and thanks for the instructions.

MacOS Sonoma 14.0 (M1 Max) Visual Studio Code 1.85.1

In the developer logs there are 2 lines referencing the extension:

2024-01-03 07:57:43.695 [info] ExtensionService#_doActivateExtension redhat.vscode-yaml, startup: false, activationEvent: 'onView:openapiNotSelectedOutline', root cause: 42Crunch.vscode-openapi
2024-01-03 07:57:44.100 [info] ExtensionService#_doActivateExtension 42Crunch.vscode-openapi, startup: false, activationEvent: 'onView:openapiNotSelectedOutline'
Entire log ``` 2024-01-03 07:57:43.550 [info] Extension host with pid 77688 started 2024-01-03 07:57:43.550 [info] Skipping acquiring lock for /Users/aos/Library/Application Support/Code/User/workspaceStorage/7d65d4b9d77de9b8007694339ba36661. 2024-01-03 07:57:43.599 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage' 2024-01-03 07:57:43.608 [info] ExtensionService#_doActivateExtension vscode.extension-editing, startup: false, activationEvent: 'onLanguage:markdown' 2024-01-03 07:57:43.615 [info] ExtensionService#_doActivateExtension vscode.markdown-language-features, startup: false, activationEvent: 'onLanguage:markdown' 2024-01-03 07:57:43.654 [info] ExtensionService#_doActivateExtension vscode.json-language-features, startup: false, activationEvent: 'onLanguage:json' 2024-01-03 07:57:43.679 [info] ExtensionService#_doActivateExtension vscode.npm, startup: false, activationEvent: 'onLanguage:json' 2024-01-03 07:57:43.695 [info] ExtensionService#_doActivateExtension redhat.vscode-yaml, startup: false, activationEvent: 'onView:openapiNotSelectedOutline', root cause: 42Crunch.vscode-openapi 2024-01-03 07:57:44.100 [info] ExtensionService#_doActivateExtension 42Crunch.vscode-openapi, startup: false, activationEvent: 'onView:openapiNotSelectedOutline' 2024-01-03 07:57:44.947 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '*', root cause: vscode.git 2024-01-03 07:57:44.979 [info] ExtensionService#_doActivateExtension johnpapa.vscode-peacock, startup: true, activationEvent: '*' 2024-01-03 07:57:45.296 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '*' 2024-01-03 07:57:45.560 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*' 2024-01-03 07:57:45.604 [info] ExtensionService#_doActivateExtension GraphQL.vscode-graphql, startup: true, activationEvent: 'workspaceContains:**/.graphqlrc,**/.graphqlrc.{json,yaml,yml,js,ts,toml},**/graphql.config.{json,yaml,yml,js,ts,toml},**/package.json' 2024-01-03 07:57:45.893 [info] ExtensionService#_doActivateExtension vscode.typescript-language-features, startup: false, activationEvent: 'onLanguage:jsonc' 2024-01-03 07:57:46.073 [warning] [redhat.vscode-yaml] Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '[yaml]', provide the URI of a resource or 'null' for any resource. 2024-01-03 07:57:46.252 [warning] [redhat.vscode-yaml] Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '[yaml]', provide the URI of a resource or 'null' for any resource. 2024-01-03 07:57:46.300 [warning] [redhat.vscode-yaml] Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '[yaml]', provide the URI of a resource or 'null' for any resource. 2024-01-03 07:57:46.947 [info] Eager extensions activated 2024-01-03 07:57:46.948 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished' 2024-01-03 07:57:46.950 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished' 2024-01-03 07:57:46.961 [info] ExtensionService#_doActivateExtension bierner.emojisense, startup: false, activationEvent: 'onStartupFinished' 2024-01-03 07:57:46.966 [info] ExtensionService#_doActivateExtension bradlc.vscode-tailwindcss, startup: false, activationEvent: 'onStartupFinished' 2024-01-03 07:57:46.987 [info] ExtensionService#_doActivateExtension dbaeumer.vscode-eslint, startup: false, activationEvent: 'onStartupFinished' 2024-01-03 07:57:47.004 [info] ExtensionService#_doActivateExtension eamodio.gitlens, startup: false, activationEvent: 'onStartupFinished' 2024-01-03 07:57:47.064 [info] ExtensionService#_doActivateExtension esbenp.prettier-vscode, startup: false, activationEvent: 'onStartupFinished' 2024-01-03 07:57:47.109 [info] ExtensionService#_doActivateExtension GitHub.copilot, startup: false, activationEvent: 'onStartupFinished' 2024-01-03 07:57:47.403 [info] ExtensionService#_doActivateExtension GitHub.copilot-chat, startup: false, activationEvent: 'onStartupFinished' 2024-01-03 07:57:47.493 [info] ExtensionService#_doActivateExtension vscode.github-authentication, startup: false, activationEvent: 'onStartupFinished', root cause: GitHub.vscode-pull-request-github 2024-01-03 07:57:47.530 [info] ExtensionService#_doActivateExtension Gruntfuggly.todo-tree, startup: false, activationEvent: 'onStartupFinished' 2024-01-03 07:57:48.178 [info] ExtensionService#_doActivateExtension GitHub.vscode-pull-request-github, startup: false, activationEvent: 'onStartupFinished' 2024-01-03 07:58:47.963 [info] ExtensionService#_doActivateExtension vscode.markdown-math, startup: false, activationEvent: 'api', root cause: vscode.markdown-language-features ```
ak1394 commented 10 months ago

There is nothing obviously wrong in the logs. The only difference I see is that the extension activates on onView:openapiNotSelectedOutline while it usually activates on *. It is unusual, because this event would trigger when you have clicked 'API Editor' icon, which is not visible in your case.

It might be a good idea to try uninstalling VS Code, removing your $HOME/.vscode directory (assuming you don't have anything important there) and re-installing again.

andrioidApacta commented 9 months ago

Deleted VScode, deleted the ~/.vscode folder and still no luck. If I go Into "View -> Open View" it can't find "OpenAPI" or Swagger or anything close. This is very puzzling.

Extension host ``` 2024-01-26 09:35:53.736 [info] Extension host with pid 17737 started 2024-01-26 09:35:53.736 [info] Skipping acquiring lock for /Users/aos/Library/Application Support/Code/User/workspaceStorage/6957fafea9f2f98977d20f19a8d4293a. 2024-01-26 09:35:53.805 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage' 2024-01-26 09:35:53.816 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '*', root cause: vscode.git 2024-01-26 09:35:53.817 [info] ExtensionService#_doActivateExtension redhat.vscode-yaml, startup: true, activationEvent: '*', root cause: 42Crunch.vscode-openapi 2024-01-26 09:35:53.851 [info] ExtensionService#_doActivateExtension vscode.npm, startup: true, activationEvent: 'workspaceContains:package.json' 2024-01-26 09:35:53.863 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '*' 2024-01-26 09:35:53.873 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*' 2024-01-26 09:35:53.876 [info] ExtensionService#_doActivateExtension 42Crunch.vscode-openapi, startup: true, activationEvent: '*' 2024-01-26 09:35:54.011 [info] Eager extensions activated 2024-01-26 09:35:54.011 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished' 2024-01-26 09:35:54.012 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished' 2024-01-26 09:35:54.055 [warning] [redhat.vscode-yaml] Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '[yaml]', provide the URI of a resource or 'null' for any resource. 2024-01-26 09:35:54.056 [warning] [redhat.vscode-yaml] Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '[yaml]', provide the URI of a resource or 'null' for any resource. 2024-01-26 09:35:54.124 [info] ExtensionService#_doActivateExtension vscode.github-authentication, startup: false, activationEvent: 'onAuthenticationRequest:github' 2024-01-26 09:35:55.709 [warning] [redhat.vscode-yaml] Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '[yaml]', provide the URI of a resource or 'null' for any resource. 2024-01-26 09:35:55.964 [warning] [redhat.vscode-yaml] Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '[yaml]', provide the URI of a resource or 'null' for any resource. 2024-01-26 09:35:56.136 [warning] [redhat.vscode-yaml] Accessing a resource scoped configuration without providing a resource is not expected. To get the effective value for '[yaml]', provide the URI of a resource or 'null' for any resource. ```
andrioidApacta commented 9 months ago

Fix found!

SHIFT+CMD+P "View: Reset View Locations" and it's back!

I have no idea what "location" it had before, but all good now.

ak1394 commented 9 months ago

Thanks a lot for the info! I'll help if someone else runs into the same issue!