Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to spark cloud 404 error #33

Closed
kevinold opened this issue Jul 28, 2014 · 4 comments
Closed

Unable to connect to spark cloud 404 error #33

kevinold opened this issue Jul 28, 2014 · 4 comments

Comments

@kevinold
Copy link

Hi,

I wrote 2 scripts a few months ago that were working well with the spark cloud. Yesterday I fired them up again for NodebotsDay and ran into the following error:

Error: Unable to connect to spark cloud.: code: 404 {
"ok": false,
"error": "Variable not found"
}
at IncomingMessage. (/Users/kold/spark-io-scripts/node_modules/spark-io/lib/spark.js:246:19)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:919:16
at process._tickCallback (node.js:419:13)

This is the code I'm running to generate this:

var Spark = require("spark-io");
var five = require("johnny-five"),
  board, photoresistor;

board = new Spark({
  token: process.env.SPARK_TOKEN,
  deviceId: process.env.SPARK_DEVICE_ID
});

Debugging a bit, it seems that an action of "endpoint" is no longer supported by the Spark Cloud, although I cannot find a deprecation:

https://github.com/rwaldron/spark-io/blob/master/lib/spark.js#L226

I am certain that my device is connecting and reporting a variable as I am able to use the spark-cli and monitor the variable in realtime and it reports correctly:

spark variable monitor photoresisto

What's odd is that I"m not able to find any mention of "endpoint" in https://github.com/spark/spark-cli or https://github.com/spark/spark-server (even though it's fairly new).

Are other's seeing this issue?

I'm running:

spark-io@0.5.1
spark-cli@0.3.95
johnny-five@0.7.56

@kevinold
Copy link
Author

I've started a thread on this at the Spark Community and will report back with any findings (and hopefully a patch!)

http://community.spark.io/t/unable-to-connect-to-spark-cloud-404-error-from-spark-io-npm-module-trying-to-access-endpoint/6038

@kevinold
Copy link
Author

Seems I don't have the latest version of voodoospark installed. Will try that and report back.

@kevinold
Copy link
Author

Confirmed, updating voodoospark to the latest head
(voodootikigod/voodoospark@b2f3ec0 as of today) fixed the issue.

@rwaldron
Copy link
Owner

@kevinold excellent, thank you for following up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants