[4.0.1.45/48] WhatsApp starts only once

REPRODUCIBILITY: 99% (?)
BUILD ID: 4.0.1.45
HARDWARE: XA2 Ultra
UI LANGUAGE: Finnish
REGRESSION: Yes (worked in 3.4.0)

DESCRIPTION:

WhatsApp only starts once after initial start-up, registration and backup restore. It works Just Fine™ as long as I keep the app open. Closing WhatsApp or rebooting the device makes it start in the splaah screen (WhatsApp by Facebook or sth) only to close after a second or so. The application switcher turns into dark translucent empty view. Subsequent app starts result in the latter.

PRECONDITIONS:

  1. Have 3.4.0
  2. Use WhatsApp
  3. Upgrade to 4.0.1
  4. Try to start WhatsApp
  5. Clear WhatsApp cache and data
  6. Perform set-up wizard in WhatsApp
  7. WhatsApp works

STEPS TO REPRODUCE:

Open WhatsApp

EXPECTED RESULT:

WhatsApp opens

ACTUAL RESULT:

WhatsApp crashes/closes in splash screen

ADDITIONAL INFORMATION:

All other various Android apps work fine, it’s just WhatsApp.

No patches installed (but patchmanager 3 is installed).

MicroG version 0.2.17.204714 is installed.

Changing system files is enabled in Android settings for MicroG.

PS. This doesn’t seem to be a popular issue…

5 Likes

It looks like I’m the only one with this specific issue… :roll_eyes: Time to debug Android app shenanigans…

First, I updated WhatsApp to 2.21.2.19 but it didn’t help.

I found instructions from TJC - How to help debug android support - and gave lxc-attach -n aliendalvik -- /system/bin/logcat a spin. I think I caught the error:

D GmsGcmRegister: onBind: Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gms }
E AndroidRuntime: FATAL EXCEPTION: WhatsApp Worker #1
E AndroidRuntime: Process: com.whatsapp, PID: 4239
E AndroidRuntime: java.lang.IllegalStateException: Bandwidth module disabled
E AndroidRuntime: 	at android.os.Parcel.createException(Parcel.java:1958)
E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:1918)
E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:1868)
E AndroidRuntime: 	at android.net.INetworkStatsService$Stub$Proxy.openSessionForUsageStats(INetworkStatsService.java:271)
E AndroidRuntime: 	at android.app.usage.NetworkStats.<init>(NetworkStats.java:108)
E AndroidRuntime: 	at android.app.usage.NetworkStatsManager.querySummary(NetworkStatsManager.java:280)
E AndroidRuntime: 	at X.1ad.A02(:316389)
E AndroidRuntime: 	at X.1ad.A01(:316384)
E AndroidRuntime: 	at X.0RE.A00(:149190)
E AndroidRuntime: 	at X.0RE.A00(:149154)
E AndroidRuntime: 	at X.0Rb.<init>(:150436)
E AndroidRuntime: 	at java.lang.RunnableEBaseShape1S0200000_I0_0.run(:148673)
E AndroidRuntime: 	at java.lang.RunnableEBaseShape4S0200000_I0_3.run(:27302)
E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E AndroidRuntime: 	at java.lang.RunnableEBaseShape4S0200000_I0_3.run(:27294)
E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:764)
E AndroidRuntime: Caused by: android.os.RemoteException: Remote stack trace:
E AndroidRuntime: 	at com.android.server.net.NetworkStatsService.assertBandwidthControlEnabled(NetworkStatsService.java:1699)
E AndroidRuntime: 	at com.android.server.net.NetworkStatsService.openSessionInternal(NetworkStatsService.java:544)
E AndroidRuntime: 	at com.android.server.net.NetworkStatsService.openSessionForUsageStats(NetworkStatsService.java:523)
E AndroidRuntime: 	at android.net.INetworkStatsService$Stub.onTransact(INetworkStatsService.java:62)
E AndroidRuntime: 	at android.os.Binder.execTransact(Binder.java:731)
E AndroidRuntime: 
W ActivityManager:   Force finishing activity com.whatsapp/.Main

So I guess WhatsApp tries to log/track/monitor bandwidth usage, and fails miserably (Java.lang.IllegalStateException: Bandwidth module disabled) because the implementation is a stub (android.net.INetworkStatsService$Stub$Proxy.openSessionForUsageStats()) but I don’t know Jack about Android development, so…

One question rises: is this something that’s supposed to be implemented in Alien Dalvik, or could this be MicroG?

What follows is what I suspect to be a logging error:

E SQLiteDatabase: Error inserting _id=1 key_id=-1 chat_row_id=-1 from_me=0
E SQLiteDatabase: android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: message._id (code 1555 SQLITE_CONSTRAINT_PRIMARYKEY)
E SQLiteDatabase: 	at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
E SQLiteDatabase: 	at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:796)
E SQLiteDatabase: 	at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
E SQLiteDatabase: 	at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
E SQLiteDatabase: 	at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1564)
E SQLiteDatabase: 	at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1433)
E SQLiteDatabase: 	at X.08L.A0C(:49746)
E SQLiteDatabase: 	at X.08L.AA0(:50637)
E SQLiteDatabase: 	at X.08F.A08(:49464)
E SQLiteDatabase: 	at X.01n.A01(:26032)
E SQLiteDatabase: 	at X.1HQ.run(:279899)
E SQLiteDatabase: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E SQLiteDatabase: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E SQLiteDatabase: 	at java.lang.RunnableEBaseShape4S0200000_I0_3.run(:27294)
E SQLiteDatabase: 	at java.lang.Thread.run(Thread.java:764)

G’night lads and lasses. I finished reflashing my XA2 Ultra, and, without installing MicroG, WhatsApp still refuses to start the second time - the error message is the same:

java.lang.IllegalStateException: Bandwidth module disabled

So, I guess that’s it, folks! No more WhatsApp for me!

It’s strange that no one else has encountered this issue. I wonder what causes it…

Whatsapp is working for me on Sailfish 4 Kodi, XA2 dual sim

After founding this hardcoded nemo home path and fixing it in the said file (and after fixing WhatsApp folder permissions, too), I was able to restore WhatsApp messages from the last backup. Now I’m afraid to close WhatsApp again :sweat_smile:

I accidentally closed WhatsApp and it still doesn’t open again, even after the fixes… I really need help with this…

I just installed 4.0.1.48 on my XA2 Dual Sim and has the exact same problem with Whatsapp.
Works if you do a fresh install and then crashes everytime you launch it again.

1 Like

Welcome to the forum! And sorry that this had to be the first issue…! :slight_smile:

Did you have WhatsApp installed and running before installing 4.0.1.xx? If you check logcat output (link above), do you get the Bandwidth module disabled message too?

Hi there.
I’m not quite new as i had few topics on jolla together former forum but it’s indeed my first message here :slight_smile:

Whatsapp was running fine before the Koli update and i have exact same log after launching whatsapp now

E AndroidRuntime: FATAL EXCEPTION: WhatsApp Worker #1
E AndroidRuntime: Process: com.whatsapp, PID: 12527
E AndroidRuntime: java.lang.IllegalStateException: Bandwidth module disabled
E AndroidRuntime:        at android.os.Parcel.createException(Parcel.java:1958)
E AndroidRuntime:        at android.os.Parcel.readException(Parcel.java:1918)
E AndroidRuntime:        at android.os.Parcel.readException(Parcel.java:1868)
E AndroidRuntime:        at android.net.INetworkStatsService$Stub$Proxy.openSessionForUsageStats(INetworkStatsService.java:271)
E AndroidRuntime:        at android.app.usage.NetworkStats.<init>(NetworkStats.java:108)
E AndroidRuntime:        at android.app.usage.NetworkStatsManager.querySummary(NetworkStatsManager.java:280)
E AndroidRuntime:        at X.1ad.A02(:315926)
E AndroidRuntime:        at X.1ad.A01(:315921)
E AndroidRuntime:        at X.0RD.A00(:148682)
E AndroidRuntime:        at X.0RD.A00(:148646)
E AndroidRuntime:        at X.0Ra.<init>(:149928)
E AndroidRuntime:        at java.lang.RunnableEBaseShape1S0200000_I0_0.run(:148165)
E AndroidRuntime:        at java.lang.RunnableEBaseShape4S0200000_I0_3.run(:27029)
E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E AndroidRuntime:        at java.lang.RunnableEBaseShape4S0200000_I0_3.run(:27021)
E AndroidRuntime:        at java.lang.Thread.run(Thread.java:764)
E AndroidRuntime: Caused by: android.os.RemoteException: Remote stack trace:
E AndroidRuntime:        at com.android.server.net.NetworkStatsService.assertBandwidthControlEnabled(NetworkStatsService.java:1699)
E AndroidRuntime:        at com.android.server.net.NetworkStatsService.openSessionInternal(NetworkStatsService.java:544)
E AndroidRuntime:        at com.android.server.net.NetworkStatsService.openSessionForUsageStats(NetworkStatsService.java:523)
E AndroidRuntime:        at android.net.INetworkStatsService$Stub.onTransact(INetworkStatsService.java:62)
E AndroidRuntime:        at android.os.Binder.execTransact(Binder.java:731)

So, my background is the same. I was using WhatsApp previously for many SFOS releases, and Koli made it not work…

Could it be something in XA2 images or hardware?

Is there anyone else with a device something other than XA2 who suffers from this?

Hey! I’m on that situation too, and to make things worse i’m traveling…

1 Like

Same here.
Reinstalled and 1st start is fine, I was able to restore backup and receive all messages missed while it was not starting…

And then… closed it by mistake :man_facepalming: … Only way to get it back was to reinstall again (maybe clean data would work also).

Now it’s working again (before I close it), but all messages received on previous success are gone :sob: (those were 100+)

P.S. XA2 DualSim

1 Like

Hi and welcome!

Do you have a XA2 by any chance?

PS. Okay, one more XA2 to the list…

I just updated WhatsApp to 2.21.3.19 and it still closes on startup.

Edit: The error message in locgat is still the same.

Still the same with WhatsApp 2.21.4.22.

I guess this issue will be left as-is, as WhatsApp doesn’t like the privacy Jolla enforces, and Jolla doesn’t like WhatsApp doing things it shouldn’t :stuck_out_tongue_winking_eye:

1 Like

And again another point (besides many other bug reports of 4.0) to not risk updating a daily driver device!
Seems I will be banned with 3.2.1.20 …

:frowning:

Don’t get me wrong. I can always go back to 3.4 if I really needed WhatsApp.

Then again, a stable update shouldn’t break things… Okay, 4.0 was a major update, and Android support version was bumped too, so more hiccups are to be expected. And it looks like it’s WhatsApp to blame here, as it looks like it’s trying to use a feature without proper permission… (What’s it doing with it anyway?)

1 Like

Hi,
I have exactly the same problem. I have tried to remove all the microg apps, but nothing changed .

Same issue here on my Xperia 10.

So this means downgrading back to 3.4? Nice way to spend my saturday afternoon :frowning: