Comments (11)
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:
Thanks for opening the issue! Hopefully we can get this resolved for you soon 🙂
from apollo-client-devtools.
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?).
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.
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:
- 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.
- 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.
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.
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.
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.
@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.
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.
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.
@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.
@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)
- Publish to Firefox store via GitHub Action
- Scroll not working in Queries and Cache tabs. HOT 3
- Display scroll bars in Webkit browsers
- Update screenshots in extension/addon stores HOT 2
- Finish Tailwind migration HOT 1
- Active queries disappear when used with RedwoodJS
- Dependency Dashboard
- Extension prevents websites (tested on atlassian.com) from loading styles HOT 9
- Not working! Apollo Client Devtools on Chrome latest HOT 17
- Doesn't work in latest Chromium-based MS Edge HOT 6
- Server side mutation errors are not reported in the explorer HOT 2
- Looking for client... No longer working after recent update HOT 16
- Impossible to track newly-created ApolloClients HOT 3
- Reactive Var Tab HOT 1
- Cache tab explodes causing the devtools to crash
- Intermittent connection issues when first opening dev tools HOT 5
- unable to load devtool properly. Failed to execute 'postMessage' on 'Window' HOT 5
- v4.8.1 breaks Google Cloud Console on Arc & Chrome for Mac HOT 4
- Provide development apps that contains irregular cache data
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apollo-client-devtools.