wordpress-mobile / WordPress-Android

WordPress for Android
http://android.wordpress.org
GNU General Public License v2.0
2.96k stars 1.31k forks source link

NullPointerException #20880

Open sentry-io[bot] opened 4 months ago

sentry-io[bot] commented 4 months ago

Sentry Issue: JETPACK-ANDROID-QZ1

NullPointerException: None
    at org.wordpress.android.ui.posts.EditPostRepository.isPage(EditPostRepository.kt:78)
    get() = post!!.isPage
    at org.wordpress.android.ui.posts.PostsListActivity$initViewModel$8.invoke(PostsListActivity.kt:313)
    isPage = editPostRepository.isPage
    at org.wordpress.android.ui.posts.PostsListActivity$initViewModel$8.invoke(PostsListActivity.kt:308)
    viewModel.openPrepublishingBottomSheet.observeEvent(this@PostsListActivity) {
    at org.wordpress.android.viewmodel.EventKt$observeEvent$1.invoke(Event.kt:36)
    this.observe(owner, { it?.getContentIfNotHandled()?.let(block) })
    at org.wordpress.android.viewmodel.EventKt$observeEvent$1.invoke(Event.kt:36)
    this.observe(owner, { it?.getContentIfNotHandled()?.let(block) })
...
(15 additional frame(s) were not displayed)
dangermattic commented 4 months ago

Thanks for reporting! 👍

sentry-io[bot] commented 4 months ago

Sentry Issue: WORDPRESS-ANDROID-2V12

AjeshRPai commented 3 months ago

@notandyvee I was able to reproduce this crash. Not consistently but more than once. Sentry event on my testing device 1, 2.

Steps to reproduce

Scenario 1

  1. Go to Post list
  2. Publish a post → Make some changes but don't update the post
  3. Go to Post list → Click on the more menu → Select Preview
  4. Close the Preview screen
  5. Click on More → Publish

Scenario 2

  1. Create a Draft
  2. Press back → More icon → Click on Publish
  3. Wait until the social accounts connect section is loaded
  4. Rotate the phone
  5. Press not now and press publish

cc @zwarm since you were also looking into this issue.

zwarm commented 3 months ago

🫤 I am unable to reproduce the issue with these steps, but it's a new direction to go in. Thanks.