wesselt / bunq2ynab

Upload bunq transactions to ynab
Other
72 stars 18 forks source link

Error in Personal Access Tokens from YNAB #38

Closed Pimmie32 closed 10 months ago

Pimmie32 commented 2 years ago

Hi!

First of all, thanks for this project. I've seen it work at a friends house and it looks amazing. Now i'm trying to set it up. When i get to the test phase it gives me this error.

START RequestId: 86104499-db08-4acd-ac44-93cf10210b7e Version: $LATEST
2022-03-20 10:52:16,793 | INFO | config.py:80 | read_ssm_config | Reading config from SSM
2022-03-20 10:52:18,154 | INFO | credentials.py:1102 | load | Found credentials in environment variables.
2022-03-20 10:52:18,398 | CRITICAL | config.py:137 | verify | Configuration setting "personal_access_token" must contain a YNAB personal access token.  Create one in Top Left Menu -> Account Settings -> Developers.  You can only see the full token when you first create it. A personal access token is 64 characters long and consists of digits and lowercase a to f.  An example API key is: a73ead040abb58823e926dfde4a0bf0f6c6db5d9ecba7f1656762dc017c752a4
END RequestId: 86104499-db08-4acd-ac44-93cf10210b7e
REPORT RequestId: 86104499-db08-4acd-ac44-93cf10210b7e  Duration: 1918.99 ms    Billed Duration: 1919 ms    Memory Size: 512 MB Max Memory Used: 52 MB  
RequestId: 86104499-db08-4acd-ac44-93cf10210b7e Error: Runtime exited with error: exit status 1
Runtime.ExitError

It looks like there is something wrong with the Personal Access Token from YNAB. It doesn't give me a 64 characters long and consists of digits and lowercase a to f code. My code contains also uppercase, - and _

What can i do to make it work? Or am i looking wrong at the error?

wesselt commented 2 years ago

You're right, YNAB changed the format of development tokens. I've pushed an update to accept the new format: https://github.com/wesselt/bunq2ynab/commit/3a7c305bbc8c1dec32eb8f24c50f23cae4d0f003

How does that work for you?

Jeroenrs commented 2 years ago

@wesselt Another excited bunq/YNAB user here, thanks for building this!

I just installed the package on AWS with new tokens and got the same error. I'm assuming the AWS version hasn't been updated yet (since the error message was adjusted in the branch linked above) - would you mind sharing how we can deploy this updated version on AWS?

wesselt commented 2 years ago

Yeah, the serverless app store probably doesn't have the YNAB token fix yet. Javy made that. @javydekoning What do you think?

javydekoning commented 2 years ago

Yeah, I can do a new release tomorrow.

Jeroenrs commented 2 years ago

@javydekoning @wesselt thanks both, can't wait to try it out tomorrow 😁

javydekoning commented 2 years ago

I had some time, published a new version just now. Please see if this works for you. For future reference, we might need to use this to a workflow on GitHub actions (I could do that).

# Bump version in template.yml first.
sam build --use-container
sam package --profile <aws profile to use for publishing> --s3-bucket <some bucket to store the artifact> --output-template-file packaged.yml
sam publish --profile <aws profile to use for publishing> --template-file ./packaged.yml

@wesselt , I'm closing my Bunq accounts so won't be testing future code myself anymore.

davepar commented 2 years ago

Thanks for publishing a new version to AWS. It works for me! I tried it yesterday and was getting the YNAB token error, too.

Jeroenrs commented 2 years ago

Works perfectly, thanks @javydekoning! 🥳

wesselt commented 2 years ago

@javydekoning Thanks for updating the serverless application repository!

What bank are you moving to?

javydekoning commented 2 years ago

@wesselt I was already a customer @ ABN and Revolut. Both now support syncing to YNAB natively. I've had a couple of issues with Bunq and some frustrations with their handling via support.... Therefore decided it's no longer worth the 18 euro's to me (2 accounts).

wesselt commented 2 years ago

@javydekoning Thanks! I've got Revolut too and it syncs with YNAB after roughly a day.

bunq is still my main bank, I like the many options and the Zen feeling where they are not trying to sell me. And the instant sync of course :)