question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Couchbase Lite parsing nested value as UInt64 then throwing exception on update.

See original GitHub issue

Library Version

2.0.3

.NET Runtime

Xamarin iOS .NET Standard 2.0

Operating System / Device Details

iOS Simulator iOS 11.4

Log Output

stack trace.txt

Expected behavior

Either value should have been parse by couchbase lite as a uint rather than UInt64 or couchbase lite should accept UInt64 as a valid upload type (maybe cast under the hood?).

Actual behavior

Couchbase lite parses non floating type values as UInt64 which then are rejected when an update is requested. (See method mutableDoc.SetValue(key, value);).

Steps To Reproduce

  1. Create a dictionary where one of the values is another dictionary that has at least one whole number as a value. This can be passed in as a double but when it is uploaded to couchbase server it will have no decimal points in the json.
  2. Get the document you’ve created using the couchbase id and get the dictionary from it using document.ToDictionary();
  3. Dont change the number value in the nested dictionary but still use the mutableDocument SetValue method to update the nested dictionary value. You will see the crash.

Reproduction Project

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
borrrdencommented, Aug 2, 2018

@djpongh Can I sneak this into 2.1? It’s very small but saves a lot of hassle if it’s there. All that is required is adding a type to the list of acceptable CBL types.

0reactions
borrrdencommented, Aug 9, 2018

Well I added the type anyway, and added a test to make sure that ulong can be inserted. However, there is no API to directly insert ulong so if it exceeds the signed 64-bit max value the only way to retrieve it will be through the untyped GetValue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Couchbase Lite Xamarin: Is there a limit of nested AND ...
Hello, I see this (caught) exception in logs since I started implementing a complex query that has 14 nested “AND” conditions as it's ......
Read more >
Updating nested array n1ql - couchbase
I had to update an object within a nested array, recently in Couchbase. ... 'FileStaging' END WHERE type = 'runLog' AND documentMetadata.
Read more >
sitemap_1.xml
... /t/filtering-data-in-collection-containing-documents-with-3-level-nested-arrays-depending-on-the-values-in-the-first-and-last-nested-array-mongo/160829 ...
Read more >
Use Go1.11 module (#5743) · d77176912b - aiforge-1
Migrate to go modules * make vendor * Update mvdan.cc/xurls * make vendor * Update code.gitea.io/git ... TOML parser and encoder for Go...
Read more >
Open Source Used In Firepower 7.4.0
This document contains licenses and notices for open source software used in this product.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found