-
Notifications
You must be signed in to change notification settings - Fork 238
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
Cannot obtain braintreee configuration from drop in #155
Comments
To clarify:
Are you deleting a tokenization key from the control panel and then attempting to get configuration with the deleted tokenization key afterwards? Due to caching, configuration will continue to be available for a short period of time after the tokenization key is deleted. |
Hotfix part 1In
from GET requests don't have body and therefore Content-Type. Hotfix part 2In
from I have no idea why this was necessary. 🤔 MiscWhen testing in Advanced REST Client removing any one of these header helped. On an actual device only removing both headers helped. No clue why disabling gzip affected anything, the original error came from server not during parsing. I'm able to use Drop In now (by modifying the Core library), but it's still a workaround rather than a fix. |
Yes
No, we cleared app data on the device, discarded any locally prepared client token, and obtained a new client token through our server which is in thia context just a relay to Braintree (no caching on our server). |
Deleting a tokenization key will not affect clients that are using client tokens, for more information about how tokenization keys and client tokens differ see the client authorization docs. Are there specific devices that this happens on? This code has been present in version 2 of the SDK for nearly 2 years now and we have never encountered an issue like this or had one reported. Since we cannot reproduce it, it is difficult to determine the fix.
|
Here's what I'll do now:
I totally get that gzip is something we want, I'm also confused why disabling it helped considering the issue is specific to some Braintree clients and not a device or http client. Is switching to okhttp3 something you'd be interested in via pull request (if it works)? |
The Adding a dependency on OkHttp to fix this issue is not something we want to do, it adds additional size to the SDK and causes issues for anyone using older versions of OkHttp. Do you have any specific versions or devices that you've encountered this issue on? |
I'm aware Android uses OkHttp internally but that's some verison of
OkHttp2. App developers have no control over that client as it's baked into
the Android SDK.
On the other hand having a dependency on OkHttp3 should cause no problems
as it's already an industry standard and can live side by side with OkHttp2
in one project.
The issue isn't specific to a device*, I just want to try switching to
OkHttp3 (with gzip enabled) to see if it made any difference from current
(platform) solution. Otherwise I'm out of ideas, the error is most
illogical.
* The same Braintree client couldn't make successful calls on any devices.
|
TL;DR2.5.5-SNAPSHOT added Which essentially translates to gzip magically starting to work. So it must've come from a change on server. Original postOk, so I got more info.
OkHttp operates at two levels: application and network, and you can attach loggers at each of them. So I observed what headers are set vs. what headers are actually sent. These are headers I fed to OkHttp at the application level:
and that translated to these headers which were actually wired over to Braintree server:
These two lines are the only technical difference between 2.5.4 and the OkHttp3 fork:
And both are irrelevant. |
There has been no change in response handling on the server. Given that the You'll be able to use 2.5.5-SNAPSHOT without the header as soon as this travis build completes. |
Thanks, it works for now. I don't like the idea we dismiss this without finding the cause. Is there a way I can make one of those broken calls in a controlled fashion, so you can intercept the call on server and figure out why it's responding with a 400 code? |
We're working on several changes to the service that handles these requests so it's probably best to wait until that's done before testing it further with the accept header. |
Hey @consp1racy, As a quick update, we've completed the changes to the server that handles configuration requests as @lkorth mentioned above. If you'd like to retest this request with the |
Looks like this has been resolved, so I'm going to close it now. Feel free to comment here if that is not the case. |
General information
Issue description
Some clients cannot obtain configuration (using drop in ui). When deleted from braintree console the same clients that could obtain it can still obtain it (two people on our dev team), those who couldn't still can't (one tema member, one customer and supposedly 40 other customers so far).
The text was updated successfully, but these errors were encountered: