Skip to content
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

Service stats could not be loaded (with v2.5.2 works with v2.0.0) #251

Open
proc-anshul opened this issue Dec 17, 2024 · 3 comments
Open

Comments

@proc-anshul
Copy link

proc-anshul commented Dec 17, 2024

------------------------------
πŸš€ Apollo GraphQL v2.5.2
------------------------------
❌ Service stats could not be loaded. This may be because you're missing an apollo.config.js file or it is misconfigured. For more information about configuring Apollo projects, see the guide here (https://go.apollo.dev/t/config).

^ Getting the above error after upgrading to the latest version of the extension v2.5.2


Here is the apollo.config.ts file -

import env from 'dotenv';

env.config();

export default {
  client: {
    service: {
      name: 'service-name',
      url: process.env.APOLLO_HASURA_GRAPHQL_END_POINT,
      headers: {
        'x-hasura-admin-secret': process.env.APOLLO_HASURA_GRAPHQL_ADMIN_SECRET,
        'content-type': 'application/json',
      },
    },
  },
};


Works with v2.0.0

------------------------------
πŸš€ Apollo GraphQL v2.0.0
------------------------------
βœ… Service Loaded!
πŸ†” Service ID: service-name
🏷 Schema Tag: current
πŸ“ˆ Number of Types: 2245 (0 client types)
------------------------------
@phryneas
Copy link
Member

phryneas commented Dec 17, 2024

Hmm, that's curious. Things should have gotten better, not worse πŸ˜…

First question: what operating system are you on?
After that: I'm really sorry, but I need the exact version this broke - we had a lot of back and forth in the 2.xx versions regarding config file parsing, so I can help you a lot better once I know this. Could you please try installing multiple versions until you can identify the problem?

Also, can you set this option and see if something in the logs maybe hints more to the problem?
image

@proc-anshul
Copy link
Author

ProductName: macOS
ProductVersion: 15.1.1
BuildVersion: 24B91

^ Here are the OS details


These are the logs I can see -

[Trace - 17:42:44] Sending request 'initialize - (0)'.
[Trace - 17:42:45] Received response 'initialize - (0)' in 1286ms.
[Trace - 17:42:45] Sending notification 'initialized'.
[Trace - 17:42:45] Sending notification 'textDocument/didOpen'.
[Trace - 17:42:45] Received request 'client/registerCapability - (0)'.
[Trace - 17:42:45] Sending response 'client/registerCapability - (0)'. Processing request took 1ms
[Trace - 17:42:45] Received notification 'apollographql/loading'.
[Trace - 17:42:45] Received notification 'apollographql/loading'.
[Trace - 17:42:45] Sending request 'textDocument/documentSymbol - (1)'.
[Trace - 17:42:45] Received notification 'apollographql/loadingComplete'.
[Trace - 17:42:45] Received notification 'apollographql/configFilesFound'.
[Trace - 17:42:45] Received response 'textDocument/documentSymbol - (1)' in 11ms.
[Trace - 17:42:46] Sending request 'textDocument/documentSymbol - (2)'.
[Trace - 17:42:46] Received response 'textDocument/documentSymbol - (2)' in 3ms.
[Trace - 17:42:46] Sending request 'textDocument/codeLens - (3)'.
[Trace - 17:42:46] Sending request 'textDocument/documentSymbol - (4)'.
[Trace - 17:42:46] Received notification 'apollographql/loadingComplete'.
[Trace - 17:42:46] Received notification 'apollographql/engineDecorations'.
[Trace - 17:42:46] Received response 'textDocument/codeLens - (3)' in 204ms.
[Trace - 17:42:46] Received response 'textDocument/documentSymbol - (4)' in 39ms.
[Trace - 17:42:49] Sending request 'textDocument/documentSymbol - (5)'.
[Trace - 17:42:49] Received response 'textDocument/documentSymbol - (5)' in 4ms.
[Trace - 17:42:50] Sending request 'textDocument/documentSymbol - (6)'.
[Trace - 17:42:50] Received response 'textDocument/documentSymbol - (6)' in 2ms.
[Trace - 17:42:52] Sending request 'textDocument/documentSymbol - (7)'.
[Trace - 17:42:53] Received response 'textDocument/documentSymbol - (7)' in 342ms.
[Trace - 17:42:53] Sending request 'textDocument/codeLens - (8)'.
[Trace - 17:42:53] Received response 'textDocument/codeLens - (8)' in 4ms.
[Trace - 17:42:54] Sending notification '$/setTrace'.
[Trace - 17:42:55] Sending request 'textDocument/codeLens - (9)'.
[Trace - 17:42:55] Received response 'textDocument/codeLens - (9)' in 2ms.
[Trace - 17:42:55] Sending request 'textDocument/codeLens - (10)'.
[Trace - 17:42:55] Received response 'textDocument/codeLens - (10)' in 2ms.
[Trace - 17:42:56] Sending request 'textDocument/codeLens - (11)'.
[Trace - 17:42:56] Received response 'textDocument/codeLens - (11)' in 1ms.
[Trace - 17:42:56] Sending request 'textDocument/codeLens - (12)'.
[Trace - 17:42:56] Received response 'textDocument/codeLens - (12)' in 1ms.
------------------------------
πŸš€ Apollo GraphQL v2.5.2
------------------------------
[Trace - 17:43:00] Sending request 'textDocument/codeLens - (13)'.
[Trace - 17:43:00] Received response 'textDocument/codeLens - (13)' in 3ms.

@proc-anshul
Copy link
Author

proc-anshul commented Dec 17, 2024

Working till v2.1.0


Upgrading to v2.2.0 give this logs ->

[Trace - 18:11:02] Sending notification 'apollographql/getStats'.
[Trace - 18:11:02] Received notification 'apollographql/statsLoaded'.

πŸš€ Apollo GraphQL v2.2.0

❌ Service stats could not be loaded. This may be because you're missing an apollo.config.js file or it is misconfigured. For more information about configuring Apollo projects, see the guide here (https://go.apollo.dev/t/config).
[Trace - 18:11:02] Sending request 'textDocument/codeLens - (21)'.
[Trace - 18:11:02] Received response 'textDocument/codeLens - (21)' in 3ms.
[Trace - 18:11:24] Sending request 'textDocument/codeLens - (22)'.
[Trace - 18:11:24] Received response 'textDocument/codeLens - (22)' in 2ms.
[Trace - 18:11:27] Sending request 'textDocument/codeLens - (23)'.
[Trace - 18:11:27] Received response 'textDocument/codeLens - (23)' in 2ms.

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

No branches or pull requests

2 participants