Problem when running particle-agent setup

When running sudo particle-agent on raspberry pi, i get this :

You are already logged in as *******@myemail.com
Do you want to stay logged in as this user? |yes|
How do you want your device to be labeled in the Particle tools?
Name: |pi|
Generating RSA private key, 1024 bit long modulus
…++++++
…++++++
e is 65537 (0x10001)
writing RSA key
writing RSA key

/usr/lib/ruby/vendor_ruby/particle/device.rb:28:in initialize': undefined metho dkey?’ for nil:NilClass (NoMethodError)
from /usr/lib/ruby/vendor_ruby/particle/client/devices.rb:19:in new' from /usr/lib/ruby/vendor_ruby/particle/client/devices.rb:19:indevice’
from /usr/lib/ruby/vendor_ruby/particle/client/devices.rb:47:in claim_d evice' from /usr/lib/ruby/vendor_ruby/particle/device.rb:75:inclaim’
from /usr/lib/ruby/vendor_ruby/particle_agent/setup.rb:250:in claim_dev ice' from /usr/lib/ruby/vendor_ruby/particle_agent/setup.rb:67:inblock in r un!'
from /usr/lib/ruby/vendor_ruby/whirly.rb:170:in start' from /usr/lib/ruby/vendor_ruby/particle_agent/spinner.rb:12:inshow’
from /usr/lib/ruby/vendor_ruby/particle_agent/setup.rb:64:in run!' from /usr/lib/ruby/vendor_ruby/particle_agent/cli.rb:16:insetup’
from /usr/lib/ruby/vendor_ruby/thor/command.rb:27:in run' from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:126:ininvoke_command ‘
from /usr/lib/ruby/vendor_ruby/thor.rb:359:in dispatch' from /usr/lib/ruby/vendor_ruby/thor/base.rb:440:instart’
from /usr/bin/particle-agent:16:in `’

Has someone ever seen that ?

I also have issue attempting to flash the Pi.

Thank you,

1 Like

I am seeing the same issue during: sudo particle-agent setup. Same thing without sudo as well.

Generating RSA private key, 1024 bit long modulus
…++++++
.++++++
e is 65537 (0x10001)
writing RSA key
writing RSA key
⠙ Claiming the device to your Particle account
/usr/lib/ruby/vendor_ruby/particle/device.rb:28:in initialize': undefined methodkey?’ for nil:NilClass (NoMethodError)
from /usr/lib/ruby/vendor_ruby/particle/client/devices.rb:19:in new' from /usr/lib/ruby/vendor_ruby/particle/client/devices.rb:19:indevice’
from /usr/lib/ruby/vendor_ruby/particle/client/devices.rb:47:in claim_device' from /usr/lib/ruby/vendor_ruby/particle/device.rb:75:inclaim’
from /usr/lib/ruby/vendor_ruby/particle_agent/setup.rb:250:in claim_device' from /usr/lib/ruby/vendor_ruby/particle_agent/setup.rb:67:inblock in run!‘
from /usr/lib/ruby/vendor_ruby/whirly.rb:170:in start' from /usr/lib/ruby/vendor_ruby/particle_agent/spinner.rb:12:inshow’
from /usr/lib/ruby/vendor_ruby/particle_agent/setup.rb:64:in run!' from /usr/lib/ruby/vendor_ruby/particle_agent/cli.rb:16:insetup’
from /usr/lib/ruby/vendor_ruby/thor/command.rb:27:in run' from /usr/lib/ruby/vendor_ruby/thor/invocation.rb:126:ininvoke_command’
from /usr/lib/ruby/vendor_ruby/thor.rb:359:in dispatch' from /usr/lib/ruby/vendor_ruby/thor/base.rb:440:instart’
from /usr/bin/particle-agent:16:in `’

1 Like

Ping @jvanier

I’ve got the same problem and am interested in a solution. It looks like a ruby or encryption update broke something.

particle-agent status seems to be reporting normal looking output

Sorry for the late answer but i finally found what was causing the issue.

It was actually a bug in the firmware that was running on the particle-agent. My code was bugged. If i recall correctly, the code was blocked on opening a named pipe.

The whole firmware was stuck and the particle-agent was messed up because of it.

Hope that may help someone!

I ran into the exact same problem. What did you do to clear out the faulty firmware so you could reflash it with an updated version? It seems to go back to the faulty one whatever I do.

I would also like to know how to fix this. I tried with a different raspberry pi but this did not help, so it was not just one buggy device. How do you install the particle agent if you keep getting this error? Do you revise the ruby code in the pi?