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
Bunq API gives HTTP 500 error (Insufficient authentication) #49
Comments
Goed idee, een mail als het token verlopen is. Ik ga kijken hoe ik dat kan toevoegen. |
Het stomme is dat Bunq niet laat zien wanneer de token verlopen is. Weet jij toevallig vanuit de API docs of er een verloopdatum op zit? Als ik moet mee kijken in AWS om iets te kunnen mailen moet je het maar even laten weten! |
Volgens mij is de duur van een bunq token niet gedocumenteerd en kunnen zij dit veranderen. Branch / pull request aangemaakt voor email: #50 Hoe werkt deze voor jou? |
Sending an email when an error occurs is now supported |
Hey Wesselt! Thanks voor het toevoegen. Moet ik nog iets verder testen in AWS? had een beetje hectische week op werk. |
Hoi Nick, de AWS versie staat op: https://serverlessrepo.aws.amazon.com/applications/eu-west-1/991880991323/bunq-ynab-aws-lambda Javy de Koning werkte deze bij, maar ik denk dat hij geen bunq gebruiker meer is. @javydekoning hoe kan ik de repo bijwerken naar een nieuwe versie? |
@wesselt Waarschijnlijk de template yaml aanpassen met extra parameters. Ik zat zelf nog te denken dat een poort keuze ook wel handig kan zijn omdat sommige lokaal op 25 al draaien. En ik gebruik bijvoorbeeld google workspace waarbij ik een relay server heb en username password niet perse nodig zijn. Hier voorbeeld toevoeging van parameters. Deze moeten dan nog wel gedefinieerd worden in de juiste config files in die template.yml
|
Yes, like @nickstrijbos says those parameters would need to be added. You'd also need to update the config json here: https://github.com/wesselt/bunq2ynab/blob/master/template.yaml#L98-L112 Indeed, I'm no longer at Bunq (most dutch banks sync natively with YNAB through Truelayer). I'd be happy to publish a new version, but I won't be able to test it... If someone wants to take over, you can publish to the SAR here: https://us-east-1.console.aws.amazon.com/serverlessrepo/home?locale=en®ion=us-east-1#/published-applications |
@javydekoning I will fork the repo and make changes to the template, test them and merge them to your repo. And can publish the SAR if that's okay with you too @wesselt |
Sounds good! Does that mean the new version gets a new URL? @javydekoning What options are there to give other people rights to update the SAR entry at https://serverlessrepo.aws.amazon.com/applications/eu-west-1/991880991323/bunq-ynab-aws-lambda? |
Yes, the new version will get a new URL if someone takes over publishing. The 991xxx part of the url is the AWS Account ID. |
@nickstrijbos Commit cf91414 supports specifying STMP port. If the port is 25, it starts with plain SMTP, and only switches to TLS when a password is provided. |
@nickstrijbos Are you able to keep the AWS application updated by any chance? :) |
Hey @MagicLegend, had some personal issues the last couple of months, and no energy in side projects. But I want to pick this back up. Don't pin me down on it, but I'm going to do my best to commit this as soon as possible. |
@MagicLegend, I've reached out to @javydekoning and resolved the deployment part. I'm currently in the process of testing the solution with the latest commit to ensure everything functions as expected. Once confirmed, I'll proceed with deploying it to AWS. @wesselt I can update the Lambda function every time you commit something new but then we need to use versioning |
@nickstrijbos Checked out versioning, that looks easy enough. I've added a release: https://github.com/wesselt/bunq2ynab/releases/tag/release How does that work for your purpose? |
Thank you for picking it up @nickstrijbos ! Perhaps a bit of documentation on how to update an already running lambda would be useful as well (I did not know that I had to redeploy the lambda from the Application repository until I did some reading...). And perhaps development should be done outside of |
@wesselt The next preferable tag should be 1.4.0 in semantic versioning. So the template can take that over when I build, package and deploy the new version. @MagicLegend, appreciate your suggestion! I'm currently in the process of refining the README to make it more applicable and useful in the context of AWS. On the topic of auto-deployment to AWS, it's not feasible at this moment due to the necessity of including personal access keys and secrets in the packaging. However, the repository's setup allows for the testing of new updates or functions without the need to directly commit to the AWS Serverless Application Repository. |
@nickstrijbos Just to double check, you're saying that 0.4.1 is preferable to 24022001? How about 24.2.20? |
Alright update from my side. Got some issues with the new SMTP Variables. They can't be empty. So for the time being will update the AWS template to only work without email. So I can patch and update all the functions @wesselt added in the last couple of days. So I will push a 1.4.0 later this weekend a 1.5.0 for the mail part. Will also open up a new issue. |
Hey all, Updated and published the new template. It can be found here: bunq-ynab-aws-lambda — version 1.4.4 The SMTP functions are still not visible. Same steps apply (test the deployment to start automatic syncing). We still need to fix some of the errors that are showing up. But in my case it syncs again. Open issues if you find something so we can patch it. Thanks for the patience. |
I've updated to 1.4.4, but syncing gives the following error:
When changing the given line to use
Which I suspect might be because I already had config values from the old deployment, and the code is not handeling that correctly? I'm afraid it'll need another update :) Thanks! Edit: Ah, I figured it out. This line causes the error: https://github.com/wesselt/bunq2ynab/blob/master/lambda_function.py#L18 Line 18 in 5a0b1be
The default ending is not
I guess the template should either include the callback_marker with this default value, or the code should be updated to use the default value created by AWS. Note that the state gets initialized with this line ending in the template as well: Line 126 in 5a0b1be
Which leads me to suspect that even a fresh setup would be broken due to this. |
Tried to check it out by deploying on AWS. The monitoring tab shows:
I wonder what this means and how I can fix it. |
Looks like you've manually deleted the CloudWatch log group in the past. Either recreate it or delete the stack and redeploy it. |
That makes sense, I switched to my Rasperry Pi and deleted everything on AWS, and I probably deleted the log group then. This was a fresh install though. And I just I deleted and redeployed the stack and get the same error (with different ids.) |
The stack last update was on 2022-05-12 08:29:28 UTC+0200. It stopped working on the 22nd of september. So not sure why the API suddenly stopped working. It worked for more than a full year.
I just created a new Bunq API key, updated the stack again and it works. So not sure if we can add something where it mails us when de lambda function gives a 500 error on API authentication.
log output from the function when it didn't update.:
The text was updated successfully, but these errors were encountered: