Genie Discord forum

Author AvatarAleksandr
2/18/2023, 9:55:13 PM

If I register a channel (called test, for example) and try to connect to it then I receive “Got this payload: ERROR : 404 - Not found”. Has anyone been able to set up any but the default channel?

Author Avataressenciary
2/20/2023, 8:25:40 AM

@Aleksandr can you share some code please?

Author Avataressenciary
2/20/2023, 8:25:49 AM

this definitely works, it's used in many places

Author AvatarAleksandr
2/20/2023, 10:17:39 AM

Here is a repo with a minimal example: Run 'Server/startup.jl' to start the server. Go to '/'. It uses the default channel and works. You can broadcast for testing. Go to '/test'. It uses a channel called '/test' and does not work.

Author Avatarabhimanyuaryan
2/21/2023, 6:31:26 PM

yes can you share some code. Last time I checked. I could access them at ____

Author Avatarabhimanyuaryan
2/21/2023, 6:33:26 PM

use this

using Genie, Genie.Router, Genie.Assets

Genie.config.websockets_server = true # enable the websockets server

route("/") do

up() # start the servers
Genie.WebChannels.broadcast("____", "Hey!")

and you'll see the message in your browser that's connected to -> or whatever the default is

Author AvatarAleksandr
2/21/2023, 8:47:48 PM

Using the default channel does work. But how can I make another channel work, like "/test", for example?

Author Avatarabhimanyuaryan
2/23/2023, 11:55:34 PM

route("/test") should work?

Author AvatarAndiLeni
3/10/2023, 3:17:22 PM

@Aleksandr were you able to figure this out? I can not use custom channels too.

Author Avatarabhimanyuaryan
3/13/2023, 5:56:50 PM

@AndiLeni what version of Genie?

Author AvatarAndiLeni
3/13/2023, 6:08:42 PM


Julia Version 1.8.5
Commit 17cfb8e65e (2023-01-08 06:45 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 12 × Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
  Threads: 1 on 12 virtual cores

package status is:

  Genie v5.15.0
  GenieFramework v1.9.0
Author Avatarabhimanyuaryan
3/14/2023, 9:07:04 AM

I don't know why it doesn't work. Are you using ____ 4xunderscore for channel?

Author AvatarAndiLeni
3/14/2023, 9:27:55 AM

Hey I can. But this is not the issue. Custom channels do not work. The channel command should create additional websocket channels as far as I have understood the documentation. But they are not working