Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Can't use Nordigen Sync: Failed loading available banks: Nordigen access credentials might be misconfigured. Please set them up again. #1211

Closed
1 task done
hofq opened this issue Jun 27, 2023 · 3 comments
Labels
bank sync Related to automatic bank syncing bug Something isn't working

Comments

@hofq
Copy link

hofq commented Jun 27, 2023

Verified issue does not already exist?

  • I have searched and found no existing issue

What happened?

  1. Followed [Feedback] Nordigen bank-sync #724 "How to Test", Registered on https://dash.nordigen.com
  2. used API Credentials Displayed in the API Credentials Section
  3. Received the Error on Bank selection

What error did you receive?

GUI Error:
grafik

Logs from Actual-Server:
Error /nordigen/get-banks h [AxiosError]: Request failed with status code 401
    at re (file:///app/node_modules/nordigen-node/dist/index.esm.js:13:914)
    at IncomingMessage. (file:///app/node_modules/nordigen-node/dist/index.esm.js:17:16270)
    at IncomingMessage.emit (node:events:525:35)
    at endReadableNT (node:internal/streams/readable:1358:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  code: 'ERR_BAD_REQUEST',
  config: {
    transitional: {
      silentJSONParsing: true,
      forcedJSONParsing: true,
      clarifyTimeoutError: false
    },
    adapter: [ 'xhr', 'http' ],
    transformRequest: [ [Function (anonymous)] ],
    transformResponse: [ [Function (anonymous)] ],
    timeout: 0,
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    env: { FormData: [Function], Blob: null },
    validateStatus: [Function: validateStatus],
    headers: T [AxiosHeaders] {
      Accept: 'application/json',
      'Content-Type': 'application/json',
      'User-Agent': 'Nordigen-Node-v2',
      'Content-Length': '128',
      'Accept-Encoding': 'gzip, compress, deflate, br'
    },
    method: 'post',
    url: URL {
      href: 'https://ob.nordigen.com/api/v2/token/new/',
      origin: 'https://ob.nordigen.com',
      protocol: 'https:',
      username: '',
      password: '',
      host: 'ob.nordigen.com',
      hostname: 'ob.nordigen.com',
      port: '',
      pathname: '/api/v2/token/new/',
      search: '',
      searchParams: URLSearchParams {},
      hash: ''
    },
    data: '{"secret_key":"--Redacted--","secret_id":"--Redacted--"}'
  },
  request:  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: false,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    maxRequestsOnConnectionReached: false,
    _defaultKeepAlive: true,
    useChunkedEncodingByDefault: true,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    strictContentLength: false,
    _contentLength: '128',
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    _closed: false,
    socket: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: false,
      _SNICallback: null,
      servername: 'ob.nordigen.com',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 10,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'ob.nordigen.com',
      _closeAfterHandlingError: false,
      _readableState: [ReadableState],
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: [TLSWrap],
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: null,
      _httpMessage: [Circular *1],
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(async_id_symbol)]: 3969,
      [Symbol(kHandle)]: [TLSWrap],
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kSetNoDelay)]: false,
      [Symbol(kSetKeepAlive)]: true,
      [Symbol(kSetKeepAliveInitialDelay)]: 60,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(connect-options)]: [Object],
      [Symbol(RequestTimeout)]: undefined
    },
    _header: 'POST /api/v2/token/new/ HTTP/1.1\r\n' +
      'Accept: application/json\r\n' +
      'Content-Type: application/json\r\n' +
      'User-Agent: Nordigen-Node-v2\r\n' +
      'Content-Length: 128\r\n' +
      'Accept-Encoding: gzip, compress, deflate, br\r\n' +
      'Host: ob.nordigen.com\r\n' +
      'Connection: close\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: false,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      scheduling: 'lifo',
      maxTotalSockets: Infinity,
      totalSocketCount: 1,
      maxCachedSessions: 100,
      _sessionCache: [Object],
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'POST',
    maxHeaderSize: undefined,
    insecureHTTPParser: undefined,
    path: '/api/v2/token/new/',
    _ended: true,
    res: IncomingMessage {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 4,
      _maxListeners: undefined,
      socket: [TLSSocket],
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      rawHeaders: [Array],
      rawTrailers: [],
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 401,
      statusMessage: 'Unauthorized',
      client: [TLSSocket],
      _consuming: false,
      _dumped: false,
      req: [Circular *1],
      responseUrl: 'https://ob.nordigen.com/api/v2/token/new/',
      redirects: [],
      [Symbol(kCapture)]: false,
      [Symbol(kHeaders)]: [Object],
      [Symbol(kHeadersCount)]: 24,
      [Symbol(kTrailers)]: null,
      [Symbol(kTrailersCount)]: 0,
      [Symbol(RequestTimeout)]: undefined
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: false,
    host: 'ob.nordigen.com',
    protocol: 'https:',
    _redirectable: Writable {
      _writableState: [WritableState],
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      _options: [Object],
      _ended: true,
      _ending: true,
      _redirectCount: 0,
      _redirects: [],
      _requestBodyLength: 128,
      _requestBodyBuffers: [],
      _onNativeResponse: [Function (anonymous)],
      _currentRequest: [Circular *1],
      _currentUrl: 'https://ob.nordigen.com/api/v2/token/new/',
      [Symbol(kCapture)]: false
    },
    [Symbol(kCapture)]: false,
    [Symbol(kBytesWritten)]: 0,
    [Symbol(kEndCalled)]: true,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      'content-type': [Array],
      'user-agent': [Array],
      'content-length': [Array],
      'accept-encoding': [Array],
      host: [Array]
    },
    [Symbol(kUniqueHeaders)]: null
  },
  response: {
    status: 401,
    statusText: 'Unauthorized',
    headers: T [AxiosHeaders] {
      date: 'Tue, 27 Jun 2023 17:36:12 GMT',
      'content-type': 'application/json',
      'content-length': '115',
      connection: 'close',
      server: 'nginx',
      'www-authenticate': 'Bearer realm="api"',
      vary: 'Accept, Accept-Language',
      allow: 'POST, OPTIONS',
      'x-frame-options': 'DENY',
      'content-language': 'en',
      'x-content-type-options': 'nosniff',
      'referrer-policy': 'same-origin'
    },
    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: [T [AxiosHeaders]],
      method: 'post',
      url: [URL],
      data: '{"secret_key":"--Redacted--","secret_id":"--Redacted--"}'
    },
    request:  ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      maxRequestsOnConnectionReached: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      strictContentLength: false,
      _contentLength: '128',
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: false,
      socket: [TLSSocket],
      _header: 'POST /api/v2/token/new/ HTTP/1.1\r\n' +
        'Accept: application/json\r\n' +
        'Content-Type: application/json\r\n' +
        'User-Agent: Nordigen-Node-v2\r\n' +
        'Content-Length: 128\r\n' +
        'Accept-Encoding: gzip, compress, deflate, br\r\n' +
        'Host: ob.nordigen.com\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/api/v2/token/new/',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'ob.nordigen.com',
      protocol: 'https:',
      _redirectable: [Writable],
      [Symbol(kCapture)]: false,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(kEndCalled)]: true,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype],
      [Symbol(kUniqueHeaders)]: null
    },
    data: {
      summary: 'Authentication failed',
      detail: 'No active account found with the given credentials',
      status_code: 401
    }
  }
}

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Firefox

Operating System

Windows 11

@hofq hofq added the bug Something isn't working label Jun 27, 2023
@MatissJanis
Copy link
Member

Are you sure the credentials are correct? Would you mind generating them again in Nordigen and setting them up again in the UI?

401 status code can be returned if either the credentials are not configured or (and I'm guessing about this) if they are invalid.

@hofq
Copy link
Author

hofq commented Jun 27, 2023

How can i do that?
i copied them multiple times and compared the log credentials to the ones in the Web Portal

@j-f1 j-f1 added the bank sync Related to automatic bank syncing label Jun 27, 2023
@hofq
Copy link
Author

hofq commented Jul 1, 2023

I used https://dash.nordigen.com/ not the the new Portal https://bankaccountdata.gocardless.com mentioned in #1244

@hofq hofq closed this as completed Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bank sync Related to automatic bank syncing bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants