wordpress-mobile / wordpress-mobile/WordPress-Android
NullPointerException
Open
Nobody has claimed this yet.
[Type] Crash
Posting/Editing
- Dominant language
- Kotlin
- Stars
- 3.2k
- Forks
- 1.4k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 69
Description
Sentry Issue: WORDPRESS-ANDROID-2YSX
NullPointerException: None
at org.wordpress.android.ui.posts.EditPostRepository.getFeaturedImageId(EditPostRepository.kt:84)
get() = post!!.featuredImageId
at org.wordpress.android.ui.posts.EditPostActivity.getGutenbergPropsBuilder(EditPostActivity.kt:2458)
val featuredImageId = editPostRepository.featuredImageId.toInt()
at org.wordpress.android.ui.posts.EditPostActivity.onXpostsSettingsCapability(EditPostActivity.kt:2451)
(editorFragment as GutenbergEditorFragment).updateCapabilities(gutenbergPropsBuilder)
at org.wordpress.android.ui.posts.EditPostActivity.access$updateOnSuccessfulUpload(EditPostActivity.kt:260)
@Suppress("LargeClass")
at org.wordpress.android.ui.posts.EditPostActivity.access$onXpostsSettingsCapability(EditPostActivity.kt:260)
@Suppress("LargeClass")
...
(14 additional frame(s) were not displayed)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Sentry stack trace and inspect EditPostRepository.kt at getFeaturedImageId, then follow its use in EditPostActivity.kt at getGutenbergPropsBuilder and onXpostsSettingsCapability. Determine why post can be null on this path and define completion as preventing the NullPointerException without breaking the capability update flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100