question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Queries hang and are not issued on network requests

See original GitHub issue

Intended outcome:

Queries should be dispatched to the network.

Actual outcome:

Queries are not dispatched to the network, they just hang.

While using apollo-angular@3.0.1 with @apollo/client@3.6.x it appears that some queries start hanging after a while.

I’m also using graphql-code-generator to generate an apollo-angular data service, so usage looks like this:

this.someQuery
      .fetch({
        myVariable: 1
      })
      .pipe(map((res) => res.data.someQuery))
      .subscribe(foo => console.log(foo));

After a while (within 1-2 minutes), the subscribe block will not be called any more. This can also be used with rxjs’s await firstValueFrom(...) and the promise will never resolve.

Downgrading to 3.6.2 3.5.10 seems to fix the problem.

How to reproduce the issue:

Unfortunately no repro, but hopefully it might be easy to pinpoint what would affect these by comparing 3.6.2 to 3.6.3. 3.6.0 and 3.5.10.

Versions

System:
    OS: macOS 12.3.1
  Binaries:
    Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
    Yarn: 3.2.0-git.20220329.hash-0764215 - ~/.nvm/versions/node/v16.14.2/bin/yarn
  Browsers:
    Chrome: 101.0.4951.54
    Safari: 15.4
  npmPackages:
    @apollo/client: 3.6.3 => 3.6.3
    apollo-angular: ^3.0.1 => 3.0.1 
    apollo-link-scalars: ^4.0.1 => 4.0.1

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:5
  • Comments:45 (32 by maintainers)

github_iconTop GitHub Comments

4reactions
benjamncommented, May 31, 2022

@jdmoody I appreciate all the details, and while I share your uncertainty about how many different issues we’re talking about here, I think there must be something wrong with BatchHttpLink, probably a bug that’s been there for a while but was only revealed by other changes recently, so that’s what I’m currently looking into.

3reactions
andrew-hu368commented, Jun 8, 2022

Run some e2e tests on 3.7.0-beta.3 and they are all green. Thanks for the update @benjamn

Read more comments on GitHub >

github_iconTop Results From Across the Web

Queries appear to hang and sometimes fail to reach the cluster
You experience an issue with queries completing, where the queries appear to be running but hang in the SQL client tool. Sometimes the...
Read more >
Hanging connections on Mac OS - Stack Overflow
I have this problem only on Mac OS (Google Chrome, Safari and Firefox); On Windows 10 it works just as expected; no pending...
Read more >
Understand and resolve SQL Server blocking problems
This article provides instruction on first understanding what blocking is in terms of SQL Server and furthermore how to investigate its ...
Read more >
JDBC Causes WebLogic Server Hang Support Pattern
This document discusses how to troubleshoot and fix WebLogic Server hang caused by JDBC configuration and related resources.
Read more >
chrome requests get stuck pending - nginx - Server Fault
Open the network debugger in Chrome and try to reproduce a stuck request. It will show you an exact timeline: when the request...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found