Skip to content
This repository has been archived by the owner on Jun 12, 2018. It is now read-only.

Creating a complex event doesn't update the calendar view #99

Closed
bnjbvr opened this issue May 13, 2014 · 9 comments
Closed

Creating a complex event doesn't update the calendar view #99

bnjbvr opened this issue May 13, 2014 · 9 comments
Labels

Comments

@bnjbvr
Copy link

bnjbvr commented May 13, 2014

STR

  • Create a new event, click on "More details"
  • Complete some fields
  • Click on create

Expected

The new event should directly show up in the calendar view.

Actual

One needs to refresh the page to see the newly created event in the calendar.

@aenario
Copy link
Contributor

aenario commented May 13, 2014

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

@bnjbvr
Copy link
Author

bnjbvr commented May 13, 2014

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.

@bnjbvr
Copy link
Author

bnjbvr commented May 13, 2014

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)

@jsilvestre jsilvestre added bug and removed question labels May 30, 2014
@jsilvestre
Copy link
Contributor

Any update on that matter @aenario / @bnjbvr ?

@aenario
Copy link
Contributor

aenario commented May 30, 2014

@bnjbvr , you need to update your proxy.

@bnjbvr
Copy link
Author

bnjbvr commented Jun 2, 2014

@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?

@aenario
Copy link
Contributor

aenario commented Jun 2, 2014

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)

@bnjbvr
Copy link
Author

bnjbvr commented Jul 8, 2014

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 :)

@aenario
Copy link
Contributor

aenario commented Jul 9, 2014

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

@aenario aenario closed this as completed Jul 9, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants