threefoldtech / js-sdk

extensions to js-ng for tfgrid
Apache License 2.0
14 stars 6 forks source link

adding trustlines fails after activating throught friendbot #3417

Closed xmonader closed 1 year ago

xmonader commented 1 year ago
JS-NG> w = j.clients.stellar.new('atest', network='TEST')                       
JS-NG> w.save()                                                                 
JS-NG> w.activate_through_threefold_service()                                   
2022-12-28 11:15:40.572 | INFO     | jumpscale.clients.stellar.stellar:activate_through_threefold_service:273 - trying to activate : atest
2022-12-28 11:15:42.659 | ERROR    | jumpscale.clients.stellar.stellar:activate_through_threefold_service:282 - failed to activate using the activation service 500 Server Error: Internal Server Error for url: https://testnet.threefold.io/threefoldfoundation/activation_service/activate_account
2022-12-28 11:15:42.665 | INFO     | jumpscale.clients.stellar.stellar:activate_through_threefold_service:273 - trying to activate : atest
2022-12-28 11:15:44.091 | ERROR    | jumpscale.clients.stellar.stellar:activate_through_threefold_service:282 - failed to activate using the activation service 500 Server Error: Internal Server Error for url: https://testnet.threefold.io/threefoldfoundation/activation_service/activate_account
2022-12-28 11:15:44.097 | INFO     | jumpscale.clients.stellar.stellar:activate_through_threefold_service:273 - trying to activate : atest
2022-12-28 11:15:45.546 | ERROR    | jumpscale.clients.stellar.stellar:activate_through_threefold_service:282 - failed to activate using the activation service 500 Server Error: Internal Server Error for url: https://testnet.threefold.io/threefoldfoundation/activation_service/activate_account
2022-12-28 11:15:45.549 | INFO     | jumpscale.clients.stellar.stellar:activate_through_threefold_service:273 - trying to activate : atest
2022-12-28 11:15:46.922 | ERROR    | jumpscale.clients.stellar.stellar:activate_through_threefold_service:282 - failed to activate using the activation service 500 Server Error: Internal Server Error for url: https://testnet.threefold.io/threefoldfoundation/activation_service/activate_account
2022-12-28 11:15:46.927 | INFO     | jumpscale.clients.stellar.stellar:activate_through_threefold_service:273 - trying to activate : atest
2022-12-28 11:15:48.391 | ERROR    | jumpscale.clients.stellar.stellar:activate_through_threefold_service:282 - failed to activate using the activation service 500 Server Error: Internal Server Error for url: https://testnet.threefold.io/threefoldfoundation/activation_service/activate_account
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/xmonader/wspace/js-sdk/jumpscale/clients/stellar/stellar.py", line 286, in activate_through_threefold_service
    raise RuntimeError(
RuntimeError: could not activate wallet. tried activation service and there's no activation_wallet configured on the system
could not activate wallet. tried activation service and there's no activation_wallet configured on the system

then tried to activate using friendbot which went fine, but failed on adding trustlines

JS-NG> w.activate_through_friendbot()                                                                 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/xmonader/wspace/js-sdk/jumpscale/clients/stellar/stellar.py", line 286, in activate_through_threefold_service
    raise RuntimeError(
RuntimeError: could not activate wallet. tried activation service and there's no activation_wallet configured on the system
2022-12-28 11:17:08.974 | INFO     | jumpscale.clients.stellar.stellar:activate_through_friendbot:266 - account with address GBV6YECABYQTT6JHPH7WCQ523LNL4GRL43DMTT4UP5DBLA5SIP5NIVBN activated and funded through friendbot
JS-NG> w.add_known_trustline(w.add_known_trustline("TFT"))                                            
2022-12-28 11:18:20.925 | INFO     | jumpscale.clients.stellar.stellar:add_known_trustline:352 - adding trustline TFT to account GBV6YECABYQTT6JHPH7WCQ523LNL4GRL43DMTT4UP5DBLA5SIP5NIVBN
2022-12-28 11:18:26.989 | DEBUG    | jumpscale.clients.stellar.stellar:_change_trustline:408 - {
  "type": "https://stellar.org/horizon-errors/transaction_failed",
  "title": "Transaction Failed",
  "status": 400,
  "detail": "The transaction failed when submitted to the stellar network. The `extras.result_codes` field on this response contains further details.  Descriptions of each code can be found at: https://developers.stellar.org/api/errors/http-status-codes/horizon-specific/transaction-failed/",
  "extras": {
    "envelope_xdr": "AAAAAgAAAABr7BBADiE5+Sd5/2FDutravhor5sbJz5R/RhWDskP61AAAAGQAA4MqAAAAAQAAAAEAAAAAAAAAAAAAAABjrAn+AAAAAAAAAAEAAAAAAAAABgAAAAFURlQAAAAAADn8ZBt6i0yx64bD0uibElAe/mY1PyeKE9WATCm/959kf/////////8AAAAAAAAAAbJD+tQAAABAielswLrxEPEVxVrI/lurXAA2Sc+VeeNjjUAweLcuZ0z4aRGn8776c9LIYnqw5YAKkdEuuoBjXj5U3bE/qqwfDw==",
    "result_codes": {
      "transaction": "tx_failed",
      "operations": [
        "op_no_issuer"
      ]
    },
    "result_xdr": "AAAAAAAAAGT/////AAAAAQAAAAAAAAAG/////gAAAAA="
  }
}
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/xmonader/wspace/js-sdk/jumpscale/clients/stellar/stellar.py", line 361, in add_known_trustline
    self._change_trustline(asset_code, issuer)
    │                      │           └ 'GA47YZA3PKFUZMPLQ3B5F2E3CJIB57TGGU7SPCQT2WAEYKN766PWIMB3'
    │                      └ 'TFT'
    └ Stellar(
  instance_name='atest',
  network=<Network.TEST: 'TEST'>,
  address='GBV6YECABYQTT6JHPH7WCQ523LNL4GRL43DMTT4UP5DBLA5SI...
  File "/home/xmonader/wspace/js-sdk/jumpscale/clients/stellar/stellar.py", line 409, in _change_trustline
    raise e
  File "/home/xmonader/wspace/js-sdk/jumpscale/clients/stellar/stellar.py", line 406, in _change_trustline
    server.submit_transaction(transaction)
    │                         └ <stellar_sdk.transaction_envelope.TransactionEnvelope object at 0x7f42c7e71d20>
    └ <jumpscale.clients.stellar.wrapped.Server object at 0x7f42c6a0b790>
  File "/home/xmonader/wspace/js-sdk/jumpscale/clients/stellar/wrapped.py", line 47, in submit_transaction
    raise e
  File "/home/xmonader/wspace/js-sdk/jumpscale/clients/stellar/wrapped.py", line 34, in submit_transaction
    return super().submit_transaction(transaction_envelope)
                                      └ <stellar_sdk.transaction_envelope.TransactionEnvelope object at 0x7f42c7e71d20>
  File "/home/xmonader/.cache/pypoetry/virtualenvs/js-sdk-9TQBlLpp-py3.10/lib/python3.10/site-packages/typeguard/__init__.py", line 1033, in wrapper
    retval = func(*args, **kwargs)
             │     │       └ {}
             │     └ (<jumpscale.clients.stellar.wrapped.Server object at 0x7f42c6a0b790>, <stellar_sdk.transaction_envelope.TransactionEnvelope obje...
             └ <function Server.submit_transaction at 0x7f42ceea1240>
  File "/home/xmonader/.cache/pypoetry/virtualenvs/js-sdk-9TQBlLpp-py3.10/lib/python3.10/site-packages/stellar_sdk/server.py", line 85, in submit_transaction
    raise_request_exception(resp)
    │                       └ <stellar_sdk.client.response.Response object at 0x7f42c67d0d60>
    └ <function raise_request_exception at 0x7f42cf135c60>
  File "/home/xmonader/.cache/pypoetry/virtualenvs/js-sdk-9TQBlLpp-py3.10/lib/python3.10/site-packages/typeguard/__init__.py", line 1033, in wrapper
    retval = func(*args, **kwargs)
             │     │       └ {}
             │     └ (<stellar_sdk.client.response.Response object at 0x7f42c67d0d60>,)
             └ <function raise_request_exception at 0x7f42cf3900d0>
  File "/home/xmonader/.cache/pypoetry/virtualenvs/js-sdk-9TQBlLpp-py3.10/lib/python3.10/site-packages/stellar_sdk/exceptions.py", line 183, in raise_request_exception
    raise BadRequestError(response)
          │               └ <stellar_sdk.client.response.Response object at 0x7f42c67d0d60>
          └ <class 'stellar_sdk.exceptions.BadRequestError'>
stellar_sdk.exceptions.BadRequestError: {
  "type": "https://stellar.org/horizon-errors/transaction_failed",
  "title": "Transaction Failed",
  "status": 400,
  "detail": "The transaction failed when submitted to the stellar network. The `extras.result_codes` field on this response contains further details.  Descriptions of each code can be found at: https://developers.stellar.org/api/errors/http-status-codes/horizon-specific/transaction-failed/",
  "extras": {
    "envelope_xdr": "AAAAAgAAAABr7BBADiE5+Sd5/2FDutravhor5sbJz5R/RhWDskP61AAAAGQAA4MqAAAAAQAAAAEAAAAAAAAAAAAAAABjrAn+AAAAAAAAAAEAAAAAAAAABgAAAAFURlQAAAAAADn8ZBt6i0yx64bD0uibElAe/mY1PyeKE9WATCm/959kf/////////8AAAAAAAAAAbJD+tQAAABAielswLrxEPEVxVrI/lurXAA2Sc+VeeNjjUAweLcuZ0z4aRGn8776c9LIYnqw5YAKkdEuuoBjXj5U3bE/qqwfDw==",
    "result_codes": {
      "transaction": "tx_failed",
      "operations": [
        "op_no_issuer"
      ]
    },
    "result_xdr": "AAAAAAAAAGT/////AAAAAQAAAAAAAAAG/////gAAAAA="
  }
}
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/xmonader/wspace/js-sdk/jumpscale/clients/stellar/stellar.py", line 361, in add_known_trustline
    self._change_trustline(asset_code, issuer)
    │                      │           └ 'GA47YZA3PKFUZMPLQ3B5F2E3CJIB57TGGU7SPCQT2WAEYKN766PWIMB3'
    │                      └ 'TFT'
    └ Stellar(
  instance_name='atest',
  network=<Network.TEST: 'TEST'>,
  address='GBV6YECABYQTT6JHPH7WCQ523LNL4GRL43DMTT4UP5DBLA5SI...
  File "/home/xmonader/wspace/js-sdk/jumpscale/clients/stellar/stellar.py", line 409, in _change_trustline
    raise e
  File "/home/xmonader/wspace/js-sdk/jumpscale/clients/stellar/stellar.py", line 406, in _change_trustline
    server.submit_transaction(transaction)
    │                         └ <stellar_sdk.transaction_envelope.TransactionEnvelope object at 0x7f42c7e71d20>
    └ <jumpscale.clients.stellar.wrapped.Server object at 0x7f42c6a0b790>
  File "/home/xmonader/wspace/js-sdk/jumpscale/clients/stellar/wrapped.py", line 47, in submit_transaction
    raise e
  File "/home/xmonader/wspace/js-sdk/jumpscale/clients/stellar/wrapped.py", line 34, in submit_transaction
    return super().submit_transaction(transaction_envelope)
                                      └ <stellar_sdk.transaction_envelope.TransactionEnvelope object at 0x7f42c7e71d20>
  File "/home/xmonader/.cache/pypoetry/virtualenvs/js-sdk-9TQBlLpp-py3.10/lib/python3.10/site-packages/typeguard/__init__.py", line 1033, in wrapper
    retval = func(*args, **kwargs)
             │     │       └ {}
             │     └ (<jumpscale.clients.stellar.wrapped.Server object at 0x7f42c6a0b790>, <stellar_sdk.transaction_envelope.TransactionEnvelope obje...
             └ <function Server.submit_transaction at 0x7f42ceea1240>
  File "/home/xmonader/.cache/pypoetry/virtualenvs/js-sdk-9TQBlLpp-py3.10/lib/python3.10/site-packages/stellar_sdk/server.py", line 85, in submit_transaction
    raise_request_exception(resp)
    │                       └ <stellar_sdk.client.response.Response object at 0x7f42c67d0d60>
    └ <function raise_request_exception at 0x7f42cf135c60>
  File "/home/xmonader/.cache/pypoetry/virtualenvs/js-sdk-9TQBlLpp-py3.10/lib/python3.10/site-packages/typeguard/__init__.py", line 1033, in wrapper
    retval = func(*args, **kwargs)
             │     │       └ {}
             │     └ (<stellar_sdk.client.response.Response object at 0x7f42c67d0d60>,)
             └ <function raise_request_exception at 0x7f42cf3900d0>
  File "/home/xmonader/.cache/pypoetry/virtualenvs/js-sdk-9TQBlLpp-py3.10/lib/python3.10/site-packages/stellar_sdk/exceptions.py", line 183, in raise_request_exception
    raise BadRequestError(response)
          │               └ <stellar_sdk.client.response.Response object at 0x7f42c67d0d60>
          └ <class 'stellar_sdk.exceptions.BadRequestError'>
stellar_sdk.exceptions.BadRequestError: {
  "type": "https://stellar.org/horizon-errors/transaction_failed",
  "title": "Transaction Failed",
  "status": 400,
  "detail": "The transaction failed when submitted to the stellar network. The `extras.result_codes` field on this response contains further details.  Descriptions of each code can be found at: https://developers.stellar.org/api/errors/http-status-codes/horizon-specific/transaction-failed/",
  "extras": {
    "envelope_xdr": "AAAAAgAAAABr7BBADiE5+Sd5/2FDutravhor5sbJz5R/RhWDskP61AAAAGQAA4MqAAAAAQAAAAEAAAAAAAAAAAAAAABjrAn+AAAAAAAAAAEAAAAAAAAABgAAAAFURlQAAAAAADn8ZBt6i0yx64bD0uibElAe/mY1PyeKE9WATCm/959kf/////////8AAAAAAAAAAbJD+tQAAABAielswLrxEPEVxVrI/lurXAA2Sc+VeeNjjUAweLcuZ0z4aRGn8776c9LIYnqw5YAKkdEuuoBjXj5U3bE/qqwfDw==",
    "result_codes": {
      "transaction": "tx_failed",
      "operations": [
        "op_no_issuer"
      ]
    },
    "result_xdr": "AAAAAAAAAGT/////AAAAAQAAAAAAAAAG/////gAAAAA="
  }
}

{
  "type": "https://stellar.org/horizon-errors/transaction_failed",
  "title": "Transaction Failed",
  "status": 400,
  "detail": "The transaction failed when submitted to the stellar network. The `extras.result_codes` field on this response contains further details.  Descriptions of each code can be found at: https://developers.stellar.org/api/errors/http-status-codes/horizon-specific/transaction-failed/",
  "extras": {
    "envelope_xdr": "AAAAAgAAAABr7BBADiE5+Sd5/2FDutravhor5sbJz5R/RhWDskP61AAAAGQAA4MqAAAAAQAAAAEAAAAAAAAAAAAAAABjrAn+AAAAAAAAAAEAAAAAAAAABgAAAAFURlQAAAAAADn8ZBt6i0yx64bD0uibElAe/mY1PyeKE9WATCm/959kf/////////8AAAAAAAAAAbJD+tQAAABAielswLrxEPEVxVrI/lurXAA2Sc+VeeNjjUAweLcuZ0z4aRGn8776c9LIYnqw5YAKkdEuuoBjXj5U3bE/qqwfDw==",
    "result_codes": {
      "transaction": "tx_failed",
      "operations": [
        "op_no_issuer"
      ]
    },
    "result_xdr": "AAAAAAAAAGT/////AAAAAQAAAAAAAAAG/////gAAAAA="
  }
}
robvanmieghem commented 1 year ago

Stellar testnet was reset, restored the necessary accounts. Should be solved now.