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

No callback triggered after executing query #335

Open
AlexKashi opened this issue Apr 6, 2021 · 0 comments
Open

No callback triggered after executing query #335

AlexKashi opened this issue Apr 6, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@AlexKashi
Copy link

Describe the bug
A clear and concise description of what the bug is.

We run a version check by querying appsync when the onUserStateChanged userstate == SIGNED_IN.

Sometimes this version check fails to complete, no failure, no timeout, no response. This usually only happens once when the app is first started, when closing and reopening the app it works.

This problem typically happens when a user opens the app for the first time

To Reproduce
Steps to reproduce the behavior:



override fun onUserStateChanged(details: UserStateDetails) {
    when (details.userState) {
	    UserState.SIGNED_IN -> {
	         versionCheck() // queries appsyync for version info
	    }

           // more cases
      
    }
}


fun versionCheck() {
	let versionCode = 1
	let versionName = 1.0.0

	val query = GetVersionInfoQuery.builder().versionCode(versionCode).versionName(versionName).build()
	client.query(query)
	    .responseFetcher(NETWORK_ONLY)
	    .enqueue(object : GraphQLCall.Callback<GetVersionInfoQuery.Data?>() {
	        override fun onResponse(@Nonnull response: Response<GetVersionInfoQuery.Data?>) {

	        	// Handle Success (never called)

	        }

	        override fun onFailure(@Nonnull e: ApolloException) {

	        	// Handle Fail (never called)

	        }
	    })
}

Expected behavior
A clear and concise description of what you expected to happen.

Execute the query, and get a response either success or failure.

Environment(please complete the following information):

  • 3.1.3

Device Information (please complete the following information):

  • Pixel 2 Android 21-30 (simulator)
  • Samsung S10+ Real device
@gpanshu gpanshu added the pending-triage Issue is pending triage label May 1, 2023
@gpanshu gpanshu added bug Something isn't working and removed pending-triage Issue is pending triage labels Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants