-
-
Notifications
You must be signed in to change notification settings - Fork 736
Cloud function fails on Android 12 #1145
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
Comments
Thanks for opening this issue!
|
@buzmax Please update your post using the issue template. @L3K0V Side note, would it make sense / be possible to add various Android CI environments, like we run our Parse Server CI in various Node.js environments? |
@buzmax can you confirm that this happens on the latest version of the SDK? Can you share a bit more detailed log, not sure how ParseCloud is related with pending intents. |
I've pinned this issue; in case there is really an issue with Android 12, we need to address this urgently. There seem to be a lot of similar issues reported regarding other SDKs. As I understand, the issue only occurs when targeting Android 12, which will become mandatory by August 2022 on the Google Play Store. |
@buzmax We need more details. The error you are showing does not relate at all to calling cloud functions via Parse SDK. Please post a stack trace or snippet of code what you are doing around |
In case @buzmax doesn't respond, I think the way to try to replicate this is to have an Android app target Android 12 and try using the Parse SDK like calling a Cloud Code function. |
@mtrezza I have android sdk in production using cloud functions, no problems on any android |
@mtrezza To be precise I am now targeting API level 31 (Android 12) with
Need more data for this. |
Thanks @mman that's a good indication at least that you cannot replicate. I also found this comment:
I guess we can leave this open for some more weeks, and if no-one responds or confirms this we can close this issue. |
@mtrezza I will do some more investigation next week when I get a chance, but for now I think this is unrelated to Parse Android SDK. |
I guess one point of investigation could be to look whether the SDKs actually uses any PendingIntent. |
I'm in an old project that was using these libs for parse:
But because I had to update to sdk 31, I had this issue that @buzmax pointed out. Solved after updating gradle, kotlin and other stuff. But when I receive a push notification, the app crashes (on the super line):
I don't understand quite yet these "advanced" concepts, but, from where I'm standing, it looks like those old libs use pending intents somewhere. Right now, I'm struggling to properly update without causing this crash. One other thing is that I changed my old libs for the "new" ones:
And that solved this pending intent problem, but I'm having some other bugs related to some old custom code related to I thought that the problem seemed similar to mine, so I wanted to make it clear. I guess that's why this problem is in the Parse SDK issue list. |
Thanks, please let us know if you discover more. |
I tried it out with an old Parse Android SDK 1.24.2, targetSdkVersion 31, compileSdkVersion 31 on Android API 31 and was not able to reproduce the issue even with that old SDK version. I was able to reproduce this however by creating a I think to investigate this any further we need a full stack trace instead of just the error message. So we can know whether this comes from custom code or the Parse Android SDK, and from where inside the SDK exactly. I am closing this for now until someone can:
The Parse-SDK-Android/parse/src/main/java/com/parse/ParsePushBroadcastReceiver.java Lines 417 to 420 in 7d0faa3
Added in version 3.0.0 via #1139. Searching for I'll keep this pinned for visibility a little longer, in case others experience a similar issue. |
When I try to call cloud function (ParseCloud.callFunction...) on android 12 I get this exception:
❌ java.lang.IllegalArgumentException: com.onstruct.android.uat: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
The text was updated successfully, but these errors were encountered: