Apollo-client-devtools: Stop working after latest release

Created on 29 May 2020  ·  26Comments  ·  Source: apollographql/apollo-client-devtools

Hi guys, apollo client devtools is not working correctly after the latest release, it crashes after trying to access the 'cache' tab, the cache doesn't open and the application freezes showing a black screen.
I'm using apollo v2

Great app btw :D

Most helpful comment

@joanabeats I've closed this for now and I'm working to get a 2.3.1 release out. If that doesn't solve the issue, we'll reopen this!

All 26 comments

Same problem with Apollo v3

Thanks all - are you using Chrome or Firefox? And can you confirm the version is 2.3.0?

In my case with 2.3.0 and Apollo v3, I get the black screen on Queries tab while the cache works fine.

Yes, version 2.3.0 and I'm using chrome v83

Is there any chance someone here someone could provide a small runnable reproduction that breaks devtools? That would definitely help speed up troubleshooting.

It stopped working in my app

├── @apollo/[email protected]
├── @apollo/[email protected]
├── @apollo/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]

and newest chrome.

Demo: https://ovgwz.csb.app/
https://codesandbox.io/s/react-apollo-with-hooks-ovgwz?file=/src/index.js

@hinok Many thanks for adding the demo! When I view it using 2.3.0, the DevTools appear to be working. Could you describe what issues you're seeing?

Below is what I'm seeing. If you are able to record what's happening, that will be helpful!
apollodevtools

@jcreighton

demo

In my application I always get crash after clicking the "Cache" tab. On the video above you can see that sometimes it works, sometimes not.

@hinok Super helpful! I'll keep digging around see if I can get this reproduced on my side.

@jcreighton

demo

In my application I always get crash after clicking the "Cache" tab. On the video above you can see that sometimes it works, sometimes not.

the same problem on macOS and Chrome Version 83.0.4103.61

@jcreighton This is what I captured from the devtools devtools 💥

After clicking on Cache

Zrzut ekranu 2020-05-29 o 21 20 48

Zrzut ekranu 2020-05-29 o 21 21 25

@hinok I saw that! Seems there some sort of race condition where value is set to null. I put up a PR: https://github.com/apollographql/apollo-client-devtools/pull/267

Would you be able to check it out and see if that fixes the issue?

Ugh, I didn't mean to close the issue. Hit something with my wrist... 😆

@eDubrovsky Are you able to build the extension and check as well?

@jcreighton fixed, thank you! :)

@joanabeats If you are able to check the related PR and let me know if it fixes the issue, that would be great!

@jcreighton

Now it works 🥳

but... I think that we have another issue? I've never seen __schema in the cache panel. After clicking Cache, I need to wait 5-10s and finally get the view with __schema that contains a lot of things that shouldn't be in the cache.

On the first view, after refreshing the page everything looks good.
When I navigate to another page (new graphql queries are run), the devtools panel is frozen... seems that it's broken but after 5-10s it contains __schema.

schema-in-query

It looks like the cache panel contains introspection query, correct me if I'm wrong.

@hinok Thanks for checking out the PR and so happy it fixes the issue!

As for the __schema issue, that's working correctly. But there's an older opened PR to remove it (https://github.com/apollographql/apollo-client-devtools/pull/235). I'm newer to the project so I need some time to figure out the history of this and if we want to make that change (or why we wouldn't.)

@joanabeats I've closed this for now and I'm working to get a 2.3.1 release out. If that doesn't solve the issue, we'll reopen this!

@jcreighton I tested the PR, and is still crashing, it freezes a lot when opening the cache tab, I don't see the black screen but keeps freezing a lot now.

@joanabeats Ok, thank you for testing it out! I'm unable to reproduce what you're seeing so if you could create a runnable sample, that would be ideal. You can also inspect the DevTools themselves and see if there's an error in the console.

I'm not sure if this will help (probably wont because others have done the same), but just in case - here's a recording of the devtool's console while it crashes:

apollo-typename-crash

Also, a couple times it seemed to get into an infinite loop with thousands of the same error, before crashing. Couldn't consistently reproduce to get a recording, just thought it's worth mentioning.

EDIT: Oh, sorry - this PR hasn't been released yet.

@jcreighton I test it again, it freezes mostly on cache tab, may be related with the new content that appears on the cache '__schema', and I also got this on the console :

VM1353:1 Uncaught TypeError: Cannot redefine property: __APOLLO_DEVTOOLS_GLOBAL_HOOK__ at Function.defineProperty (<anonymous>) at <anonymous>:1:555 at <anonymous>:1:960

Tks.

@joanabeats I've opened up a separate issue to track this since it's unrelated to the initial problem here.

@joanabeats @hinok There's a PR related to #271 if you'd like to check it out.

Was this page helpful?
0 / 5 - 0 ratings