You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the user has a Kraken account that is "empty" (no balances, trades, etc.) and they attempt to create a Kraken API connection with valid API keys, the following happens:
The backend returns a 500 error to the client
The user is unable to set up a Kraken connection from this point on as they get an error that Kraken is already registered (it appears as unregistered but providing credentials and clicking "setup" returns the "Exchange kraken is already registered" error).
This appears to happen because the API result from Kraken is malformed during the initial API connection from the backend, as it provides a response of {'error': []} which the backend doesn't know how to handle. As a result a 500 internal error occurs, no credentials are registered, but the exchange does appear to be registered (doing a manual GET call to the /exchanges endpoint will show this). Following this, the user must perform a manual DELETE call to the /exchanges endpoint to delete the erroneous kraken exchange before they can create a new connection via the client UI.
27/04/2020 17:06:16 W. Europe Daylight Time -- INFO:rotkehlchen.exchanges.exchange:Initialized kraken exchange
27/04/2020 17:06:16 W. Europe Daylight Time -- DEBUG:rotkehlchen.exchanges.kraken:Kraken API query method=Balance, data=None, call_counter=0
27/04/2020 17:06:16 W. Europe Daylight Time -- ERROR:rotkehlchen.api.server:Exception on /api/1/exchanges [PUT]
Traceback (most recent call last):
File "C:\Users\Gebruiker\Envs\rotkehlchen\lib\site-packages\flask\app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\Gebruiker\Envs\rotkehlchen\lib\site-packages\flask\app.py", line 1935, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "C:\Users\Gebruiker\Envs\rotkehlchen\lib\site-packages\flask_restful\__init__.py", line 458, in wrapper
resp = resource(*args, **kwargs)
File "C:\Users\Gebruiker\Envs\rotkehlchen\lib\site-packages\flask\views.py", line 89, in view
return self.dispatch_request(*args, **kwargs)
File "C:\Users\Gebruiker\Envs\rotkehlchen\lib\site-packages\flask_restful\__init__.py", line 573, in dispatch_request
resp = meth(*args, **kwargs)
File "C:\Users\Gebruiker\Envs\rotkehlchen\lib\site-packages\webargs\core.py", line 366, in wrapper
return func(*args, **kwargs)
File "c:\users\gebruiker\source\repos\rotki\rotkehlchen\api\v1\resources.py", line 215, in put
return self.rest_api.setup_exchange(name, api_key, api_secret, passphrase)
File "c:\users\gebruiker\source\repos\rotki\rotkehlchen\api\rest.py", line 109, in wrapper
return f(wrappingobj, *args, **kwargs)
File "c:\users\gebruiker\source\repos\rotki\rotkehlchen\api\rest.py", line 377, in setup_exchange
result, message = self.rotkehlchen.setup_exchange(name, api_key, api_secret, passphrase)
File "c:\users\gebruiker\source\repos\rotki\rotkehlchen\rotkehlchen.py", line 635, in setup_exchange
passphrase=passphrase,
File "c:\users\gebruiker\source\repos\rotki\rotkehlchen\exchanges\manager.py", line 78, in setup_exchange
result, message = exchange.validate_api_key()
File "c:\users\gebruiker\source\repos\rotki\rotkehlchen\exchanges\kraken.py", line 318, in validate_api_key
valid, msg = self._validate_single_api_key_action('Balance')
File "c:\users\gebruiker\source\repos\rotki\rotkehlchen\exchanges\kraken.py", line 341, in _validate_single_api_key_action
self.api_query(method_str, req)
File "c:\users\gebruiker\source\repos\rotki\rotkehlchen\exchanges\kraken.py", line 419, in api_query
result = query_method(method, req)
File "c:\users\gebruiker\source\repos\rotki\rotkehlchen\exchanges\kraken.py", line 471, in _query_private
return _check_and_get_response(response, method)
File "c:\users\gebruiker\source\repos\rotki\rotkehlchen\exchanges\kraken.py", line 246, in _check_and_get_response
return result['result']
KeyError: 'result'
... (and later if i try to register it again I get this)
27/04/2020 17:06:33 W. Europe Daylight Time -- INFO:rotkehlchen.api.server.pywsgi:127.0.0.1 - - [2020-04-27 17:06:33] "OPTIONS /api/1/exchanges HTTP/1.1" 200 327 0.001009
27/04/2020 17:06:33 W. Europe Daylight Time -- DEBUG:rotkehlchen.api.rest:Request successful response={"result": null, "message": "Exchange kraken is already registered"}, status_code=409
The text was updated successfully, but these errors were encountered:
Problem Definition
If the user has a Kraken account that is "empty" (no balances, trades, etc.) and they attempt to create a Kraken API connection with valid API keys, the following happens:
This appears to happen because the API result from Kraken is malformed during the initial API connection from the backend, as it provides a response of
{'error': []}
which the backend doesn't know how to handle. As a result a 500 internal error occurs, no credentials are registered, but the exchange does appear to be registered (doing a manual GET call to the/exchanges
endpoint will show this). Following this, the user must perform a manual DELETE call to the/exchanges
endpoint to delete the erroneouskraken
exchange before they can create a new connection via the client UI.The text was updated successfully, but these errors were encountered: