Apollo-client-devtools: Unable to detect Apollo Client after page reload

Created on 28 Jul 2019  路  19Comments  路  Source: apollographql/apollo-client-devtools

The Apollo Devtools (in Chrome) worked fine until I reload the page (without closing the Devtools).

After the page reload, the Apollo Devtools spent the first 10 seconds in "Connecting to Apollo Client..." screen, and then it just shows the "We couldn't detect Apollo Client in your app!" screen.

However, if I closed the Devtools and reopened it, the Devtools is able to detect the Apollo Client and work fine.

This is how the bug happened:

apollo-bug

馃悶 bug

Most helpful comment

Same bug with an electron app, using Next.js and hooks. My solution right now is to close dev tools and reopen.

Another workaround is to right-click on the Apollo window and click Reload Frame

All 19 comments

+1

+1

+1

+1

+1

+1

+1

Not to add another "+1" comment, but it would be nice to know when this issue will be adressed.

I'm running into it with the following versions:

  • Chrome Apollo extension 2.2.5
  • Chrome for macOS 77.0
  • Apollo Boost 0.4.4
  • Apollo React hooks 3.1.1
  • GraphQL 14.5.8

It's interesting to notice that the window.__APOLLO_CLIENT__ object exists even when the extension fails to find the store.

Another +1 here, but some findings i've come across in my app that might pin down the issue:

I have a Next.js app with an index page and a custom error page. The index page is functional with the useQuery hook, the error page a class component with the <Query> render props implementation (both use just @client data in the query). The index page exhibits this issue, the error page does not.

Is there something within the hooks implementation (timing or something) that could cause this issue?

Has anyone experienced this issue _without_ using Apollo hooks ? They seem to cause the problem

Same bug with an electron app, using Next.js and hooks. My solution right now is to close dev tools and reopen.

Same bug over here. I'm using Nextjs but no hooks in my application

Same bug with an electron app, using Next.js and hooks. My solution right now is to close dev tools and reopen.

Another workaround is to right-click on the Apollo window and click Reload Frame

Yeap, I've got the same bug. Came on this after googling apollo devtools reload frame 馃槃

Something that might help to track it down - it happens when you exceed a certain amount of data. For me, it was more than 13 records. If a query returns less than 13 records, devtools works fine (tested with offset and fewer rows in a table).

+1

Yep, we're having the same issue on our app with apollo 3, react 16, next 9. It seemed to work on apollo 2 sometimes, but it never works on apollo 3. The reload frame trick works every time.

+1

Having the same problem with apollo-angular, so this is probably neither specific to react-hooks nor even to react. It's especially annoying with live-reload enabled, every time something has changed in the app and it gets recompiled means I have to close and open the devtools again to get it to work again.

Any news on it?

Working with:

  • apollo-angular 2.0.4
  • @apollo-client 3.0.0
  • graphql 15.0.0
  • Angular 10

This should be fixed in 3.0 (which is being published this week) - thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jeffdesign picture jeffdesign  路  5Comments

jole78 picture jole78  路  7Comments

konsumer picture konsumer  路  7Comments

mvestergaard picture mvestergaard  路  6Comments

robclouth picture robclouth  路  5Comments