question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix resolve for failed URIs

See original GitHub issue

The Issue

When resolving a list of URIs, an error message should be returned for each failed URI. The app does not expect an empty return and fails to process these cases.

Request: {"jsonrpc":"2.0","method":"resolve","params":{"uris":["lbry://test12"]}}

Before:

{
 "jsonrpc": "2.0",
 "result": {
   "lbry://testing1233": {
     "error": "URI lbry://testing1233 cannot be resolved"
   }
 }
}

Now:

{
  "jsonrpc": "2.0",
  "result": {}
}

Request: {"jsonrpc":"2.0","method":"resolve","params":{"uris":["lbry://test12","lbry://i-m-angry-and-i-smell-bad-door-monster"]}}

Before:

{
    "id": null,
    "jsonrpc": "2.0",
    "result": {
        "lbry://i-m-angry-and-i-smell-bad-door-monster": {
            "certificate": {
                "address": "bYNbK1Pe4BMryn9FXtdzYTbttYCG54fchF",
                "amount": 0.01,
....
        },
        "lbry://test12": {
            "error": "URI lbry://test12 cannot be resolved"
        }
    }
}

Now:

{
    "id": null,
    "jsonrpc": "2.0",
    "result": {
        "lbry://i-m-angry-and-i-smell-bad-door-monster": {
            "certificate": {
                "address": "bYNbK1Pe4BMryn9FXtdzYTbttYCG54fchF",
                "amount": 0.01,
....
        }
    }
}

System Configuration

  • LBRY Daemon version:
  • LBRY App version:
  • LBRY Installation ID:
  • Operating system:

Anything Else

Screenshots

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
daovistcommented, Oct 4, 2018

when the claimId is valid (or partial) but does not match the name I get an internal server error

when I add a random character in front of the partial claimId, I get the proper error

2d [lbry@speech-dev1:/opt/lbry] 2s $ ./lbrynet resolve travis#85d5f2fd814979dec6b082c2f88b07bc155e4
{
  "code": -32500,
  "data": [
    "  File \"site-packages/twisted/internet/defer.py\", line 654, in _runCallbacks",
    "    ",
    "  File \"lbrynet/daemon/auth/server.py\", line 94, in trap",
    "    ",
    "  File \"site-packages/twisted/python/failure.py\", line 439, in trap",
    "    ",
    "  File \"site-packages/twisted/python/failure.py\", line 467, in raiseException",
    "    ",
    "  File \"lbrynet/daemon/auth/server.py\", line 155, in _inner",
    "    ",
    "  File \"lbrynet/daemon/Daemon.py\", line 1778, in jsonrpc_resolve",
    "    ",
    "  File \"lbrynet/wallet/manager.py\", line 219, in resolve",
    "    ",
    "  File \"lbrynet/wallet/ledger.py\", line 64, in resolve",
    "    ",
    "builtins.RuntimeError: {'code': -32603, 'message': 'internal server error'}"
  ],
  "message": "{'code': -32603, 'message': 'internal server error'}"
}
2d [lbry@speech-dev1:/opt/lbry] $ ./lbrynet resolve travis#i85d5f2fd814979dec6b082c2f88b07bc155e4
{
  "travis#i85d5f2fd814979dec6b082c2f88b07bc155e4": {
    "error": "travis#i85d5f2fd814979dec6b082c2f88b07bc155e4 is not a valid uri"
  }
}
0reactions
tzarebczancommented, Nov 30, 2018

This is fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix the 414 Request-URI Too Large Error - Kinsta
The 414 Request-URL Too Large error is a critical configuration issue somewhere between your browser and a server. Here's how to fix it....
Read more >
Failed to send failure response for uri - how to solve ... - Opster
This guide will help you check for common problems that cause the log ” Failed to send failure response for uri ” to...
Read more >
How to Fix the 414 Request-URI Too Large Error - YouTube
Ever seen the "414 Request- URI Too Large" error pop up? Tackle it with no fear thanks to this guide Subscribe: ...
Read more >
Understanding and fixing the "Cannot resolve a Relative URI ...
I'm noticing that arq from the Jena project handles this fine without feeding it the data file via the --data switch when only...
Read more >
How do I resolve a HTTP 414 "Request URI too long" error?
Show activity on this post. I have a simple workaround. Suppose your URI has a string stringdata that is too long. You can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found