YakovL commented on issue #174:
URL: https://github.com/apache/couchdb-nano/issues/174#issuecomment-1404664220
@glynnbird is the method you suggested supposed to be used regularly, or
nano is supposed to keep the auth alive? In my case, I'm experiencing a problem
where after a successful auth at some point I'm starting to get `Error: You are
not authorized to access this db`. Here's the full error:
```
at responseHandler (<project folder>\node_modules\nano\lib\nano.js:193:20)
at <project folder>\node_modules\nano\lib\nano.js:442:13
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
scope: 'couch',
statusCode: 401,
request: {
method: 'post',
headers: {
'content-type': 'application/json',
accept: 'application/json',
'user-agent': 'nano/10.1.1 (Node.js v16.13.1)',
'Accept-Encoding': 'deflate, gzip'
},
qsStringifyOptions: { arrayFormat: 'repeat' },
url: 'http://127.0.0.1:5984/test_polling_storage/_find',
params: undefined,
paramsSerializer: { serialize: [Function: serialize] },
data: '{"selector":{},"limit":100,"sort":[{"isoDate":"desc"}]}',
maxRedirects: 0,
httpAgent: CookieAgent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 80,
protocol: 'http:',
options: [Object: null prototype],
requests: [Object: null prototype] {},
sockets: [Object: null prototype],
freeSockets: [Object: null prototype] {},
keepAliveMsecs: 30000,
keepAlive: true,
maxSockets: 50,
maxFreeSockets: 256,
scheduling: 'lifo',
maxTotalSockets: Infinity,
totalSocketCount: 0,
jar: [CookieJar],
[Symbol(kCapture)]: false,
[Symbol(cookieOptions)]: [Object]
},
httpsAgent: CookieAgent {
_events: [Object: null prototype],
_eventsCount: 2,
_maxListeners: undefined,
defaultPort: 443,
protocol: 'https:',
options: [Object: null prototype],
requests: [Object: null prototype] {},
sockets: [Object: null prototype] {},
freeSockets: [Object: null prototype] {},
keepAliveMsecs: 30000,
keepAlive: true,
maxSockets: 50,
maxFreeSockets: 256,
scheduling: 'lifo',
maxTotalSockets: Infinity,
totalSocketCount: 0,
maxCachedSessions: 100,
_sessionCache: [Object],
jar: [CookieJar],
[Symbol(kCapture)]: false,
[Symbol(cookieOptions)]: [Object]
}
},
headers: {
uri: 'http://127.0.0.1:5984/test_polling_storage/_find',
statusCode: 401,
'cache-control': 'must-revalidate',
connection: 'close',
'content-type': 'application/json',
date: 'Thu, 26 Jan 2023 07:59:45 GMT',
'x-couch-request-id': 'd2b95b849e',
'x-couchdb-body-time': '0'
},
errid: 'non_200',
description: 'You are not authorized to access this db.',
error: 'unauthorized',
reason: 'You are not authorized to access this db.'
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]