UPSERT not working on couchbase 3.2.0 sdk, getting authentication error

Hi,

UPSERT not working on couchbase 3.2.0 sdk, getting below authentication error. but command UPSERT INTO xyz (KEY, VALUE)
VALUES (“temp-key”, { “type” : “hotel”, “name” : “new hotel” });
on the UI query editor runs successfully. kindly suggest.

AuthenticationFailureError: authentication failure
at Object.translateCppError (C:\Users\dev\Desktop\Repos\workorder-api\node_modules\couchbase\dist\bindingutilities.js:190:20)
at C:\Users\dev\Desktop\Repos\workorder-api\node_modules\couchbase\dist\connection.js:237:54 {
cause: LibcouchbaseError: libcouchbase error 206
at Object.translateCppError (C:\Users\dev\Desktop\Repos\workorder-api\node_modules\couchbase\dist\bindingutilities.js:174:21)
at C:\Users\dev\Desktop\Repos\workorder-api\node_modules\couchbase\dist\connection.js:237:54 {
code: 206
},
context: KeyValueErrorContext {
status_code: 255,
opaque: 0,
cas: CbCas { ‘0’: <Buffer 00 00 00 00 00 00 00 00> },
key: ‘temp-key’,
bucket: ‘xyz’,
collection: ‘_default’,
scope: ‘_default’,
context: ‘’,
ref: ‘’
}
}

@jatin1113 Thank you for using Couchbase products. Can you please give sample code to reproduce your issue? Otherwise try this sample code mentioned here Couchbase Playground (You can try this yourself and play with the code)

let me give you the background, recently we had changed the underlined OS from Ubuntu to RHEL.
Just changed in Dev environment now, Code was working fine before the OS change in DEV and code is working fine in other environments. There is no change in Code SDK. Issue is coming only on Dev environment and only while running the command using SDK, Command is working fine on couchbase console in query editor.

Hello @jatin1113 not to say what you are experiencing will be fixed. But can you get the latest release of SDK ie. 3.2.1 ?
3.2.0 had some noticeable errors with respect to segfault in certain OS. Let us know what you see once you have 3.2.1, if you still experience the problem at-least we would have ruled out that its not related to 3.2.0.

Has anyone resolved this issue? I’m getting the same issue.

My code is the same as the code example from the Couchbase Playground that @raju provided. It runs fine on my laptop which runs Ubuntu 21.04. But when I run it on RHEL 7.9, I get LibcouchbaseError: libcouchbase error 206 when updating the document.

I’m using Couchbase 6.5.1 and version 3.2.3 of the couchbase npm package on Node v12.22.7

Can anyone from Couchbase confirm that the code example should work with RHEL 7.9 and Couchbase 6.5.1 on Node v12?

Thanks.

I was able to resolve my issue by downgrading the couchbase npm package from 3.2.3 to 2.6.12.

1 Like