Coder Social home page Coder Social logo

Comments (8)

dmiddlecamp avatar dmiddlecamp commented on August 11, 2024

are you viewing source? The spark-cli is hitting the same api endpoint as in the browser, so there shouldn't be a difference there. We could optionally add a 'format' param to those endpoints to get a friendlier HTML view back, which might be nice.

from spark-server.

kennethlimcp avatar kennethlimcp commented on August 11, 2024

Hmm.. There's 2 other guys who had the same issue. Doing it with the spark cloud publish events display well in just a chrome tab but not the local cloud

from spark-server.

dmiddlecamp avatar dmiddlecamp commented on August 11, 2024

okay, weird, I'll look into it. Thanks!

from spark-server.

crimsonclyde avatar crimsonclyde commented on August 11, 2024

I think I am one of those guys ;) currently I did not get any result if i try to follow bko´s tutorial: https://community.spark.io/t/tutorial-getting-started-with-spark-publish/3422.

When I try to open the event with my browser (tested FF, chrome, safari) I get a stream that tries to save the file event. Sounds nice but a stream doesn´t ends, so I opened up the events.part file and the content is simply ":ok".

Code works with :spark: ☁️ but not in my local cloud instance. Sadly there is no output in the console I can paste in here. Let me know if I can help you!

from spark-server.

crimsonclyde avatar crimsonclyde commented on August 11, 2024

Anything new on this?
It would be awesome if I can red my events again from my website?
Is there an update to the local cloud on the horizon or does anyone have looked into that issue?

from spark-server.

chron0 avatar chron0 commented on August 11, 2024

I had similar issues using chromium, spark-cli or curl with a local cloud instance:

$ spark subscribe Alert
Subscribing to "Alert" from the firehose (all cores) 
Listening to: /v1/events/Alert

and nothing more.

Same thing with curl:

$ curl -H "Authorization: Bearer ABCaccess_token789" http://10.1.1.1:8080/v1/events/Alert
:ok

always an empty line.

Serial debug shows that the event fires (at least the part where Spark.publish() is called), so I would reckon that spark-server somehow doesn't deal with the events. Not having events would mean having to poll all data all the time, which really is a show killer for many use cases.

Update:

After playing a bit more and realizing that my spark firmware code actually publishes events every 200ms when triggered, I throttled down to 500ms delay and suddenly I could see the events with curl and the spark-cli. So, if you're having similar issues, try to check/reduce the publish rate and see if that may help. It also worked in Chromium Version 37.0.2062.120 (281580) (64-bit) Browser Tab via:

http://10.1.1.1:8080/v1/events/Alert?access_token=ABCaccess_token789

from spark-server.

kennethlimcp avatar kennethlimcp commented on August 11, 2024

I think only spark subscribe mine works for now

from spark-server.

juano2310 avatar juano2310 commented on August 11, 2024

Same problem here. I can see the event in Spark-Cli if i subscribe to all events but can't on my web implantation.

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.