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

GamesClientStatusCodes.SNAPSHOT_CONTENTS_UNAVAILABLE status code returned when opening save backing #335

Open
JoeyRosicka opened this issue Aug 1, 2021 · 15 comments

Comments

@JoeyRosicka
Copy link

A description of the problem, and the behavior you expected instead.
Many of our users encounter a GamesClientStatusCodes.SNAPSHOT_CONTENTS_UNAVAILABLE status code when attempting to open their SnapshotsClient save backing on app startup. The expected behavior is for these users to be able to successfully open their save data.

A list of steps and/or a small snippet of sample code that can be taken to reproduce the problem in another app.

_snapshotsClient.open(SNAPSHOT_NAME, allowCreation).addOnCompleteListener(new OnCompleteListener<SnapshotsClient.DataOrConflict<Snapshot>>() {
public void onComplete(@NonNull Task<SnapshotsClient.DataOrConflict<Snapshot>> task) {
	shouldCancelTimer = true;
	if (openExpired) {
		debugLog("Save backing opening complete, but the timer has expired. Discarding.");
		return;
	}
	Log.tagI(TAG, "Open returned with result %s", task.isSuccessful());
	String statusMessage;
	try {
		SnapshotsClient.DataOrConflict<Snapshot> result = task.getResult(ApiException.class);
		debugLog("Result retrieved");
		if (!result.isConflict()) {// if data was successfully loaded and is up-to-date.
			snapshot = result.getData();
			statusMessage = "ok";
			debugLog("No conflict. " + (suppressLocalConflict ? "Proceeding." : "Checking for local conflict."));

...

	} catch (ApiException ex) {
		String err = "Google Play reported: " + CommonStatusCodes.getStatusCodeString(ex.getStatusCode());
		switch (ex.getStatusCode()) {
			case GamesClientStatusCodes.SNAPSHOT_CONTENTS_UNAVAILABLE: 
				statusMessage = "snapshot contents unavailable";
				openFailed(callbacks, SaveBackingErrorCode.SERVICE_ERROR, err);

...

		}
	}
}

When this bug started happening, and the frequency it occurs.
The first case we saw was on July 10th, 2021 (a couple per day). We saw a surge of cases on July 23rd, 2021 (~200 per day), then a bigger surge on July 30th, 2021 (~1300 per day).

A description of any workarounds you have found.
None.

A log file with a stack trace of the problem. To learn how to use the Android logging system, see Reading and Writing Logs.
We are unable to reproduce this so are unable to provide logs.

The main thing we're looking for here is any details about the cause of a GamesClientStatusCodes.SNAPSHOT_CONTENTS_UNAVAILABLE status code and whether there's anything we can do on our end to try to resolve it. The timeframe of when this started appearing does not line up with any app updates or other changes on our end, so we're confused about what could have triggered the surge of these cases.

@olehkuznetsov
Copy link
Contributor

Can you share your game package name, please?

@smile616
Copy link
Collaborator

smile616 commented Aug 2, 2021

In regards to the cases count, do you have the same stats but for number of affected users per day?

@JoeyRosicka
Copy link
Author

The package name is com.concretesoftware.pbachallenge_androidmarket

As for affected users per day:
July 10th: ~5 users per day
July 23rd: ~100 users per day
July 30th: ~600 users per day
It seems like these same users are being affected day-after-day.

@smile616
Copy link
Collaborator

smile616 commented Aug 3, 2021

Thank you, @JoeyRosicka.

@JoeyRosicka
Copy link
Author

Update on our end - still these same ~600 users who are getting SNAPSHOT_CONTENTS_UNAVAILABLE when attempting to retrieve their save snapshot. The documentation on this notes to "See the device logs for more details" and we have been able to take a look at some logcats, but we are not seeing anything related to the error.

It's been tough to find any additional information on SNAPSHOT_CONTENTS_UNAVAILABLE. Are there any notable situations where this error occurs?

@smile616
Copy link
Collaborator

smile616 commented Aug 6, 2021

@JoeyRosicka, thank you for the update.

Are there any notable situations where this error occurs?
Usually this code should be returned only if user lost the Internet connection while snapshot BLOB download.

We are investigating the issue on the Play Service side.
Would it be possible to share logcats/bugreports with us? Preferably link to a Google Drive folder but, please, don't accept access request unless it from @google.com email addresses.

@JoeyRosicka
Copy link
Author

@smile616 here is a logcat from one of the affected users - I'll grant access when I see a request. https://drive.google.com/drive/folders/1kM-LysGy4xL6jcKujJAELAcVCmZNPBXz?usp=sharing

Also this is probably implied, but just in case I'll note that this is a high-priority issue for us since we have a lot of users unable to access their save data. Thanks for continuing to look into this.

@smile616
Copy link
Collaborator

smile616 commented Aug 9, 2021

Thank you, @JoeyRosicka. Access request sent.

@smile616
Copy link
Collaborator

smile616 commented Aug 9, 2021

@JoeyRosicka
We've applied some steps on the Play Service side that should mitigate the error rate.
I keep the issue open for monitoring.

@JoeyRosicka
Copy link
Author

Thanks, very good to hear.

@JoeyRosicka
Copy link
Author

It looks like the error rate has dramatically decreased since August 10th which appears to line up with when you reporting your change on the Play Services side. Now seeing 5-10 users affected per day rather than hundreds.

@smile616
Copy link
Collaborator

Thank you, @JoeyRosicka, for the update.

@JoeyRosicka
Copy link
Author

No problem @smile616. Please let me know if there's anything we can do to help get the error rate down to 0.

@smile616
Copy link
Collaborator

Hi @JoeyRosicka, unfortunately, there is nothing can be done on your side. We expect that the error rate will reduce to 0 organically by mid September.

@JoeyRosicka
Copy link
Author

Alright, thanks for the update.

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

3 participants