-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add Threadsafety for x-bunq-server-signature #7
Comments
@PJUllrich The most common reason of Could you please add this:
to line 103 of our |
I added the requested print statement in
I added the outputs for
Since the output was quite long, I added it to PasteBin and redacted sensitive information: As you can see, in the headers of the 1. (exception-causing) response, the |
@PJUllrich I am interested in the response body of the request where validation fails... These outputs include everything but that body :( |
That one was not printed since the verification failed I figured. Let me check once again. |
@PJUllrich that's why I asked adding the print statement before the verification! :) |
I added it there, but the output was humongous! I thought I copied everything necessary, but apparently I missed that one response body. I'll give it another try. Also, please post the lines of code before which you want to have the print statement. You said line
|
@PJUllrich in the newest develop version of sdk_python, the lines go as:
|
Aha, @dnl-blkv he is using the SDK published on PyPi. The sdk uploaded on PyPi is not up to date with the latest version of development... @PJUllrich could you checkout the dev branch and place the sdk in your source code ? It is not possible to upload dev branch to PyPi as of I need to supply a newer version number, according to my knowledge may need to double check this. |
D'oh! Look at this:
Multi-threading is too fast! 🤣 Ok, I guess I have to revisit my code in order to minimise the GET requests or live with the slightly slower performance of my script. Either way, the error should probably be thrown before the verification is done, or the server should give a signature for the error response as well. |
@PJUllrich xD. @dnl-blkv might be an idea to support multi threads for python ? |
@PJUllrich here we go! I wonder though why it goes through the assertion... Ahh wait! You've got the old version where validation is done before asserting for errors :). Hold on, we'll do a proper release and you'll be able to include the newest version where this nastiness is fixed. |
@OGKevin probably yes, but a bit later |
Well thanks anyway guys! I guess this topic can be closed now. |
@PJUllrich However, our rate limiting remains non-friendly to concurrence. For now, you can workaround it by creating a shared registry storing, for every endpoint, times of last 3 GET calls, last 5 POST calls and last 2 PUT calls and checking against those if the call can already be made (or sleeping otherwise). Here's the page where the limits are specified: https://doc.bunq.com/api/1/page/errors |
Hello! It's me again!
I encountered a problem when making calls with the SDK in a concurrent manner. Especially, I got the following error when making calls to the production API (no errors occurred in Sandbox)
Here's the stacktrace:
Do you have an idea what could cause the problem that out of a sudden the server signature is not found anymore when making concurrent calls and no problem occurs when making sequential calls?
Update: I experienced this issue whenever I create 2 Threads which create and 'get' Payments to the production API. So basically, I make 2 independent Payments from e.g. account A to C and account B to C and then there seems to be some kind of issue with the verification function of the bunq response
The text was updated successfully, but these errors were encountered: