graphql / vscode-graphql

MIGRATED: VSCode GraphQL extension (autocompletion, go-to definition, syntax highlighting)
https://marketplace.visualstudio.com/items?itemName=Prisma.vscode-graphql
MIT License
555 stars 71 forks source link

bug: output panel keeps opening #210

Closed hendrikbursian closed 4 years ago

hendrikbursian commented 4 years ago

Actual Behavior

The Output panel is popping up on saving and editing typescript files in short intervals.

The following message is shown:

[Error - 19:29:28] Request textDocument/documentSymbol failed.
  Message: Request textDocument/documentSymbol failed with message: A cached document cannot be found.
  Code: -32603

What follows are my settings. I also tried it with different configuration formats and settings.

Extension Settings

  "vscode-graphql.debug": true,
  "vscode-graphql.trace.server": "on",
  "vscode-graphql.config.baseDir": "./",
  "vscode-graphql.config.filePath": ".graphqlrc",

Expected Behavior

I can edit and save files without errors of the vscode-graphql extension.

Steps to Reproduce the Problem Or Description

  1. Open ts file
  2. Making inputs - Adding newlines, typing, saving

Specifications

Logs Of TS Server || GraphQL Language Service

TS Server Logs don't show anything when the error occurs.

[Info  - 17:36:59.425] Starting TS Server 
[Info  - 17:36:59.425] Using tsserver from: /snap/code-insiders/516/usr/share/code-insiders/resources/app/extensions/node_modules/typescript/lib/tsserver.js
[Info  - 17:36:59.426] <syntax> Forking...
[Info  - 17:36:59.443] <syntax> Starting...
[Info  - 17:36:59.444] <semantic> Forking...
[Info  - 17:36:59.456] <semantic> Starting..

GraphQL Language Service is repeating the following (paths obscured). The more I type the more frequently.

03/09/2020, 19:46:50 [4] (pid: 753955) graphql-language-service-usage-logs: {"type":"usage","messageType":"textDocument/didChange","projectName":"default","fileName":"file:///path/to/edited-file.ts"}

[Error - 19:46:50] Request textDocument/documentSymbol failed.
  Message: Request textDocument/documentSymbol failed with message: A cached document cannot be found.
  Code: -32603 
03/09/2020, 19:46:51 [4] (pid: 753955) graphql-language-service-usage-logs: {"type":"usage","messageType":"textDocument/didOpen","projectName":"default","fileName":"file:///path/to/edited-file.ts"}

03/09/2020, 19:46:51 [4] (pid: 753955) graphql-language-service-usage-logs: {"type":"usage","messageType":"workspace/didChangeWatchedFiles","projectName":"default","fileName":"file:///path/to/edited-file.ts"

I'd be happy to share more information as I really appreciate your work on this extension. It simply works as expected without hassle for me. I don't see that in the other GraphQL extensions.

acao commented 4 years ago

are you using prisma.vscode-graphql@0.3.1?

hendrikbursian commented 4 years ago

Hey, no its graphql.graphql-vscode-insiders@0.3.5.

EDIT: I looked through the issues and saw the issues related to the previous versions so I double and triple checked, and created a new issue based on version 0.3.5

acao commented 4 years ago

ah, then you have the “insiders edition” installed. make sure to uninstall that one (graphql.vscode-graphql-insiders) and install prisma.vscode-graphql, the stable extension

hendrikbursian commented 4 years ago

Yes, I have tried the other version before but had no luck.

I followed your advice and it works now. It seems I tricked myself with changed configurations.

Thank you for the fast response.

Have a good evening and keep up the good work! :)

djsmedes commented 4 years ago

I am now having this issue. It's on the latest version of this extension (v0.3.10, here https://marketplace.visualstudio.com/items?itemName=GraphQL.vscode-graphql). I've tried every combination of uninstalling/reinstalling, clearing caches, switching to the insiders edition, switching back, and restarting my whole machine, and it's still happening.

@acao why did you ask about the insider's edition? Do you have a specific hypothesis about what's happening with some other kind of troubleshooting I could attempt?

acao commented 4 years ago

so, the output panel is still appearing?

acao commented 4 years ago

did you try closing the output panel? the error is normal to see as the cache is being built, but the configuration was added to the extension and this bug with the output panel should not be visible in the latest version

djsmedes commented 4 years ago

The output panel is not the problem - it's not even opening automatically, I had to go and find it. My real problem is that the autocomplete and jump-to-definition parts of this extension are just completely non-functional. I assumed that since I was seeing an error in the log it was related. But if this error is part of normal expected operation, I guess I'll need to take another look at what's happening on my machine and possibly open a separate issue.

Thanks for your fast reply!

acao commented 4 years ago

sounds like a configuration issue with your graphql config. can you open a support ticket?

djsmedes commented 4 years ago

Sure, that would be helpful! Is that just another GitHub issue?