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

Fix friendbot 500 errors #1512

Closed
tomquisel opened this issue Jul 17, 2019 · 3 comments
Closed

Fix friendbot 500 errors #1512

tomquisel opened this issue Jul 17, 2019 · 3 comments

Comments

@tomquisel
Copy link
Contributor

tomquisel commented Jul 17, 2019

Occasionally, friendbot responds with 500 errors. Some were fixed by #1511, but there are others that @accordeiro identified below. Let's fix those.

@accordeiro
Copy link
Member

It seems like fixing #1511 got rid of most errors, but I've found two others that are still relatively frequent:

Error 1: invalid URL escape

It seems like providing an invalid URL causes a 500:

Example 1.1

Request

time=“2019-07-30T08:19:47.697Z” level=info msg=“finished request” bytes=444 duration=“53.107µs” method=GET path=“/?addr=%s” pid=15931 req=frontend-friendbot-001a/HlNPxBapp5-053399 status=500 subsys=http

Response

time=“2019-07-30T08:19:47.697Z” level=error msg=“invalid URL escape \”%s\”” pid=15931 stack=unknown

Error 2: result_xdr not populated

This will probably require some deeper digging.

Example 2.1

Request

time="2019-07-30T10:38:59.343Z" level=info msg="finished request" bytes=444 duration=30.690100736s method=GET path="/?addr=GCLO3KDICPIBYCDOZGBJYBVGKRD2L2G5DENJFJFBRD5BJOK24X5LD42M" pid=15931 req=frontend-friendbot-001a/HlNPxBapp5-054563 status=500 subsys=http

Response

time=“2019-07-30T10:38:59.343Z” level=error msg=“submitting tx to minion: submitting tx to horizon: error getting horizon error code: result_xdr not populated” pid=15931 stack=“[main.go:43 minion.go:52 asm_amd64.s:1333]”

Example 2.2

Request

time=“2019-07-30T05:18:50.886Z” level=info msg=“finished request” bytes=444 duration=30.404681807s method=GET path=“/?addr=GBHFUQUN5BGKU7G5I2FAFHLMR3VXXYFGMEZHWU2UJE4E2CHZOD7DMILN” pid=15931 req=frontend-friendbot-001a/HlNPxBapp5-051987 status=500 subsys=http

Response

time=“2019-07-30T05:18:50.886Z” level=error msg=“submitting tx to minion: submitting tx to horizon: error getting horizon error code: result_xdr not populated” pid=15931 stack=“[main.go:43 minion.go:52 asm_amd64.s:1333]”

@tomquisel tomquisel changed the title Investigate friendbot 500 errors Fix friendbot 500 errors Jul 30, 2019
accordeiro added a commit to accordeiro/go that referenced this issue Aug 16, 2019
@accordeiro
Copy link
Member

@tomquisel I've created a PR (#1612) to address Error 1.

Error 2 seems trickier to reproduce since it seems to be an error between Friendbot <> Horizon, rather than between Client <> Friendbot – but I'll keep investigating.

@leighmcculloch
Copy link
Member

Error 2 isn't occurring for me now in both examples above. Given this was related to Friendbot => Horizon is it possible something changed in Horizon that subsequently fixed these cases?

$ curl 'https://friendbot.stellar.org/?addr=GCLO3KDICPIBYCDOZGBJYBVGKRD2L2G5DENJFJFBRD5BJOK24X5LD42M'
{
  "_links": {
    "transaction": {
      "href": "https://horizon-testnet.stellar.org/transactions/59741f42e2d5fd92bf9b9367fe85751e6761699e509b0461cc510f50966f9099"
    }
  },
  "hash": "59741f42e2d5fd92bf9b9367fe85751e6761699e509b0461cc510f50966f9099",
  "ledger": 860917,
  "envelope_xdr": "AAAAAMBaBqzOwbbQH5aFMkY7zPrIMj6IA88VmwPzp4JllbxBAAGGoAAHBfUAAAC6AAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAEAAAAAEH3Rayw4M0iCLoEe96rPFNGYim8AVHJU0z4ebYZW4JwAAAAAAAAAAJbtqGgT0BwIbsmCnAamVEel6N0ZGpKkoYj6FLla5fqxAAAAF0h26AAAAAAAAAAAAmWVvEEAAABAuqnfhgJftmx6ckJubkvnFqG9vhjRHTfzlxMwHkkvoQI9nlmUEv42aabL/4FJRsmULHT6eNX5zHdZZO/dnmOfBoZW4JwAAABARMrKYdQfoHbeLzHChyn1H9Tae8Ynq9Dwfz5gazNxH9M6wwMzCcSD7Uq0LON2EPTuyjdZKkC5XG9LRFQYthe1BQ==",
  "result_xdr": "AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAA=",
  "result_meta_xdr": "AAAAAQAAAAIAAAADAA0i9QAAAAAAAAAAwFoGrM7BttAfloUyRjvM+sgyPogDzxWbA/OngmWVvEEAAAAAPAXlBwAHBfUAAAC5AAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAA0i9QAAAAAAAAAAwFoGrM7BttAfloUyRjvM+sgyPogDzxWbA/OngmWVvEEAAAAAPAXlBwAHBfUAAAC6AAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAABAAAAAwAAAAMADSLzAAAAAAAAAAAQfdFrLDgzSIIugR73qs8U0ZiKbwBUclTTPh5thlbgnADFbXwzG+UqAAAAwQAAAL8AAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAEADSL1AAAAAAAAAAAQfdFrLDgzSIIugR73qs8U0ZiKbwBUclTTPh5thlbgnADFbWTqpP0qAAAAwQAAAL8AAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAADSL1AAAAAAAAAACW7ahoE9AcCG7JgpwGplRHpejdGRqSpKGI+hS5WuX6sQAAABdIdugAAA0i9QAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA=="
}%
$ curl 'https://friendbot.stellar.org/?addr=GBHFUQUN5BGKU7G5I2FAFHLMR3VXXYFGMEZHWU2UJE4E2CHZOD7DMILN' 
{
  "_links": {
    "transaction": {
      "href": "https://horizon-testnet.stellar.org/transactions/8dafa8b6d86d94deb7a0d89e3dc57bda31bacb99bb4a1e2fec18d34b5528c1ce"
    }
  },
  "hash": "8dafa8b6d86d94deb7a0d89e3dc57bda31bacb99bb4a1e2fec18d34b5528c1ce",
  "ledger": 860927,
  "envelope_xdr": "AAAAAPlCtJAvCuJZf+v2596U31MClKJtWWqv7e3JJ8D/kwf6AAGGoAAHBfUAAAC6AAAAAQAAAAAAAAAAAAA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AAAAAAAAA=="
}%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants