forcedotcom / SalesforceMobileSDK-Android

Android SDK for Salesforce
Other
339 stars 384 forks source link

android.os.TransactionTooLargeException #2573

Open Deepika-PFJ opened 4 weeks ago

Deepika-PFJ commented 4 weeks ago

Please fill out the following details:

  1. Version of Mobile SDK Used: 11.0.0
  2. Issue found in Native App or Hybrid App: Native
  3. OS Version: 14
  4. Device: Samsung Galaxy S23 Ultra
  5. Steps to reproduce: No clear steps to reproduce, Its random crash in SDK code
  6. Actual behavior: App is crashing
  7. Expected Behavior: App should not crash
  8. Error Log:
    Fatal Exception: java.lang.RuntimeException android.os.TransactionTooLargeException: data parcel size 1340264 bytes Bundle stats: android:viewHierarchyState [size=1296] android:views [size=1248] androidx.lifecycle.BundlableSavedStateRegistry.key [size=1228] WEBVIEW_CHROMIUM_STATE [size=1336560] PersistableBundle stats: [null] Caused by android.os.TransactionTooLargeException data parcel size 1340264 bytes
wmathurin commented 4 weeks ago

There is not enough information to pinpoint the source of the problem. With the given information, it is unclear whether it is an app or SDK issue. There are some good ideas in this stack overflow post. Please have a look and let us know if you can narrow it down a bit.

Deepika-PFJ commented 3 weeks ago

@wmathurin After multiple attempts, I was able to reproduce the issue. Here are the steps:

  1. Launch LoginActivity and toggle between background and foreground a few times. The app crashes in the onSaveInstanceState method whenwebviewHelper.saveState(bundle); is called.
  2. The crash also occurs in the OAuthWebviewHelper constructor when the saved instance state is being read and the WebView state is being restored.
wmathurin commented 2 weeks ago

Could you try with the latest version of Mobile SDK to make sure the issue exists there also?