parse-community / Parse-SDK-Android

The Android SDK for Parse Platform
https://parseplatform.org/
Other
1.88k stars 739 forks source link

ParseCloud.callFunctionInBackground is execute twice #1149

Open dubn10 opened 2 years ago

dubn10 commented 2 years ago

New Issue Checklist

Issue Description

When I switch wifi to mobile network, or the other way around, in the middle of a request, the cloud function is called twice.

Steps to reproduce

Do a CloudFuction call with ParseCloud.callFunctionInBackground, or ParseCloud.callFunction with mobile data and before this ends, change to wifi and thats do twice.

Environment

I do this with the last version of Parse 2.1.0, and 1.26

Parse Android SDK

parse-github-assistant[bot] commented 2 years ago

Thanks for opening this issue!

mtrezza commented 2 years ago

When I switch wifi to mobile network, or the other way around, in the middle of a request, the cloud function is called twice.

A switch from mobile data to WiFi should be handled by the OS and be opaque for the Parse SDK. I don't remember that the Android SDK cares or behaves differently based on the type of connection. Unless this is a phenomenon that can be configured by the Parse SDK via a OS API, I am not sure there is much to do about this on the Parse SDK side. See also https://github.com/parse-community/parse-server/issues/6744.