Can't connect photon to local server

I’m trying to connect my Photon to a local server on my Respberry Pi and I’m getting a “CryptoStream transform error”. I’ve seen other discussion regarding this problem, and I see on Github a “commit” that fixes the problem apparently posted yesterday.

CryptoStream error fix

So I am very new to all of this. I’ve never run a local server before. I’m not sure what a “commit” is. I’ve tried running npm update in the spark-server directory and I still get the error. I’m not sure where to go from here.

How can I implement this fix?

Do you have git installed?

Yes, I do. Should I use git clone to redownload spark-server files and run npm-install again?

Use this:

  • git clone
  • replace this inside the node_modules of spark-server

Nope, had to go in manually and edit CrytoStream.js to match the “commit”. Phew! Finally connected!!! Took me days of reading through various tutorials and learning way more about Linux than I wanted to know in order to make it happen. I really hope you guys make streamlining local server installation a priority for us not so sophisticated folks.

For anyone who happens to stumble across this and is looking for help getting a local server running on a raspberry pi, here’s a script I wrote to make it happen. Sprinkle sudo reboot liberally throughout.

Setup Script:

Load Raspbian Jesse

sudo apt-get update
sudo apt-get upgrade
sudo apt-get build-dep dfu-util
sudo apt-get install libusb-1.0-0-dev
sudo apt-get install npm
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'

Open or create a ~/.profile file and add this line:
export PATH=~/.npm-global/bin:$PATH

source ~/.profile
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
npm install -g particle-cli
nano /etc/dhcpcd.conf

interface eth0
static ip_address=
static routers=
static domain_name_servers=

tar xvf dfu-util-0.7.tar.gz
cd dfu-util-0.7
sudo make install
git clone
cd spark-server
npm install
node main.js

That will at least get the server running.