Hey guys!

Ever since the Android 13 update, I haven't been able to use Whatsapp in any work or user profiles. It'll go through the install and setup process just fine, but once that's done, it will just crash. (Pasted the crash report at the end of the post)

Any ideas as to what might be causing it? Seems to be some sort of permissions issue with the "calling identity", but I've tried giving Whatsapp all the permissions in both the work profile and user profile cases with no success. Is there something I'm missing when setting up these profiles?

I've factory reset my phone (Pixel 4) in hopes of resolving the issue, but the crashes still persist. I have found that Whatsapp does work in the main profile... However, I'd rather keep it in a work or separate user profile. I'd appreciate any help or ideas if you have any! :)

--
type: crash
osVersion: google/flame/flame:13/TP1A.220624.014/2022082400:user/release-keys
package: com.whatsapp:221776004
process: com.whatsapp

java.lang.SecurityException: Calling identity is not authorized
at android.os.Parcel.createExceptionOrNull(Parcel.java:3012)
at android.os.Parcel.createException(Parcel.java:2996)
at android.os.Parcel.readException(Parcel.java:2979)
at android.os.Parcel.readException(Parcel.java:2921)
at android.net.INetworkStatsService$Stub$Proxy.openSessionForUsageStats(INetworkStatsService.java:469)
at android.app.usage.NetworkStats.<init>(NetworkStats.java:111)
at android.app.usage.NetworkStatsManager.querySummary(NetworkStatsManager.java:424)
at android.app.usage.NetworkStatsManager.querySummary(NetworkStatsManager.java:397)
at X.0IW.A03(:56706)
at X.0IW.A02(:56702)
at X.04h.A02(:21821)
at X.04i.A02(:21863)
at X.04j.<init>(:21877)
at com.facebook.redex.RunnableBRunnable0Shape1S0200000_I0_1.run(:491918)
at com.whatsapp.util.RunnableTRunnableShape13S0200000_I0.run(:481553)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at com.facebook.redex.RunnableBRunnable0Shape8S0200000_I0_8.run(:483739)
at java.lang.Thread.run(Thread.java:1012)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.internal.util.Preconditions.checkCallAuthorization(Preconditions.java:247)
at com.android.server.devicepolicy.DevicePolicyManagerService.getProfileOwnerAsUser(DevicePolicyManagerService.java:9221)
at android.app.admin.DevicePolicyManager.isProfileOwnerApp(DevicePolicyManager.java:9198)
at android.net.NetworkStatsAccess.checkAccessLevel(NetworkStatsAccess.java:145)
at com.android.server.net.NetworkStatsService.checkAccessLevel(NetworkStatsService.java:1523)

Hi, may I know if you have Sandboxed Google Play Services installed on your work/user profile?

EDIT: I realised I've tried helping you with this issue before on the Matrix room. Sorry to hear that we didn't managed to get it fixed then.

I do no have Play Services installed in any profiles. At one point I tried installing them to see if that would fix the issue, but alas, it did not.

And, no worries - thanks again for your help! :)

    unexpired_spoilage Could you check if you've allowed phone calls and SMS on your user profile? Under Settings > System > Multiple users > (your user)

    Not that I know it has anything to do with WhatsApp, I'm just listing any ideas I can think of right now.

      jarelllama Ooooh, yeah, I tried that, but it still led to a crash. :/
      And, yeah, any ideas are welcome! :) I have a feeling it might be a super trivial thing that I'm overlooking, or something like that, haha!

        unexpired_spoilage Have you tried WhatsApp on a profile with Google Play Store and Google Play Services installed? When I had the same problem as you, the only difference between my setup now and then is the absence of Google Play.

        Oh yeah, I did that as well before the factory reset. Tried both in the work profile and in a separate user profile. Still crashed with the same crash report.

        Have you tied installing apk file instead from google services? I don't personally use this service at all due to their data collection and privacy violation they pull. I recommend you just use Signal app instead. It works fine on Android 13 without a problem. I did have internet problems with Android 13 lately but got that all fixed.

        Edward Snowden recommends it.

          My laymans eye leads me to ask how old is the version of Whatsapp that you are using? Calling identity is not authorized relates to the id calling an API, not the phone permission.

          com.android.server.devicepolicy.DevicePolicyManagerService.getProfileOwnerAsUser is apparently an outdated and restricted non-SDK interface that was restricted starting with Android12 for apps targeting Android 12 and later. This app may have worked in Android 12 when targeting Android 11 but likely became further restricted in Android13.

          Let me know and I will get a more authoritative answer and retract this as required.

            UnknownProperty You mean the Whatsapp APK from the Play Store? I had that one installed initially from the Aurora Store, and it is the one that started with the crashes. Since then, I've tried the Website version... which still crashes. :/
            And, I do use Signal! :D It's just that not everyone is on board, so I'm using Whatsapp for specific contacts. Though, I don't have much trust for Whatsapp - hence why I'd like to have it in a separate profile.

            MetropleX Ahhhh, alright. Thanks for the explanation! I'm using the latest version listed on the Whatsapp website (at least, the latest version as of a few days ago... I didn't write down the version number when I downloaded it). The website lists the latest version number as 2.22.20.80, so I imagine mine is just a few days behind that one. If it's the case that they're using an outdated interface, then I imagine there's not much I can do on my end? It's odd though, as when I asked this question in the Matrix room, it seemed that others were able to run it just fine in secondary profiles. Could this be device specific? Pixel 4 vs Pixel 5, for example?

              Hulk Ahhh, thanks! So, to clarify, do you recommend installing GSF and Play Services as well? Otherwise, wouldn't running the Google Play version be similar to running the website version or the Aurora store version?

                unexpired_spoilage the Aurora version IS the Google Play Version, Aurora is just an anonymous front end for accessing Google Play Store.

                Even though I separate them out to explain that, ALL Whatsapp sources you mention provide the exact same version as each source can be used to update the other.

                  MetropleX That's what I thought, thanks! Then that leads me back to the question, could the crash be an issue with Whatsapp, or is it an issue with the OS/device? I'm under the impression Whatsapp works fine for others who use it in a work or separate user profile.

                    22 days later

                    unexpired_spoilage did you ever find a solution to this? Just got a Pixel 7 and installed the experimental version. I'm totally aware that it's experimental, but I'm having this exact same issue. I have WhatsApp (latest) on my user profile (not the owner profile), sandboxed Google Play services installed etc.

                    I've seen some other users posting similar issues on Android 13 (not GrapheneOS) on other Facebook related apps. I suspect this is something that FB/WhatsApp would have to fix.

                      18 days later

                      flamepygmy I did not, unfortunately. And, yeah, I believe that the verdict was that it's an issue on FB/Whatsapp's side, as you said. I ended up installing WA on my main profile, but denied it contact permissions.

                      It is curious as to how the issue only seems to affect a minority of users. Must be a pretty specific setup that causes the crash?

                        2 months later

                        unexpired_spoilage I have the same issue on a Pixel 6. I've been trying different options for days trying to get it sorted without success and then I found your thread. Thanks for the info. Can you please let me know how WhatsApp behaves in your owner profile with no GSF? Do you still receive notifications for new messages and phone calls or do you have to open the app manually to see new messages and missed calls?