Giter Club home page Giter Club logo

Comments (9)

aenario avatar aenario commented on June 10, 2024

Hi benjamin,

This works on my cozy's VM, but after looking at the code it appears to work only because of the realtime loop (the change is made in the Data-System, an event is fired, the app fetch latest version from the server).

To test if the realtime loop works on your VM, open the calendar app in two browser windows on the same month and create an event in one of the window. It should appears without refresh on the other window.

If it doesn't, that means the realtime doesn't work.
To debug it :

  • Can you see the websocket connection in your browser debugger ?
  • Are you hosted on cozy or self-hosting ? if self-hosting, could you give me your node & stack versions
    sudo cozy-monitor versions node -v
  • cat /usr/local/cozy/apps/data-system/data-system/cozy-data-system/log/production.log | grep "Publishin g event."
    should not be empty

from cozy-calendar.

bnjbvr avatar bnjbvr commented on June 10, 2024

Hi!
Indeed, realtime loop doesn't seem to work:

  • The websocket is apparently not working (both firefox and chromium):

Chromium:

WebSocket connection to 'wss://cozy.mydomain.net/socket.io/1/websocket/dWgJD1rckfbAz8ENp1r4' failed: Error during WebSocket handshake: Unexpected response code: 200 

Firefox:

Firefox can't establish a connection to the server at wss://cozy.mydomain.net/apps/calendar/socket.io/1/websocket/xR09M9UAThA6c6ocqCeX.
  • sudo cozy-monitor versions
Cozy Stack:
controller: 1.0.25
data-system: 1.0.12
home: 1.0.21
proxy: 1.0.2
indexer: 1.0.0
monitor: 1.0.0
  • node -v
    v0.10.26
  • There are "Publishing event" lines in the log (my instance is self hosted)
    For what it's worth, simple events get created and show up directly on the current window.

from cozy-calendar.

bnjbvr avatar bnjbvr commented on June 10, 2024

Oh, and thanks by the way, there are some chances we've found a bug in Firefox that shows up in the Calendar app :) (not related to the websocket though)

from cozy-calendar.

jsilvestre avatar jsilvestre commented on June 10, 2024

Any update on that matter @aenario / @bnjbvr ?

from cozy-calendar.

aenario avatar aenario commented on June 10, 2024

@bnjbvr , you need to update your proxy.

from cozy-calendar.

bnjbvr avatar bnjbvr commented on June 10, 2024

@aenario I updated proxy and the issue is still present. According to cozy-monitor versions, proxy is at version 1.0.4, which seems to be the head version on the github repo. Is there something else I can do to help debugging?

from cozy-calendar.

aenario avatar aenario commented on June 10, 2024

Ok , It works on my hosted instance with the following versions.

Cozy Stack:
controller: 1.0.24
data-system: 1.0.12
home: 1.0.11
proxy: 1.0.4
monitor: 1.1.17

Another potential source of error is your nginx (or another reverse proxy you might use). It needs to be setup for websockets (details here : http://nginx.org/en/docs/http/websocket.html)

from cozy-calendar.

bnjbvr avatar bnjbvr commented on June 10, 2024

Thanks for the links! After pasting the following lines in the cozy nginx descriptor file, everything worked as expected (after an actual nginx restart, sigh):

    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";

It might be nice to set up a FAQ page and to add a link to this nginx doc page there. Feel free to close the issue according to what decision you take :)

from cozy-calendar.

aenario avatar aenario commented on June 10, 2024

I created an issue in cozy-docs and closing this one. Thanks for reporting !

from cozy-calendar.

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.