Skip to content
This repository has been archived by the owner on Oct 31, 2021. It is now read-only.

Subscribing channel causing javascript error #3

Open
deemonrider opened this issue Feb 25, 2020 · 6 comments
Open

Subscribing channel causing javascript error #3

deemonrider opened this issue Feb 25, 2020 · 6 comments

Comments

@deemonrider
Copy link

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
Copy link
Collaborator

paulgb commented Mar 2, 2020

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:

  • Are you using the subscribe button in the "quick start" flow on the main page, or on a channel page?
  • Which browser are you using?

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
Copy link
Author

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
Copy link

ibury08 commented Mar 22, 2020

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

@MatthewDiDonato
Copy link

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

@paulgb
Copy link
Collaborator

paulgb commented Apr 12, 2020

@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
Copy link

chanoc1 commented Mar 3, 2021

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.

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

No branches or pull requests

5 participants