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

cancelPayload() throws ApiException: 8014: STATUS_PAYLOAD_UNKNOWN #289

Open
Luosoha opened this issue Mar 3, 2023 · 0 comments
Open

cancelPayload() throws ApiException: 8014: STATUS_PAYLOAD_UNKNOWN #289

Luosoha opened this issue Mar 3, 2023 · 0 comments

Comments

@Luosoha
Copy link

Luosoha commented Mar 3, 2023

This is the exception message that I got from calling cancelPayload().

nearbyConnectionsClient.cancelPayload(payloadId)
        .addOnFailureListener {
              // com.google.android.gms.common.api.ApiException: 8014: STATUS_PAYLOAD_UNKNOWN
        }

So here is what happened:

First, I create multiple payloads from files then send them with something like this:

payloads.forEach {
        Log.d("hails", "sendFilesAsPayload: ${it.id}")
        nearbyConnectionsClient.sendPayload(endpointId, it)
}

Then while the files are being transferring, I call cancelPayload() on the last payload (or any payloads that hasn't started yet). And so the exception gets throw on addOnFailureListener.

I did made sure to call cancelPayload() on the correct payloadId (I logged them and the one being sent and the one being called cancel on has the exact same id).

Any ideas or suggestions on which has caused the exception would be appreciated.

For short, cancelPayload() just is not working for me.

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

1 participant