GithubHelp home page GithubHelp logo

Comments (11)

jlkalberer avatar jlkalberer commented on July 17, 2024

It sounds like you ran these two steps:

particle keys server ..\spark-server\default_key.pub.pem IP_ADDRESS
particle keys doctor your_core_id

When you weren't using the correct config. -- particle config profile_name

If that isn't the case, you didn't run this step correctly:

particle config profile_name apiUrl "http://DOMAIN_OR_IP"

from spark-server.

lilyannh avatar lilyannh commented on July 17, 2024

I ran:

particle config local apiUrl "http://10.10.10.10:8080"
particle config local
particle keys new
particle keys server device.pub.pem 10.10.10.10
particle keys doctor your_core_id

I'm pretty sure the config was pointed over to the local server because I could see it getting the other calls like GET /v1/devices and POST /v1/device_claims. It looks like the photon is trying to connect but gets the same handshake error every few seconds (this is also when the photon flashes red momentarily).

Handshake failed: error:0407109F:rsa routines:RSA_padding_check_PKCS1_type_2:pkcs decoding error { cache_key: '_93', deviceID: null, ip: '::ffff:10.10.10.117' }
1 : Core disconnected: Error: error:0407109F:rsa routines:RSA_padding_check_PKCS1_type_2:pkcs decoding error { cache_key: '_93', deviceID: '', duration: undefined }
Connection from: ::ffff:10.10.10.117 - Connection ID: 93

from spark-server.

jlkalberer avatar jlkalberer commented on July 17, 2024

Ok, you don't need to run particle keys new. That will generate a new key for the device but it is not the server's key.

When the server starts up for the first time, it generates some server keys in ~/src/data/default_key.pub.der. That's the key you need to use when setting up your devices.

from spark-server.

lilyannh avatar lilyannh commented on July 17, 2024

Ah, OK, thanks! I had looked around for the key but for some reason didn't see that before :)

So I did the above with the proper keys and got this error when attempting to connect the photon to the local server (particle setup). As well, the photon is now fast flashing cyan with 3 amber flashes every 20 seconds or so.

::ffff:10.10.10.10 - - [30/Jan/2017:05:44:03 +0000] "POST /v1/device_claims HTTP/1.1" 200 122 "-" "-"
uncaughtException { message: 'this is not a typed array.',
stack: 'TypeError: this is not a typed array.\n at Function.from (native)\n at ChunkingStream._this._transform (C:\node\spark-server\node_modules\spark-protocol\dist\lib\ChunkingStream.js:139:27)\n at ChunkingStream.Transfor
m._read (_stream_transform.js:167:10)\n at ChunkingStream.Transform._write (_stream_transform.js:155:12)\n at doWrite (_stream_writable.js:292:12)\n at writeOrBuffer (_stream_writable.js:278:5)\n at ChunkingStream.Writable.write (
_stream_writable.js:207:11)\n at Socket.ondata (_stream_readable.js:528:20)\n at emitOne (events.js:77:13)\n at Socket.emit (events.js:169:7)\n at readableAddChunk (_stream_readable.js:146:16)\n at Socket.Readable.push (_stream
_readable.js:110:10)\n at TCP.onread (net.js:523:20)' }

from spark-server.

jlkalberer avatar jlkalberer commented on July 17, 2024

If you follow the instructions in the readme, you don't need to run particle setup. The device should have already been claimed when you run particle keys doctor device_id.

@AntonPuko - you have any idea about why it isn't being reclaimed?

from spark-server.

jlkalberer avatar jlkalberer commented on July 17, 2024

@Snazzypants - did you get this resolved or are you still having issues?

from spark-server.

lilyannh avatar lilyannh commented on July 17, 2024

Thanks for following up - I'm still having the same issue. I tried updating spark-server and spark-protocol (since I saw that that referenced in the error message) but no change.

PS. The error that I pasted in the last message (also copied below) is the same as what I get after sending particle keys doctor device_id.

::ffff:10.10.10.10 - - [31/Jan/2017:23:45:28 +0000] "POST /v1/provisioning/[devid]HTTP/1.1" 200 128 "-" "-"
uncaughtException { message: 'this is not a typed array.',
stack: 'TypeError: this is not a typed array.\n at Function.from (native)\n at ChunkingStream._this._transform (C:\node\spark-server\node_modules\spark-protocol\dist\lib\ChunkingStream.js:139:27)\n at ChunkingStream.Transfor
m._read (_stream_transform.js:167:10)\n at ChunkingStream.Transform._write (_stream_transform.js:155:12)\n at doWrite (_stream_writable.js:292:12)\n at writeOrBuffer (_stream_writable.js:278:5)\n at ChunkingStream.Writable.write (
_stream_writable.js:207:11)\n at Socket.ondata (_stream_readable.js:528:20)\n at emitOne (events.js:77:13)\n at Socket.emit (events.js:169:7)\n at readableAddChunk (_stream_readable.js:146:16)\n at Socket.Readable.push (_stream
_readable.js:110:10)\n at TCP.onread (net.js:523:20)' }

from spark-server.

AntonPuko avatar AntonPuko commented on July 17, 2024

@Snazzypants could you tell please: Os, node version and version of system firmware on your photon ?

from spark-server.

jlkalberer avatar jlkalberer commented on July 17, 2024

Hey @Snazzypants - turns out it was happening because we were using a newer version of Node APIs. @AntonPuko switched to use older APIs so you should be good as long as you pull again.

from spark-server.

lilyannh avatar lilyannh commented on July 17, 2024

Thanks! All seems well now (I'm still not completely sure what I'm doing or what to expect but my photon is now 'breathing' cyan as expected).

from spark-server.

jlkalberer avatar jlkalberer commented on July 17, 2024

Yeah, I think you should be good to go. Thanks for being a guinea pig :)

from spark-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.