Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.5.0 network request hangs pending. rolling back to 3.4.17 fixes an issue. 3.5.9 issue persists, #9456

Closed
JustFly1984 opened this issue Feb 25, 2022 · 9 comments
Assignees
Labels
🏓 awaiting-contributor-response requires input from a contributor 🐞 bug

Comments

@JustFly1984
Copy link

Intended outcome:
correct network request execution

Actual outcome:
request hangs in pending state.

How to reproduce the issue:
I'm not sure how to reproduce. We had cached this error while updating @apollo/client@3.4.16 to 3.5.9. I've tested other versions and the bug appears in 3.5.0 and consists in every version till current at the time of writing 3.5.9.

We have nextjs@12.1 app, and we are requesting graphql on server-side with React.js hook, generated by @graphql-codegen/cl@2.6.2

Versions

System:
   OS: macOS 11.6.4
 Binaries:
   Node: 14.15.4 - ~/.nvm/versions/node/v14.15.4/bin/node
   Yarn: 1.22.17 - /usr/local/bin/yarn
   npm: 7.12.1 - ~/.nvm/versions/node/v14.15.4/bin/npm
 Browsers:
   Chrome: 98.0.4758.109
   Firefox: 91.0.1
   Safari: 15.3
 npmPackages:
   @apollo/client: 3.4.17 => 3.4.17  does work. 3.5.0+ doesn't
   @apollo/react-hooks: 4.0.0 => 4.0.0 
   @apollo/react-testing: 4.0.0 => 4.0.0 

Thank you for a great work!

@damiangreen
Copy link

damiangreen commented Apr 7, 2022

I'm also getting this.. is there any solution?
System: Windows
node v16.13.0
yarn 3.1.0
"@apollo/client": "3.5",

@JustFly1984
Copy link
Author

@damiangreen for now the only solution to roll back to 3.4.17

@iprignano
Copy link

iprignano commented Apr 26, 2022

Are you by any chance using getDataFromTree and lazy queries (useLazyQuery) across your application? We found that explicitly setting the ssr: false option on these queries would solve the issue. It could be related to this change: https://github.com/apollographql/apollo-client/pull/8875/files

@damiangreen
Copy link

damiangreen commented Apr 28, 2022

Yes we are using await getDataFromTree(rootComponent) and useLazyQuery. What did you do to remove getDataFromTree?

@iprignano
Copy link

@damiangreen You wouldn't have to remove getDataFromTree – but set the ssr option in the lazy query call to false, e.g.

useLazyQuery(query, {
  ssr: false,
  ...otherOptions
})

@damiangreen
Copy link

thx ill give it a go

@andreialecu
Copy link
Contributor

andreialecu commented May 6, 2022

Also running into queries randomly hanging when using apollo-angular so this is not a React only issue.

Noticed this on 3.6.3. It appears that things work for a while then suddenly a certain query will always hang. The promise will never return. I'm not noticing the query being issued into the network tab of Chrome Dev Tools at all.

It seems that downgrading to 3.4.17 fixes it indeed.

This seems of critical priority.

Edit: Nevermind, my issue is probably a different one. All versions up to 3.6.2 seem fine. It's just on 3.6.3 that this happens in my case. Opened #9690 instead

@jpvajda
Copy link
Contributor

jpvajda commented Jun 1, 2022

Thanks for reporting this! It sounds like #9690 is the issue we should look at, and this particular problem has been resolved with subsequent releases? We are currently at release 3.6.6 So if you haven't upgraded to the newest release, give it a try to see if it resolves these issues.

@jpvajda jpvajda added 🐞 bug 🏓 awaiting-contributor-response requires input from a contributor labels Jun 1, 2022
@jpvajda jpvajda self-assigned this Jun 1, 2022
@JustFly1984
Copy link
Author

Fixed in 3.6

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🏓 awaiting-contributor-response requires input from a contributor 🐞 bug
Projects
None yet
Development

No branches or pull requests

5 participants