notify-run / notify-run-server

41 stars 9 forks source link

Subscribing channel causing javascript error #3

Open deemonrider opened 4 years ago

deemonrider commented 4 years ago

Hey, im trying to host my own notify run server and so far sending messages to the server works as expected but when I try to press the button "subscribe on this device" I get this error:

Uncaught TypeError: Cannot read property 'register' of undefined
    at e.subscribe (subscription.ts:55)
    at t.onSubscribe (channel.tsx:122)
    at Object.<anonymous> (react-dom.production.min.js:14)
    at d (react-dom.production.min.js:15)
    at react-dom.production.min.js:15
    at _ (react-dom.production.min.js:17)
    at P (react-dom.production.min.js:18)
    at S (react-dom.production.min.js:18)
    at R (react-dom.production.min.js:21)
    at En (react-dom.production.min.js:84)

Additionally it would be very cool to have a tutorial for hosting this with apache because the default VirtualHost config from own projects doesn't work their and https is very important :D

paulgb commented 4 years ago

Thanks for reporting. It is this line that is throwing the error, but that should not happen if this check passes. I'll need to figure out what flow caused this. Could you tell me:

As for the Apache docs, unfortunately I haven't done Apache config in nearly a decade so I'm probably not the best one to write that :)

deemonrider commented 4 years ago

I start the server using gunicorn notify_run_server:app --bind=0.0.0.0:8060 then I go to the main page and create a channel. It then creates the channel and I can go to the channel page but when I try to press subscribe this error occures.

(http://192.168.178.81:8060/c/OXqmxH7uimiZgC1f)

I tried google chrome on android, chrome, firefox and edge on windows and all with the same behaviour

The pi4 has a clean raspbian lite installation and I tried also changing the sql db to 777 but that wasn't the problem :/

ibury08 commented 4 years ago

I'm also having this issue on Chrome 80, subscribing from the channel page.

MatthewDiDonato commented 4 years ago

I am having the same issue as above, any update or fix?

paulgb commented 4 years ago

@maltemosler @ibury08 @MatthewDiDonato apologies for the slow reply. Are you by chance using HTTP (rather than HTTPS) servers? It may be the case that subscriptions only work over HTTPS now, which would unfortunately complicate set up.

chanoc1 commented 3 years ago

Yeah, you need to run gunicorn with HTTPS. Make sure your file permissions are in order if you make self signed certs, otherwise gunicorn won't be able to read them.