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

userId is undefined #4

Open
Admeen3581 opened this issue Jul 26, 2024 · 0 comments
Open

userId is undefined #4

Admeen3581 opened this issue Jul 26, 2024 · 0 comments
Labels
bug Something isn't working question Further information is requested

Comments

@Admeen3581
Copy link
Owner

Admeen3581 commented Jul 26, 2024

The end I've reached is that documentId is null because (skipping the stack trace) in page.tsx the 'accounts' variable is returning a blank data array because getBanks() method is returning null. Within the getBanks() method: the 'banks' variable returns a total of 0 & an empty documents array. This appears to be because the query is not finding a userId because there is no such userId within the bank collection. I'm assuming the issue is Plaid/Dwolla is not writing to my database and I don't know why.

Error - getBank:  AppwriteException: Invalid query: Query value is invalid for attribute "$id"
    at _Client.call (webpack-internal:///(rsc)/./node_modules/node-appwrite/dist/client.mjs:283:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Databases.listDocuments (webpack-internal:///(rsc)/./node_modules/node-appwrite/dist/services/databases.mjs:1581:12)
    at async $$ACTION_7 (webpack-internal:///(rsc)/./lib/actions/user.actions.ts:261:22)
    at async $$ACTION_1 (webpack-internal:///(rsc)/./lib/actions/bank.actions.ts:76:22)
    at async Home (webpack-internal:///(rsc)/./app/(root)/page.tsx:32:21) {
  code: 400,
  type: 'general_query_invalid',
  response: {
    message: 'Invalid query: Query value is invalid for attribute "$id"',
    code: 400,
    type: 'general_query_invalid',
    version: '1.5.8'
  }
}
An error occurred while getting the account: TypeError: Cannot read properties of null (reading 'accessToken')
    at $$ACTION_1 (webpack-internal:///(rsc)/./lib/actions/bank.actions.ts:81:32)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Home (webpack-internal:///(rsc)/./app/(root)/page.tsx:32:21)

I've tried everything and I am stuck. If you need any screenshots of my database, dwolla, or plaid accounts that aren't already posted, just leave a comment.

younginbanks
younginroot
younginusers

@Admeen3581 Admeen3581 added bug Something isn't working question Further information is requested labels Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant