Closed Nerossoul closed 6 years ago
It's a known issue on Golos. The problem can be lessened by picking a more reliable node. But until this is actually fixed in radiator, you can pass an the argument recover_transactions_on_error: false
to stop radiator from trying to recover the transaction, .e.g.:
tx = Radiator::Transaction.new(wif: wif_key, chain: :golos, url: 'https://ws.golos.io', recover_transactions_on_error: false)
Keep in mind, often this error means that the node accepted the transaction but could not reply due to timeout. If you re-try the transaction, it could result in a duplicate broadcast. This is especially problematic if the transaction contains a transfer of funds and it is blindly retried after the error.
See: #26
radiator works good! but sometimes i got a error, see next text code tx = Radiator::Transaction.new(wif: wif_key, chain: :golos, url: 'https://ws.golos.io') tx.operations << transaction_data begin response = tx.process(true) rescue Exception => e puts "forward this message to inertia186/radiator" puts e.message print e.backtrace.join("\n") end
error undefined method
[]' for nil:NilClass /home/user/.rvm/gems/ruby-2.4.0/gems/radiator-0.3.12/lib/radiator/api.rb:655:in
block (2 levels) in recover_transaction' /home/user/.rvm/gems/ruby-2.4.0/gems/radiator-0.3.12/lib/radiator/api.rb:646:ineach' /home/user/.rvm/gems/ruby-2.4.0/gems/radiator-0.3.12/lib/radiator/api.rb:646:in
each_with_index' /home/user/.rvm/gems/ruby-2.4.0/gems/radiator-0.3.12/lib/radiator/api.rb:646:inblock in recover_transaction' /home/user/.rvm/gems/ruby-2.4.0/gems/radiator-0.3.12/lib/radiator/api.rb:279:in
block in get_blocks' /home/user/.rvm/gems/ruby-2.4.0/gems/radiator-0.3.12/lib/radiator/api.rb:278:ineach' /home/user/.rvm/gems/ruby-2.4.0/gems/radiator-0.3.12/lib/radiator/api.rb:278:in
get_blocks' /home/user/.rvm/gems/ruby-2.4.0/gems/radiator-0.3.12/lib/radiator/api.rb:639:inrecover_transaction' /home/user/.rvm/gems/ruby-2.4.0/gems/radiator-0.3.12/lib/radiator/api.rb:433:in
block in method_missing' /home/user/.rvm/gems/ruby-2.4.0/gems/radiator-0.3.12/lib/radiator/api.rb:423:inloop' /home/user/.rvm/gems/ruby-2.4.0/gems/radiator-0.3.12/lib/radiator/api.rb:423:in
method_missing' /home/user/.rvm/gems/ruby-2.4.0/gems/radiator-0.3.12/lib/radiator/transaction.rb:87:inblock in process' /home/user/.rvm/gems/ruby-2.4.0/gems/radiator-0.3.12/lib/radiator/transaction.rb:86:in
loop' /home/user/.rvm/gems/ruby-2.4.0/gems/radiator-0.3.12/lib/radiator/transaction.rb:86:in `process'