Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commenting on a post crashes the app #20306

Closed
twstokes opened this issue Mar 12, 2023 · 7 comments
Closed

Commenting on a post crashes the app #20306

twstokes opened this issue Mar 12, 2023 · 7 comments

Comments

@twstokes
Copy link
Contributor

Expected behavior

App does not crash and the comment is successfully submitted.

Actual behavior

App crashes.

comment_crash.mp4

Steps to reproduce the behavior

  1. Cold start the Jetpack or WordPress app
  2. Logged in to a WordPress.com account, go to Reader
  3. Select a post where comments can be submitted (example)
  4. Submit a comment

Crash data

Error output:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'nil is not a valid object ID'

Exception backtrace:

#0	0x000000018040e7bc in __exceptionPreprocess ()
#1	0x0000000180051144 in objc_exception_throw ()
#2	0x0000000184539208 in -[NSManagedObjectContext existingObjectWithID:error:] ()
#3	0x0000000104216488 in __54-[CommentService replyToPost:content:success:failure:]_block_invoke_3 at /Users/tanner/dev/WordPress-iOS/WordPress/Classes/Services/CommentService.m:690
#4	0x00000001050f9778 in thunk for @escaping @callee_unowned @convention(block) (@unowned NSManagedObjectContext) -> () ()
#5	0x00000001050f9be4 in closure #1 in closure #1 in ContextManager.performAndSave(_:completion:on:) at /Users/tanner/dev/WordPress-iOS/WordPress/Classes/Utility/ContextManager.swift:91
#6	0x00000001050ff168 in partial apply for closure #1 in closure #1 in ContextManager.performAndSave(_:completion:on:) ()
#7	0x0000000104269488 in thunk for @escaping @callee_guaranteed () -> () ()
#8	0x00000001845402c0 in developerSubmittedBlockToNSManagedObjectContextPerform ()
#9	0x000000010e749d5c in _dispatch_client_callout ()
#10	0x000000010e752040 in _dispatch_lane_serial_drain ()
#11	0x000000010e752d80 in _dispatch_lane_invoke ()
#12	0x000000010e760b40 in _dispatch_workloop_worker_thread ()
#13	0x00000001b0598b40 in _pthread_wqthread ()
#14	0x00000001b0597904 in start_wqthread ()
Tested on iPhone 14, iOS 16.2, WPiOS 21.8, 21.9, JPiOS 12.8, 12.9
@twstokes
Copy link
Contributor Author

👋 @crazytonyli would you mind investigating this? It may be related to this PR. Thanks!

@sentry-io
Copy link

sentry-io bot commented Mar 12, 2023

Sentry issue: WORDPRESS-IOS-3PSC

@sentry-io
Copy link

sentry-io bot commented Mar 12, 2023

Sentry issue: JETPACK-IOS-S4

@sentry-io
Copy link

sentry-io bot commented Mar 12, 2023

Sentry issue: JETPACK-IOS-PF

@filipanoscampos
Copy link

Ran into this issue, here:
6033742-zd-woothemes

In the above case, the app only crashes when they comment within the reader of the Jetpack app, or in comments when they click on "notifications" from other blogs and attempt to reply.

@hassaanelgarem
Copy link
Contributor

@filipanoscampos We are working on releasing a hotfix (21.8.2) that fixes this issue. You can follow along the release updates here: p8Qyks-5e0-p2

@hassaanelgarem
Copy link
Contributor

#20321 lands the fix into trunk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants