Invalid type in JSON write (CBLQueryRow)

75 views
Skip to first unread message

Frederic Yesid Peña Sánchez

unread,
Feb 21, 2014, 7:59:54 PM2/21/14
to mobile-c...@googlegroups.com
What are the possibilities for triggering this error?

19:55:58.446‖ View: ...Finished re-indexing view Rutero_5 to #9686 (deleted 9, added 9)
2014-02-21 19:57:05.212 XXXXXX[993:461b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (CBLQueryRow)'
*** First throw call stack:
(0x2d528f4b 0x37bfa6af 0x2d528e8d 0x2df6a799 0x2df6c241 0x2d471f65 0x2d46b94d 0x2df6c189 0x2df6a715 0x2df6a4eb 0x2df6b381 0x1c0361 0x1c043b 0x1d9081 0x1d8c0d 0x1d90e7 0x1cc443 0x1ca46f 0x1a13fb 0x2df0ce9b 0x2d4f4183 0x2d4f3653 0x2d4f1e47 0x2d45cc27 0x2d45ca0b 0x2de4a3db 0x1a1203 0x2df0cc87 0x38221c1d 0x38221b8f 0x3821fc90)
libc++abi.dylib: terminating with uncaught exception of type NSException

Jens Alfke

unread,
Feb 21, 2014, 8:50:24 PM2/21/14
to mobile-c...@googlegroups.com

On Feb 21, 2014, at 4:59 PM, Frederic Yesid Peña Sánchez <freder...@gmail.com> wrote:

2014-02-21 19:57:05.212 XXXXXX[993:461b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (CBLQueryRow)'

“Invalid type” doesn’t appear anywhere in the Couchbase Lite sources, so I think that exception comes from NSJSONSerialization. Apparently it found a CBLQueryRow object in an array/dictionary being converted to JSON. Sounds like you tried to put one of those into a document somehow?

Knowing the backtrace would help. Set an all-exceptions breakpoint in Xcode (go to the breakpoints tab of the navigator and press the “+” button at the bottom left.)

—Jens

Frederic Yesid Peña Sánchez

unread,
Feb 23, 2014, 12:13:33 AM2/23/14
to mobile-c...@googlegroups.com
Dont worry, just a wrong parameter on a CBLLiveQuery.keys sent a CBLQueryRow instead of a NSString.

Thanks!


--
You received this message because you are subscribed to a topic in the Google Groups "Couchbase Mobile" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mobile-couchbase/MZCeNGIuV5A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mobile-couchba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/146541B1-EC60-40D4-BC6A-051AD0FCDB16%40couchbase.com.

For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages