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

Pending queries not notified on timeout (Apollo) #42

Open
arjan opened this issue Sep 12, 2019 · 1 comment
Open

Pending queries not notified on timeout (Apollo) #42

arjan opened this issue Sep 12, 2019 · 1 comment

Comments

@arjan
Copy link

arjan commented Sep 12, 2019

It seems that when a query takes longer than 10 seconds, the phoenix channel times out (10s is the default timeout when expecting a response to .push()).

When this happens, the query keeps being stuck in the networkStatus = 1 state (request pending), instead of that an error is pushed up the Apollo link chain.

I tracked it down to the pushRequestUsing function, where the onTimeout handler calls notifyActive(), whereas the onError handler calls abortNotifier. When I change the onTimeout to call abortNotifier(), all works as expected.

Is this something worth PR'ing or is there a different approach?

@slorber
Copy link

slorber commented Mar 27, 2020

Hi,

Do you think this is the same errur as this stacktrace?

AppApolloClient.tsx:230 createAbsintheSocketLink onError Error: channel join: timeout
    at createChannelJoinError (joinChannel.js:10)
    at joinChannel.js:16
    at Array.forEach (<anonymous>)
    at notifyErrorToAllActive (joinChannel.js:13)
    at Object.onTimeout [as callback] (joinChannel.js:31)
    at phoenix.js:1
    at Array.forEach (<anonymous>)
    at e.value (phoenix.js:1)
    at Object.callback (phoenix.js:1)
    at e.value (phoenix.js:1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants