adrianhajdin / banking

Horizon is a modern banking platform for everyone.
https://banking-jet.vercel.app
MIT License
1.13k stars 323 forks source link

login error #20

Open DenisRuparel opened 1 month ago

DenisRuparel commented 1 month ago

when i login in existing account i can't be able to see the infoWhen I log in to my existing account, I am unable to see the information about other users.rmations about users

this error I face: An error occurred while getting the accounts: AxiosError: Request failed with status code 400 at settle (webpack-internal:///(rsc)/./node_modules/axios/dist/node/axios.cjs:1966:12) at Unzip.handleStreamEnd (webpack-internal:///(rsc)/./node_modules/axios/dist/node/axios.cjs:3065:11) at Unzip.emit (node:events:530:35) at Unzip.emit (node:domain:488:12) at endReadableNT (node:internal/streams/readable:1696:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) at Axios.request (webpack-internal:///(rsc)/./node_modules/axios/dist/node/axios.cjs:3876:41) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async eval (webpack-internal:///(rsc)/./lib/actions/bank.actions.ts:36:38) at async Promise.all (index 0) at async $$ACTION_0 (webpack-internal:///(rsc)/./lib/actions/bank.actions.ts:34:26) at async Home (webpack-internal:///(rsc)/./app/(root)/page.tsx:37:22) { code: 'ERR_BAD_REQUEST', config: { transitional: { silentJSONParsing: true, forcedJSONParsing: true, clarifyTimeoutError: false }, adapter: [ 'xhr', 'http' ], transformRequest: [ [Function: transformRequest] ], transformResponse: [ [Function: transformResponse] ], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: { FormData: [Function], Blob: [class Blob] }, validateStatus: [Function: validateStatus], headers: Object [AxiosHeaders] { Accept: 'application/json, text/plain, /', 'Content-Type': 'application/json', 'User-Agent': 'Plaid Node v23.0.0', 'Plaid-Version': '2020-09-14', 'PLAID-CLIENT-ID': '66350e387172e7001b6195fa', 'PLAID-SECRET': 'b500b62c4af12da276246a44c5b5d9', 'Content-Length': '70', 'Accept-Encoding': 'gzip, compress, deflate, br' }, method: 'post', data: '{"access_token":"access-sandbox-8a0989f2-ae55-48a0-808b-fb4aaebba740"}', url: 'https://sandbox.plaid.com/accounts/get' }, request: <ref *1> ClientRequest { _events: [Object: null prototype] { error: [Array], abort: [Function (anonymous)], aborted: [Function (anonymous)], connect: [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: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: '70', _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: TLSSocket { _tlsOptions: [Object], _secureEstablished: true, _securePending: false, _newSessionPending: false, _controlReleased: true, secureConnecting: false, _SNICallback: null, servername: 'sandbox.plaid.com', alpnProtocol: false, authorized: true, authorizationError: null, encrypted: true, _events: [Object: null prototype], _eventsCount: 9, connecting: false, _hadError: false, _parent: null, _host: 'sandbox.plaid.com', _closeAfterHandlingError: false, _readableState: [ReadableState], _writableState: [WritableState], allowHalfOpen: false, _maxListeners: undefined, _sockname: null, _pendingData: null, _pendingEncoding: '', server: undefined, _server: null, ssl: null, _requestCert: true, _rejectUnauthorized: true, timeout: 5000, parser: null, _httpMessage: null, autoSelectFamilyAttemptedAddresses: [Array], handle: [TLSWrap],

  [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: [TimersList],
    _idleStart: 719288,
    _onTimeout: [Function: bound ],
    _timerArgs: undefined,
    _repeat: null,
    _destroyed: false,
    [Symbol(refed)]: false,
    [Symbol(kHasPrimitive)]: false,
    [Symbol(asyncId)]: 487145,
    [Symbol(triggerId)]: 487143,
    [Symbol(kResourceStore)]: [Object],
    [Symbol(kResourceStore)]: [Object],
    [Symbol(kResourceStore)]: undefined,
    [Symbol(kResourceStore)]: undefined,
    [Symbol(kResourceStore)]: [Hub],
    [Symbol(kResourceStore)]: undefined,
    [Symbol(kResourceStore)]: undefined,
    [Symbol(kResourceStore)]: undefined,
    [Symbol(kResourceStore)]: undefined,
    [Symbol(kResourceStore)]: undefined,
    [Symbol(kResourceStore)]: undefined,
    [Symbol(kResourceStore)]: undefined,
    [Symbol(kResourceStore)]: undefined,
    [Symbol(kResourceStore)]: undefined,
    [Symbol(kResourceStore)]: undefined,
    [Symbol(kResourceStore)]: undefined,
    [Symbol(kResourceStore)]: undefined,
    [Symbol(kResourceStore)]: undefined,
    [Symbol(kResourceStore)]: [Object],
    [Symbol(kResourceStore)]: 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]
},
_header: 'POST /accounts/get HTTP/1.1\r\n' +
  'Accept: application/json, text/plain, */*\r\n' +
  'Content-Type: application/json\r\n' +
  'User-Agent: Plaid Node v23.0.0\r\n' +
  'Plaid-Version: 2020-09-14\r\n' +
  'PLAID-CLIENT-ID: 66350e387172e7001b6195fa\r\n' +
  'PLAID-SECRET: b500b62c4af12da276246a44c5b5d9\r\n' +
  'Content-Length: 70\r\n' +
  'Accept-Encoding: gzip, compress, deflate, br\r\n' +
  'sentry-trace: 02f9422fea384fc4902804541ae3a666-847eced955122ed0-1\r\n' +
  'baggage: sentry-environment=development,sentry-public_key=e300b41df2ffb6d4592972400a25c0d3,sentry-trace_id=02f9422fea384fc4902804541ae3a666,sentry-sample_rate=1,sentry-transaction=Unknown%20Server%20Component%20(%2F(root)),sentry-sampled=true\r\n' +
  'Host: sandbox.plaid.com\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: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
joinDuplicateHeaders: undefined,
path: '/accounts/get',
_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: 400,
  statusMessage: 'Bad Request',
  client: [TLSSocket],
  _consuming: false,
  _dumped: false,
  req: [Circular *1],
  _eventsCount: 4,
  responseUrl: 'https://sandbox.plaid.com/accounts/get',
  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: 'sandbox.plaid.com',
protocol: 'https:',
_redirectable: Writable {
  _events: [Object],
  _writableState: [WritableState],
  _maxListeners: undefined,
  _options: [Object],
  _ended: true,
  _ending: true,
  _redirectCount: 0,
  _redirects: [],
  _requestBodyLength: 70,
  _requestBodyBuffers: [],
  _eventsCount: 3,
  _onNativeResponse: [Function (anonymous)],
  _currentRequest: [Circular *1],
  _currentUrl: 'https://sandbox.plaid.com/accounts/get',
  [Symbol(shapeMode)]: true,
  [Symbol(kCapture)]: false
},
[Symbol(shapeMode)]: false,
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype] {
  accept: [Array],
  'content-type': [Array],
  'user-agent': [Array],
  'plaid-version': [Array],
  'plaid-client-id': [Array],
  'plaid-secret': [Array],
  'content-length': [Array],
  'accept-encoding': [Array],
  'sentry-trace': [Array],
  baggage: [Array],
  host: [Array]
},
[Symbol(errored)]: null,
[Symbol(kHighWaterMark)]: 16384,
[Symbol(kRejectNonStandardBodyWrites)]: false,
[Symbol(kUniqueHeaders)]: null

}, response: { status: 400, statusText: 'Bad Request', headers: Object [AxiosHeaders] { server: 'nginx', date: 'Wed, 05 Jun 2024 06:26:02 GMT', 'content-type': 'application/json; charset=utf-8', 'content-length': '269', connection: 'keep-alive', 'plaid-version': '2020-09-14', vary: 'Accept-Encoding' }, config: { transitional: [Object], adapter: [Array], transformRequest: [Array], transformResponse: [Array], timeout: 0, xsrfCookieName: 'XSRF-TOKEN', xsrfHeaderName: 'X-XSRF-TOKEN', maxContentLength: -1, maxBodyLength: -1, env: [Object], validateStatus: [Function: validateStatus], headers: [Object [AxiosHeaders]], method: 'post', data: '{"access_token":"access-sandbox-8a0989f2-ae55-48a0-808b-fb4aaebba740"}', url: 'https://sandbox.plaid.com/accounts/get' }, 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: true, sendDate: false, _removedConnection: false, _removedContLen: false, _removedTE: false, strictContentLength: false, _contentLength: '70', _hasBody: true, _trailer: '', finished: true, _headerSent: true, _closed: true, socket: [TLSSocket], _header: 'POST /accounts/get HTTP/1.1\r\n' + 'Accept: application/json, text/plain, /*\r\n' + 'Content-Type: application/json\r\n' + 'User-Agent: Plaid Node v23.0.0\r\n' + 'Plaid-Version: 2020-09-14\r\n' + 'PLAID-CLIENT-ID: 66350e387172e7001b6195fa\r\n' + 'PLAID-SECRET: b500b62c4af12da276246a44c5b5d9\r\n' + 'Content-Length: 70\r\n' + 'Accept-Encoding: gzip, compress, deflate, br\r\n' + 'sentry-trace: 02f9422fea384fc4902804541ae3a666-847eced955122ed0-1\r\n' + 'baggage: sentry-environment=development,sentry-public_key=e300b41df2ffb6d4592972400a25c0d3,sentry-trace_id=02f9422fea384fc4902804541ae3a666,sentry-sample_rate=1,sentry-transaction=Unknown%20Server%20Component%20(%2F(root)),sentry-sampled=true\r\n' +
'Host: sandbox.plaid.com\r\n' + 'Connection: keep-alive\r\n' + '\r\n', _keepAliveTimeout: 0, _onPendingData: [Function: nop], agent: [Agent], socketPath: undefined, method: 'POST', maxHeaderSize: undefined, insecureHTTPParser: undefined, joinDuplicateHeaders: undefined, path: '/accounts/get', _ended: true, res: [IncomingMessage], aborted: false, timeoutCb: null, upgradeOrConnect: false, parser: null, maxHeadersCount: null, reusedSocket: false, host: 'sandbox.plaid.com', protocol: 'https:', _redirectable: [Writable],

  [Symbol(kCapture)]: false,
  [Symbol(kBytesWritten)]: 0,
  [Symbol(kNeedDrain)]: false,
  [Symbol(corked)]: 0,
  [Symbol(kOutHeaders)]: [Object: null prototype],
  [Symbol(errored)]: null,
  [Symbol(kHighWaterMark)]: 16384,
  [Symbol(kRejectNonStandardBodyWrites)]: false,
  [Symbol(kUniqueHeaders)]: null
},
data: {
  display_message: null,
  error_code: 'ITEM_LOGIN_REQUIRED',
  error_message: "the login details of this item have changed (credentials, MFA, or required user action) and a user login is required to update this information. use Link's update mode to restore the item to a good state",
  error_type: 'ITEM_ERROR',
  request_id: 'H0YA2uTQjWnpgQt',
  suggested_action: null
}

} }

how to solve this error?

Screenshot 2024-06-05 122447

github repo link: https://github.com/DenisRuparel/banking

please solve this!