Author

Topic: electrum.network.TxBroadcastServerReturnedError [SOLVED] (Read 152 times)

sr. member
Activity: 501
Merit: 283
[КУПЛЮ] bitcoin
Worth to say that I had version 3.3.4. Digging deeper I found strange error, on server machine that advised me update to version... 4.0.0 at electrumapps.online lol
After some research I found that 3.3.4 could be susceptible to phishing. After updating to 3.3.8 all the problems are gone.
So the main thing for all of this - be careful and keep your version up to date and everything will be fine. Wink
legendary
Activity: 3444
Merit: 10558
i don't think it is possible to say what the problem was because the "UntrustedServerReturnedError" is thrown whenever your client can not find the exception that the server returned among its hard coded error messages so it simply changes that error into a generic message: "The server returned an error."
and the reason for that error could be anything, from a server error to a problem with your transaction.
https://github.com/spesmilo/electrum/blob/3.3.8/electrum/network.py#L208-L213
sr. member
Activity: 501
Merit: 283
[КУПЛЮ] bitcoin
This error means that the server the daemon is connected to at that time is experiencing issues / possible downtime etc.
You need to handle it in your code if you want better reliability.
The simplest solution I've found is whenever this happens to restart the daemon as it will grab a working server when it starts.
Alternatively you can keep a list of servers you trust and rotate manually (see electrum daemon -s) when server errors occur. Smiley
I had an assumption that it was due to an incorrect server choice, but why it should be a problem in 2020?
btw restarting server not resolve the problem.
newbie
Activity: 1
Merit: 0
This error means that the server the daemon is connected to at that time is experiencing issues / possible downtime etc.
You need to handle it in your code if you want better reliability.
The simplest solution I've found is whenever this happens to restart the daemon as it will grab a working server when it starts.
Alternatively you can keep a list of servers you trust and rotate manually (see electrum daemon -s) when server errors occur. Smiley
sr. member
Activity: 501
Merit: 283
[КУПЛЮ] bitcoin
Hello, I using electrum with api on my linux machine, eveything worked fine until I got an error few days ago after broadcasting my transaction in logs:

Code:
[2020-03-06 12:43:04] ov.error: Api return error
{
    "curl": {
        "http_code": 200,
        "response": "{\"result\": null, \"id\": \"1583487784599\", \"error\": {\"code\": -d, \"message\": \"Server error: File \\\"/usr/local/lib/python3.6/dist-packages/electrum/network.py\\\", line 806, in broadcast_transaction | electrum.network.TxBroadcastServerReturnedError: Unknown error\\n\"}}"
    },
    "data": {
        "id": "1583487784599",
        "method": "broadcast",
        "params": {
            "tx": "02000000000000001...770900"
        }
    },
    "url": "http://xx.xx.xx.xx",
    "api_error": {
        "code": -32603,
        "message": "Server error: File \"/usr/local/lib/python3.6/dist-packages/electrum/network.py\", line 806, in broadcast_transaction | electrum.network.TxBroadcastServerReturnedError: Unknown error\n"
    }
}

[2020-03-06 12:43:04] ov.error: Api return error
{
    "curl": {
        "http_code": 200,
        "response": "{\"result\": null, \"id\": \"1583487784678\", \"error\": {\"code\": -32603, \"message\": \"Server error: File \\\"/usr/local/lib/python3.6/dist-packages/electrum/network.py\\\", line 783, in wrapper | electrum.network.UntrustedServerReturnedError: The server returned an error.\\n\"}}"
    },
    "data": {
        "id": "1583487784678",
        "method": "gettransaction",
        "params": {
            "txid": "b7af19...59425d7"
        }
    },
    "url": "http://xx.xx.xx.xx",
    "api_error": {
        "code": -32603,
        "message": "Server error: File \"/usr/local/lib/python3.6/dist-packages/electrum/network.py\", line 783, in wrapper | electrum.network.UntrustedServerReturnedError: The server returned an error.\n"
    }
}

After ~15 minutes it finally broadcasted and tx appear in blockchain, but I can't understand what cause the problem and why it takes much time with errors. Undecided
Any help is appreciated.
Jump to: