Tutorial: Local Cloud 1st Time instructions [01 Oct 15]


#82

See: https://community.spark.io/t/node-js-version-and-spark-server/10387/3


#83

@kennethlimcp, I have tried rolling back the version of node js to versions v0.10.36, v0.10.29 and v0.10.30. Each time the server fails to start with this error:

connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
dyld: lazy symbol binding failed: Symbol not found: _node_module_register
Referenced from: /Users/Bobby/Desktop/spark-server/js/node_modules/ursa/build/Release/ursaNative.node
Expected in: dynamic lookup

dyld: Symbol not found: _node_module_register
Referenced from: /Users/Bobby/Desktop/spark-server/js/node_modules/ursa/build/Release/ursaNative.node
Expected in: dynamic lookup

Trace/BPT trap: 5


#84

@brospo,

let me get back to you over the weekend when i have time to sit down and test things out :wink:


#85

@kennethlimcp thanks for looking into it!

I would love to be able to use the regular cloud service for my project but unfortunately I won’t have access to the internet, just a local wifi network.


#86

@brospo,

just check that my spark-server code is running on nodejs version: v0.10.29

Nothing special for my setup though. Just a normal Mavericks Mac OSx.

Can you tell me whether you “installed” the spark-server using npm install?

Or did you grab it from npm?


#87

So @kennethlimcp I’ve probably spent way too much time on this and should have reached out earlier… As I mentioned a few messages back, I had downloaded the new version of spark-server for a new build, but for the life of me can’t get it to issue me an access token. I started on Ubuntu 14.04, went back to 12.04, tried Wheezy. Meanwhile I’ve also been trying on different hw platforms. After starting up the server successfully, when I run Spark setup in the other window, I get every time…

Trying to login...
Could not get new access token:  server_error
login error:  server_error
Error setting up your core: Unable to login or create a new account

The Spark server terminal window shows this after each try…

Your server IP address is: 10.0.2.15
server started { host: 'localhost', port: 5683 }
10.0.2.15 - - [Sat, 07 Mar 2015 15:02:34 GMT] "POST /oauth/token HTTP/1.1" 503 83 "-" "-"

Communication with the core in DFU mode for key transfer works fine

And just to cover another angle, I do have the older version of spark-server running on another dev board and I did successfully set up another user no problem.

It would be nice if the spark-server repo had a changelog :wink:

Any thoughts?


#88

@techbutler,

A changelog is definitely possible but i don’t recall any updates except for the recent bump to V1.0.0.

I wonder if the cores connected fine with your :cloud:?


#89

@kennethlimcp ,
Ok, I’ll just assume it’s on my end then. I have tried with two separate cores. I guess I’ll try a Windows install next.


#90

It shouldn’t be dependent on OS. PM me if you need more help. We can work it out offline :wink:


#91

Hello I have tried this tutorial a hundred times and tried everything. I can’t get breathing cyan. I think the problem is with spark-server side. whenever I try to use spark-setup I get a server error . I cannot create a user . am I correct in assuming when you use spark-setup and enter user name and password that the server will generate a token?
setup windows7 32-bit
node version 0.10.30
same issue as Techbutler


#92

What does spark config identify say?

Hey guys, i just grabbed the source code from the repository and did a sudo npm install (run as Administrator for command prompt in windows) and the local :cloud: fired up fine.

Creating an account is the issue right now and i believe it has to do with the Spark-cli update…

@nexxy, pinging you just to keep you in the loop about this. We can discuss offline on what caused the issue of creating an account using Spark-cli in the local :cloud: environment


The issue is that we are now handling the Serial port not available properly but it will exit the spark setup before we can create an account`

@techbutler and @bpescaaz, the short term solution now is to install an older version of Spark-cli instead.

Use this command: npm install -g spark-cli@0.4.94


#93

@kennethlimcp Thankyou so much for the quick response and the solution to my problem. I spent countless hours on this. I thought I was going crazy. How could I be the only one who couldn’t get this to work lol.


#94

hey, thanks for pinging me @kennethlimcp!

Definitely concerning news to hear that the spark-cli could be at fault for a local cloud issue.
I will put this on my list of things to investigate.

Is it possible to get a list of steps to reproduce?

Thanks!
— Emily


#95

@nexxy,

it will affect people using the Spark :cloud: as well since it’s about account creation in general. Will post the information in the github issue.


#96

@kennethlimcp thank you! I will take a look at this first thing tomorrow.

Obviously the need for more tests is showing :slight_smile: I will make that a priority as well.

— Emily


#97

Hi, I’m having a problem setting up my local server. It runs fine and my spark connects to it and is breathing cyan. The spark-cli doesn’t seem to point to the server though. I’ve successfully run spark config local api-url http://192.168.1.103:8080 then spark config local.

When I try to create a new account using spark login it tells me “Please login - it appears your access_token may have expired”. When I try to login using an email + password that I’ve previously used on the spark cloud it logs in normally and my email and an access token appear in local.config.json

When I run spark identify it tells me

  Current profile: local
  Using API: https://api.spark.io

even though local.config.json has "api-url": "http://192.168.1.103:8080"

And if I restart my server it always tells me that no users exist.

Any help would be appreciated. P.S. I changed to spark-cli 0.4.94


#98

@hazelrrr,

You might want to follow the tutorial closely since it should be apiUrl and not api-url :wink:


#99

Sweet, it works now Thanks!


#100

@kennethlimcp

By using the command:
$ spark config identify
The answer is:

**Current profile :** Local
**Using API:** https://api.spark.io
Access token: TOKEN_ID

I have the local profile but I am using the API of the spark cloud . I would use the Local API , what I have to do ?. Thank you for your help.


#101

@jairos,

1.) Please try not to post your questions at different places. You will not be getting more help and slow things down instead

2.) Do you mean you want to use the local command? It seems like you did not follow the tutorial closely…

The command was mentioned above: spark config name_of_local_profile

eg. spark config my_cloud