Skip to content
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

TypeError: post() missing 1 required positional argument: 'target_address' #6217

Closed
fredo opened this issue Jun 2, 2020 · 3 comments · Fixed by #6352
Closed

TypeError: post() missing 1 required positional argument: 'target_address' #6217

fredo opened this issue Jun 2, 2020 · 3 comments · Fixed by #6352
Assignees
Labels
Component / API Issues that relate the the APIs Raiden provides. Type / Bug

Comments

@fredo
Copy link
Contributor

fredo commented Jun 2, 2020

Problem Definition

I tried a false API request making a payment. The command I did was:

curl -i -X POST http://localhost:5001/api/v1/payments/0xf1f41e5F35E3be655779a55d3544Df1Ad137b7C6 -H 'Content-Type: application/json' --data-raw '{"amount":"1", "identifier": 1337}'

Note: in the URL the token address was missing

The response on Raiden side was:

Traceback (most recent call last):
  File "src/gevent/greenlet.py", line 854, in gevent._greenlet.Greenlet.run
  File "raiden/api/rest.py", line 409, in _run
  File "gevent/baseserver.py", line 389, in serve_forever
  File "src/gevent/event.py", line 133, in gevent._event.Event.wait
  File "src/gevent/_abstract_linkable.py", line 208, in gevent.__abstract_linkable.AbstractLinkable._wait
  File "src/gevent/_abstract_linkable.py", line 178, in gevent.__abstract_linkable.AbstractLinkable._wait_core
  File "src/gevent/_abstract_linkable.py", line 196, in gevent.__abstract_linkable.AbstractLinkable._wait_core
  File "src/gevent/_abstract_linkable.py", line 182, in gevent.__abstract_linkable.AbstractLinkable._wait_core
  File "src/gevent/_greenlet_primitives.py", line 61, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch
  File "src/gevent/_greenlet_primitives.py", line 61, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch
  File "src/gevent/_greenlet_primitives.py", line 65, in gevent.__greenlet_primitives.SwitchOutGreenletWithLoop.switch
  File "src/gevent/__greenlet_primitives.pxd", line 35, in gevent.__greenlet_primitives._greenlet_switch
TypeError: post() missing 1 required positional argument: 'target_address'
2020-06-02T08:47:33Z <Greenlet "APIServer|Greenlet-0" at 0x7f885b0175f0: _run> failed with TypeError

My raiden node did not break but further API calls respond with

Failed to connect to localhost port 5001: Connection refused

I would expect that the raiden nodes continues to run after a wrong API call and continues to process new API Calls.

This was tried with version v1.0.0 and infura

@fredo fredo added Component / API Issues that relate the the APIs Raiden provides. Type / Bug labels Jun 2, 2020
@fredo
Copy link
Contributor Author

fredo commented Jun 2, 2020

It looks like that the API Server crashed but the raiden node itself did not

@palango
Copy link
Contributor

palango commented Jun 25, 2020

Solving the underlying unhandled exception is left.

@Dominik1999
Copy link
Contributor

see also if there is test case for all potentially missing arguments

@palango palango changed the title Failed to connect to localhost port 5001: Connection refused after false API request TypeError: post() missing 1 required positional argument: 'target_address' Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component / API Issues that relate the the APIs Raiden provides. Type / Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants