Open rmisio opened 4 years ago
13:19:25.589 [ERROR] [core/CalculateOrderTotal] Currency not tracked
indicates that you were unable to get a price for that currency from any of the specified endpoints so it cannot estimate a fee per bytes and fails.
I'm not sure what is causing this if the endpoints are up but it certainly can't proceed if it can't get a price.
I'm not sure what is causing this if the endpoints are up but it certainly can't proceed if it can't get a price.
Ok, but the API call shouldn't hang infinitely then (I've waited 10+ minutes before and it never came back). IMO, it should kick back a 500 with a descriptive error.
Just for clarity @rmisio I don't believe the endpoints timing out is causing this issue. It simply falls back to default fee rates if it times out. I'm not sure exactly what could be causing the hang as I have hard-coded potential failures throughout this purchase call and not nailed down a hanging issue.
Also your log above from the hang indicates the process got through the purchase call since it sends the order message and receives a response from the recipient.
I've tested against the very listing you displayed as well.
Yeah, it's a huge mystery to me as well because it looks like the buyer has everything they need to proceed with the purchase, but the API call never returns.
FWIW, I think another user is reporting the same issue:
https://github.com/OpenBazaar/openbazaar-desktop/issues/1779
and FWIW, it happens to me locally a lot.
Are you positive that the log above is from a time when the order hung?
Are you positive that the log above is from a time when the order hung?
3,689% positive. It's happened to me probably dozen times over the last couple of weeks.
I just want to confirm because that log shows the order went through and rules out a lot of code as being the culprit.
Yeah, I'd follow the code subsequent to the logs and try and find where it could potentially hang. I'd examine all deferred functionality beyond that point.
One more question, is the order inserted into the orders table in the database?
One more question, is the order inserted into the orders table in the database?
I don't recall ever specifically checking that. I don't think it is inserted, but I'm not 100% sure.
I'll try to reproduce it again and let you know.
Looks like the purchase call is hanging on:
err = wal.AddWatchedAddress(addr)
I routinely get these types of errors:
11:54:35.020 [ERROR] [client/doRequest] timed out executing: Get https://ltc.api.openbazaar.org/api/tx/19da061787ed19cf3203090cb78745fe5044b9745360be8e22642ac74f63e847: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
11:54:35.020 [ERROR] [client/doRequest] timed out executing: Get https://ltc.api.openbazaar.org/api/tx/9d5b90a54a18e0750e803052611dff3c0836cb1ff1d04cf961f2652d7ff754b5: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
11:54:35.150 [ERROR] [client/doRequest] timed out executing: Get https://ltc.api.openbazaar.org/api/tx/56d8ffcbcbccd428c5248062d3b595724a44e32722650dc6645702fbed869cb7: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
11:54:35.274 [ERROR] [client/doRequest] timed out executing: Get https://ltc.api.openbazaar.org/api/tx/1f7b1f52922e44afa6217aefe14880e695247b07ef5da06ad79788dafffb71ac: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
Ideally our infrastructure would be able to support my internet speeds (10ish down, 1ish up), although me being located in Guatemala may be a bottleneck, but with us being a worldwide product, perhaps we need to improve our infrastructure related geo-location?
At the very least, ob-go should put a timeout on that function and after a reasonable amount of time give up and kick back an error to the user.
(Currently I'm waiting nearly 20 minutes and the call is still hanging. FWIW, I've never had the call actually come back once it gets in this hanging state)
Not sure if others could reproduce this, but this has happened to me dozens of times. And it's pretty mysterious because sometimes it happens and other times with seemingly the same data, it doesn't happen.
Anyhow, make a direct order. The vendor seems to process it properly, aside from maybe
Currency not tracked
:The buyer appears to receive the response:
...but nothing else happens. The
ob/purchase
call just hangs.Here's the order data:
Here's the listing:
The listing is priced in
USD
and the paymentCoin isLTC
, so both of those should be tracked. Is it possible this is dependent on something transient like exchange rate data being available?In either case, the call shouldn't hang and more info should be being piped back to the user and/or logs.