Coder Social home page Coder Social logo

Comments (11)

jerelmiller avatar jerelmiller commented on May 30, 2024

Hey @andreimatei 👋

By chance do you know what version of the devtools you were using before when it was working for you? We've done quite a bit of refactoring work lately to try and improve the reliability of the devtools and its message passing, but some of it is still a bit of a shot in the dark.

When you load the page, do you see a "Looking for client" message? If so, let it search for >= 10 sec and you should see a modal that pops up with some debugging tips to try and diagnose what might be happening.

It should look like the following:
Screenshot 2024-03-06 at 3 23 03 PM

Thanks for opening the issue! Hopefully we can get this resolved for you soon 🙂

from apollo-client-devtools.

andreimatei avatar andreimatei commented on May 30, 2024

Hello!

I don't know what version worked for me, sorry.

I don't see any messages about looking for a client, or not finding a client.
The extension looks like this for me. Note that it looks this way both when the active tab is my react app, and also when the active tab is any other website (is that surprising?).
Screenshot from 2024-03-06 17-33-21

I should also have mentioned that I started passing connectToDevTools: true to the client constructor, and it didn't make a difference.

from apollo-client-devtools.

jerelmiller avatar jerelmiller commented on May 30, 2024

Ok interesting! If you're not seeing the message, then I think that means that it connected, but the devtools just isn't able to get data from the client. This could be 1 of 2 problems:

  1. The data we try and pull from your client instance is empty for some reason

Try the following in your JS console and see if you get anything back:

const devtools = window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__
{ queries: devtools.getQueries(), mutations: devtools.getMutations(), cache: devtools.getCache() }

If you're seeing data here, then it could be a problem with the communciation to the devtools from your browser tab.

  1. Problems with communication from the browser tab

You should be able to check to see if your browser tab is receiving messages from the devtools panel with the following:

window.addEventListener('message', (event) => console.log(event.data))

You should see events in the following form:

{
  source: 'apollo-client-devtools',
  message: { ... }
}

NOTE: You'll need to have the Apollo tab selected in order for messages to be received. When you're looking at other tabs, we don't send any messages, so make this this tab is selected.

Let me know what you are seeing!

from apollo-client-devtools.

jerelmiller avatar jerelmiller commented on May 30, 2024

One more thing! Could you open the devtools using this app and see if you're still experiencing the same problem?

https://phryneas.github.io/ac-devtools-test/

from apollo-client-devtools.

andreimatei avatar andreimatei commented on May 30, 2024

A browser restart seems to have fixed everything...
Before that, on my app's tab, the extension appeared connected but was not showing any data. On other random tabs, the extension was saying "looking for client". On the tab https://phryneas.github.io/ac-devtools-test/, the extension said something about an error and asked me to refresh, I believe; a simple refresh did not do the trick. But:
After a browser restart, the extension works.

I again apologize for the noise. Closing.

from apollo-client-devtools.

github-actions avatar github-actions commented on May 30, 2024

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better.

from apollo-client-devtools.

jerelmiller avatar jerelmiller commented on May 30, 2024

@andreimatei no problem at all! I've seen a few comments now about the "Looking for client", then refreshing fixes the problem. I think this might be a symptom of a smaller underlying issue. I'll continue to investigate this to see if I can track down this specific problem, but glad you're at least seeing data now 🙂.

from apollo-client-devtools.

andreimatei avatar andreimatei commented on May 30, 2024

I've seen a few comments now about the "Looking for client", then refreshing fixes the problem.

Just to note - in my case, refreshing (many times) did not fix the problem. Only a browser (Chrome) restart did it. In fact, I believe the problem was happening in multiple tabs at once. But then opening a new tab in a different Chrome profile worked. At which point I closed all windows and then it worked in both profiles.

What makes this all extra confusing is that I swear that while filing this issue, I had also tried the Firefox extension, and it also didn't work... But now, an hour later, it does work; no restarts or refreshes in that case.

from apollo-client-devtools.

jerelmiller avatar jerelmiller commented on May 30, 2024

How very strange! That certainly helps at least give us a better clue as to what might be happening here. Thanks for the extra info @andreimatei!

from apollo-client-devtools.

KrisCoulson avatar KrisCoulson commented on May 30, 2024

@jerelmiller just came here because this was happening to me. Not sure why I killed but I killed chrome completely and rebooted and now devtools are connecting correctly. Currently I am on 4.11.0. The last time I looked at the apollo devtools I am not sure what version I was on.

Could it be that chrome extension updated while browser was open? Before I killed chrome it would show devtools but it would just be spinning saying "looking for client"

from apollo-client-devtools.

jerelmiller avatar jerelmiller commented on May 30, 2024

@KrisCoulson I've noticed that a few times as well. I'll note your comment in #1247. This one seems to be elusive, but you might be on to something here. We haven't quite nailed down why this seems to happen at times since it sorta auto-fixes itself before we can log anything. Thanks for letting me know though! The quest continues... 😆

from apollo-client-devtools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.