lemonai icon indicating copy to clipboard operation
lemonai copied to clipboard

data: { code: 401, message: 'Unauthorized: Missing Token' }

Open kingyyp opened this issue 1 year ago • 2 comments

this is a bug ?

However, if forced to choose, perhaps none of them are a perfect match, but since the user asked for the closest, I might have to select one. But given the analysis, it seems there's no direct match. So, maybe the answer is that there's no historical goal example related to Samsung.

{"id": "None"}{"level":"error","time":"2025-06-16T05:58:36.154Z","pid":49,"hostname":"c054ce2d4351","name":"AgenticAgent","msg":"Planning failed: Cannot read properties of null (reading 'dataValues')"} {"level":"error","time":"2025-06-16T05:58:36.155Z","pid":49,"hostname":"c054ce2d4351","name":"AgenticAgent","msg":"Agent run failed: Planning failed: Cannot read properties of null (reading 'dataValues')"} {"role":"assistant","uuid":"","status":"success","content":"Planning failed: Cannot read properties of null (reading 'dataValues')","comments":"","memorized":"","timestamp":1750053516181,"meta":{"task_id":"","action_type":"error","filepath":"","url":"","json":[],"content":""}}Agent run error: Error: Planning failed: Cannot read properties of null (reading 'dataValues') at AgenticAgent.plan (/app/src/agent/AgenticAgent.js:196:13) at async AgenticAgent.run (/app/src/agent/AgenticAgent.js:74:7) --> POST /api/agent/run 200 264s 4.13kb <-- GET /api/users/userinfo Request URL: /api/users/userinfo xxx GET /api/users/userinfo 401 1,133ms - server error AxiosError: Request failed with status code 401 at settle (/app/node_modules/axios/dist/node/axios.cjs:2053:12) at IncomingMessage.handleStreamEnd (/app/node_modules/axios/dist/node/axios.cjs:3170:11) at IncomingMessage.emit (node:events:530:35) at endReadableNT (node:internal/streams/readable:1698:12) at process.processTicksAndRejections (node:internal/process/task_queues:90:21) at Axios.request (/app/node_modules/axios/dist/node/axios.cjs:4280:41) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) at async forwardRequest (/app/src/routers/user/users.js:20:18) at async /app/src/routers/user/users.js:27:14 at async module.exports (/app/src/middlewares/setGlobalToken.js:15:3) at async /app/src/app.js:41:3 at async serve (/app/node_modules/koa-static/index.js:53:9) at async /app/src/app.js:31:3 at async logger (/app/node_modules/koa-logger/index.js:67:7) at async exports (/app/src/middlewares/wrap.context.js:34:5) { code: 'ERR_BAD_REQUEST', config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [ 'xhr', 'http', 'fetch' ], transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: Infinity, env: { FormData: [Function [FormData]], Blob: [class Blob] }, validateStatus: [Function: validateStatus], headers: Object [AxiosHeaders] { Accept: 'application/json, text/plain, /', 'Content-Type': 'application/json', authorization: undefined, 'User-Agent': 'axios/1.10.0', 'Content-Length': '2', 'Accept-Encoding': 'gzip, compress, deflate, br' }, method: 'get', url: 'https://sub-server.lemonai.cc/api/users/userinfo', data: '{}', allowAbsoluteUrls: true }, request: <ref *1> ClientRequest { _events: [Object: null prototype] { abort: [Function (anonymous)], aborted: [Function (anonymous)], connect: [Function (anonymous)], error: [Function (anonymous)], socket: [Function (anonymous)], timeout: [Function (anonymous)], finish: [Function: requestOnFinish] }, _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: false, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 2, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, _header: 'GET /api/users/userinfo HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'Content-Type: application/json\r\n' + 'User-Agent: axios/1.10.0\r\n' + 'Content-Length: 2\r\n' + 'Accept-Encoding: gzip, compress, deflate, br\r\n' + 'Host: sub-server.lemonai.cc\r\n' + 'Connection: keep-alive\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: Agent { _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: 1000, keepAlive: true, maxSockets: Infinity, maxFreeSockets: 256, scheduling: 'lifo', maxTotalSockets: Infinity, totalSocketCount: 1, maxCachedSessions: 100, _sessionCache: [Object], [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false }, socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/api/users/userinfo', _ended: true, res: IncomingMessage { _events: [Object], _readableState: [ReadableState], _maxListeners: undefined, socket: null, httpVersionMajor: 1, httpVersionMinor: 1, httpVersion: '1.1', complete: true, rawHeaders: [Array], rawTrailers: [], joinDuplicateHeaders: undefined, aborted: false, upgrade: false, url: '', method: null, statusCode: 401, statusMessage: 'Unauthorized', client: [TLSSocket], _consuming: false, _dumped: false, req: [Circular *1], _eventsCount: 4, responseUrl: 'https://sub-server.lemonai.cc/api/users/userinfo', redirects: [], [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false, [Symbol(kHeaders)]: [Object], [Symbol(kHeadersCount)]: 16, [Symbol(kTrailers)]: null, [Symbol(kTrailersCount)]: 0 }, aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'sub-server.lemonai.cc', protocol: 'https:', _redirectable: Writable { _events: [Object], _writableState: [WritableState], _maxListeners: undefined, _options: [Object], _ended: true, _ending: true, _redirectCount: 0, _redirects: [], _requestBodyLength: 2, _requestBodyBuffers: [], _eventsCount: 3, _onNativeResponse: [Function (anonymous)], _currentRequest: [Circular *1], _currentUrl: 'https://sub-server.lemonai.cc/api/users/userinfo', [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false }, [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kChunkedBuffer)]: [], [Symbol(kChunkedLength)]: 0, [Symbol(kSocket)]: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, secureConnecting: false, _SNICallback: null, servername: 'sub-server.lemonai.cc', alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object: null prototype], _eventsCount: 9, connecting: false, _hadError: false, _parent: null, _host: 'sub-server.lemonai.cc', _closeAfterHandlingError: false, _readableState: [ReadableState], _writableState: [WritableState], allowHalfOpen: false, _maxListeners: undefined, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: [TLSWrap], _requestCert: true, _rejectUnauthorized: true, timeout: 5000, parser: null, _httpMessage: null, [Symbol(alpncallback)]: null, [Symbol(res)]: [TLSWrap], [Symbol(verified)]: true, [Symbol(pendingSession)]: null, [Symbol(async_id_symbol)]: -1, [Symbol(kHandle)]: [TLSWrap], [Symbol(lastWriteQueueSize)]: 0, [Symbol(timeout)]: Timeout { _idleTimeout: 5000, _idlePrev: [TimersList], _idleNext: [Timeout], _idleStart: 293905, _onTimeout: [Function: bound ], _timerArgs: undefined, _repeat: null, _destroyed: false, [Symbol(refed)]: false, [Symbol(kHasPrimitive)]: false, [Symbol(asyncId)]: 4539, [Symbol(triggerId)]: 4537, [Symbol(kAsyncContextFrame)]: undefined }, [Symbol(kBuffer)]: null, [Symbol(kBufferCb)]: null, [Symbol(kBufferGen)]: null, [Symbol(shapeMode)]: true, [Symbol(kCapture)]: false, [Symbol(kSetNoDelay)]: false, [Symbol(kSetKeepAlive)]: true, [Symbol(kSetKeepAliveInitialDelay)]: 1, [Symbol(kBytesRead)]: 0, [Symbol(kBytesWritten)]: 0, [Symbol(connect-options)]: [Object] }, [Symbol(kOutHeaders)]: [Object: null prototype] { accept: [Array], 'content-type': [Array], 'user-agent': [Array], 'content-length': [Array], 'accept-encoding': [Array], host: [Array] }, [Symbol(errored)]: null, [Symbol(kHighWaterMark)]: 65536, [Symbol(kRejectNonStandardBodyWrites)]: false, [Symbol(kUniqueHeaders)]: null }, response: { status: 401, statusText: 'Unauthorized', headers: Object [AxiosHeaders] { server: 'nginx/1.20.1', date: 'Mon, 16 Jun 2025 05:58:37 GMT', 'content-type': 'application/json; charset=utf-8', 'content-length': '61', connection: 'keep-alive', 'access-control-max-age': '1000', 'access-control-allow-credentials': 'true', 'access-control-allow-methods': 'GET,POST,PUT,OPTIONS,DELETE' }, config: { transitional: [Object], adapter: [Array], transformRequest: [Array], transformResponse: [Array], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: Infinity, env: [Object], validateStatus: [Function: validateStatus], headers: [Object [AxiosHeaders]], method: 'get', url: 'https://sub-server.lemonai.cc/api/users/userinfo', data: '{}', allowAbsoluteUrls: true }, request: <ref *1> ClientRequest { _events: [Object: null prototype], _eventsCount: 7, _maxListeners: undefined, outputData: [], outputSize: 0, writable: true, destroyed: true, _last: false, chunkedEncoding: false, shouldKeepAlive: true, maxRequestsOnConnectionReached: false, _defaultKeepAlive: true, useChunkedEncodingByDefault: false, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: 2, _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, _header: 'GET /api/users/userinfo HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /\r\n' + 'Content-Type: application/json\r\n' + 'User-Agent: axios/1.10.0\r\n' + 'Content-Length: 2\r\n' + 'Accept-Encoding: gzip, compress, deflate, br\r\n' + 'Host: sub-server.lemonai.cc\r\n' + 'Connection: keep-alive\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: [Agent], socketPath: undefined, method: 'GET', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/api/users/userinfo', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'sub-server.lemonai.cc', protocol: 'https:', _redirectable: [Writable], [Symbol(shapeMode)]: false, [Symbol(kCapture)]: false, [Symbol(kBytesWritten)]: 0, [Symbol(kNeedDrain)]: false, [Symbol(corked)]: 0, [Symbol(kChunkedBuffer)]: [], [Symbol(kChunkedLength)]: 0, [Symbol(kSocket)]: [TLSSocket], [Symbol(kOutHeaders)]: [Object: null prototype], [Symbol(errored)]: null, [Symbol(kHighWaterMark)]: 65536, [Symbol(kRejectNonStandardBodyWrites)]: false, [Symbol(kUniqueHeaders)]: null }, data: { code: 401, message: 'Unauthorized: Missing Token' } }, status: 401 } { request: { method: 'GET', url: '/api/users/userinfo', header: { host: '127.0.0.1:3000', connection: 'close', 'sec-ch-ua-platform': '"Windows"', 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36', accept: 'application/json, text/plain, /', 'sec-ch-ua': '"Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24"', 'sec-ch-ua-mobile': '?0', 'sec-fetch-site': 'same-origin', 'sec-fetch-mode': 'cors', 'sec-fetch-dest': 'empty', referer: 'http://localhost:5005/', 'accept-encoding': 'gzip, deflate, br, zstd', 'accept-language': 'en-AU,en;q=0.9,yue-HK;q=0.8,yue;q=0.7,en-GB;q=0.6,en-US;q=0.5,zh-CN;q=0.4,zh-TW;q=0.3,zh;q=0.2' } }, response: { status: 404, message: 'Not Found', header: [Object: null prototype] {} }, app: { subdomainOffset: 2, proxy: false, env: 'development' }, originalUrl: '/api/users/userinfo', req: '', res: '', socket: '' }

kingyyp avatar Jun 16 '25 06:06 kingyyp

or how to get authentication token from lemonai.cc ?

kingyyp avatar Jun 16 '25 06:06 kingyyp

You can get a token after logging in at the bottom left. We don't require you to log in, so you can ignore this log if you don't.

HexdoAI avatar Jun 18 '25 05:06 HexdoAI