Coder Social home page Coder Social logo

Comments (16)

angelhodar avatar angelhodar commented on May 30, 2024 1

Hi @jerelmiller in my case its working now!! I just restarted NextJS dev server and Chrome and seems to be working fine again. I dont know what caused the issue

from apollo-client-devtools.

angelhodar avatar angelhodar commented on May 30, 2024

Same here, in my case after showing the Looking for client... it says:

Unable to communicate with browser tab. Please reload the window and restart the devtools to try again

But reloading the page doesnt fix the problem

from apollo-client-devtools.

jerelmiller avatar jerelmiller commented on May 30, 2024

Hey @BerekHalfhand and @angelhodar 👋

So sorry about this! By chance do you know what extension version you were using before? I assume that version was working ok?

Could you try a couple things for me to help me debug? I'm unable to reproduce locally, so any information you can give me would be super helpful. Alternatively if you have an reproduction that I can use to test against, that would be amazing.

First of all, can you check 2 things to see if these values are defined?

window.__APOLLO_CLIENT__
window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__.ApolloClient

If those are set and not undefined, I'd like to see if your page is getting messages from the devtools. You can check it with this:

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

Try running this immediately after loading the page to see if you get any events coming through.

Any more info you can give me to help me debug would be super helpful! I'd like to get a fix in as soon as I can help verify what the issue is.

from apollo-client-devtools.

jerelmiller avatar jerelmiller commented on May 30, 2024

Ok! That's great news! Thanks for letting me know :)

from apollo-client-devtools.

phryneas avatar phryneas commented on May 30, 2024

@BerekHalfhand is the problem still persisting for you?

If yes, could you please try it on this page and give us feedback if it works there?

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

from apollo-client-devtools.

BerekHalfhand avatar BerekHalfhand commented on May 30, 2024

@phryneas somehow it's working for me now, on the same version. Dunno how

window.__APOLLO_CLIENT__ window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__.ApolloClient

Both are set

from apollo-client-devtools.

phryneas avatar phryneas commented on May 30, 2024

@BerekHalfhand That's great to hear! I'm going to close this issue now. Have a great day!

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.

Richacinas avatar Richacinas commented on May 30, 2024

Hi there, same problem here.

I have:

window.__APOLLO_CLIENT__

window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__.ApolloClient

Both set with proper values.

I have tried what @jerelmiller is suggesting:

Hey @BerekHalfhand and @angelhodar 👋

So sorry about this! By chance do you know what extension version you were using before? I assume that version was working ok?

Could you try a couple things for me to help me debug? I'm unable to reproduce locally, so any information you can give me would be super helpful. Alternatively if you have an reproduction that I can use to test against, that would be amazing.

First of all, can you check 2 things to see if these values are defined?

window.__APOLLO_CLIENT__
window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__.ApolloClient

If those are set and not undefined, I'd like to see if your page is getting messages from the devtools. You can check it with this:

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

Try running this immediately after loading the page to see if you get any events coming through.

Any more info you can give me to help me debug would be super helpful! I'd like to get a fix in as soon as I can help verify what the issue is.

And I am getting a lot of events:

image

Still, it never finds the client and stays "Looking for client"...

I have version 4.7.0

from apollo-client-devtools.

jerelmiller avatar jerelmiller commented on May 30, 2024

@Richacinas those messages are coming from React devtools, not the Apollo Client devtools. The Apollo Devtools would have a message like:

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

Seems as though the messages aren't making it from the devtools panel to the window. Could you try closing devtools, reloading the page, then reopening the apollo devtools panel to see if you're still seeing the same thing? Also, what version of Apollo Client are you on? I'll keep digging into this. If you have a reproduction, that would also be super helpful 🙂

from apollo-client-devtools.

jerelmiller avatar jerelmiller commented on May 30, 2024

I forgot to mention, those messages are only sent with the devtools panel is open. You'll need to switch to the Apollo devtools panel, then check the console to see if those messages are coming through. Should look something like this:

Screenshot 2024-03-04 at 12 11 39 PM

from apollo-client-devtools.

Richacinas avatar Richacinas commented on May 30, 2024

@Richacinas those messages are coming from React devtools, not the Apollo Client devtools. The Apollo Devtools would have a message like:

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

Seems as though the messages aren't making it from the devtools panel to the window. Could you try closing devtools, reloading the page, then reopening the apollo devtools panel to see if you're still seeing the same thing? Also, what version of Apollo Client are you on? I'll keep digging into this. If you have a reproduction, that would also be super helpful 🙂

I tried reloading, and it worked. However, there is a random (and frecuent) problem as I described above. It happens a lot to me, usually I try to open this Apollo tab on dev tools after a while, and now I tried just after reloading.. I don't know if that is relevant.

My apollo client version is 3.7.1

from apollo-client-devtools.

phryneas avatar phryneas commented on May 30, 2024

@Richacinas we changed the devtools registration mechanism of Apollo Client in version 3.8.3, so it might be worthwhile for you to update to that at least to get better DevTools functionality.

from apollo-client-devtools.

Richacinas avatar Richacinas commented on May 30, 2024

@phryneas thank you very much.

Right now I can't update apollo client, I'm working on a big corporative app and it doesn't depend on me these kind of changes.

Honestly, today it has been working great. I didn't find the problem anymore.. I don't know why.

So, if you prefer, let's close this issue and if it comes up again, I will try to open it with a reproduction environment and all the information.

BTW: I see one weird thing, and that is that some queries don't appear (see below image, the queries named "predict..."):

image

Thank you again

from apollo-client-devtools.

jerelmiller avatar jerelmiller commented on May 30, 2024

@Richacinas glad to hear it! Please do let us know if you see issues like this and we will try and address. A new issue would be great to track this separately.

Since it seems like this issue is more-or-less resolved, I'll go ahead and close this issue. I'll keep an eye out to see if we get intermittent failures and if there is more opportunity to ensure the client detection is robust.

Thanks all!

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.

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.