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

"status" API call to daemon reports error #1275

Closed
ocornoc opened this issue Jun 27, 2018 · 4 comments
Closed

"status" API call to daemon reports error #1275

ocornoc opened this issue Jun 27, 2018 · 4 comments
Labels
area: jsonrpc area: network type: bug Existing functionality is wrong or broken

Comments

@ocornoc
Copy link
Contributor

ocornoc commented Jun 27, 2018

The Issue

Was testing my Lua binding (and later confirmed with curl) with the daemon, and found an issue. The status daemon API call will return an error from the daemon when including the parameter "session_status": true, but only when it is the first call to the daemon.

Steps to reproduce

  1. Fully quit the daemon if it's running.
  2. Start the daemon.
  3. Call status with the parameter "session_status": true.
    curl http://localhost:5279 --data {"method": "status", "params": {"session_status": true}}

Expected behaviour

The daemon should include the session status field in the response.

Actual behaviour

{
  "error": {
    "code": -32500,
    "data": [
      "  File \"site-packages/twisted/internet/defer.py\", line 1299, in _inlineCallbacks",
      "    ",
      "  File \"site-packages/lbrynet/daemon/Daemon.py\", line 1103, in jsonrpc_status",
      "    ",
      "exceptions.AttributeError: 'NoneType' object has no attribute 'get_all_verified_blobs'"
    ],
    "message": "'NoneType' object has no attribute 'get_all_verified_blobs'"
  },
  "id": null,
  "jsonrpc": "2.0"
}

System Configuration

I personally removed the ip field when submitting the issue. Ignore that part.

{
  "id": null,
  "jsonrpc": "2.0",
  "result": {
    "build": "release",
    "desktop": "Unknown",
    "distro": {
      "codename": "Artful Aardvark",
      "id": "ubuntu",
      "like": "debian",
      "version": "17.10",
      "version_parts": {
        "build_number": "",
        "major": "17",
        "minor": "10"
      }
    },
    "lbrynet_version": "0.20.2",
    "lbryschema_version": "0.0.16",
    "lbryum_version": "3.2.3",
    "os_release": "3.18.0-17855-g76eb986d8948",
    "os_system": "Linux",
    "platform": "Linux-3.18.0-17855-g76eb986d8948-x86_64-with-Ubuntu-17.10-artful",
    "processor": "x86_64",
    "python_version": "2.7.12"
  }
}
@ocornoc
Copy link
Contributor Author

ocornoc commented Jun 27, 2018

#1267

This pull request seems to fix it.

@tzarebczan
Copy link
Contributor

Thanks for logging this! I'll see if I can reproduce tomorrow. Good to know that PR fixes it.

@tzarebczan
Copy link
Contributor

I am able to reproduce if you call this early on during daemon startup, but I'll have to try again with #1164 - this changes the startup of the daemon. If you have some time, can you give it a shot as well?

@tzarebczan tzarebczan added type: bug Existing functionality is wrong or broken area: network area: jsonrpc and removed needs: triage labels Jul 10, 2018
@tzarebczan
Copy link
Contributor

Session status has been removed as a parameter in 0.21 (components refactor). We are now able to successfully call a status early in the daemon startup process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: jsonrpc area: network type: bug Existing functionality is wrong or broken
Projects
None yet
Development

No branches or pull requests

3 participants