Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error to install composer #418

Open
Tywors opened this issue Aug 30, 2020 · 5 comments
Open

Error to install composer #418

Tywors opened this issue Aug 30, 2020 · 5 comments
Labels

Comments

@Tywors
Copy link

Tywors commented Aug 30, 2020

I have this error when execute composer:

You have requested a non-existent parameter "gos_web_socket.server.host"

problem?
thanks!

@mbabker
Copy link
Contributor

mbabker commented Aug 31, 2020

What version of the bundle?

It's been a long while since I've done a fresh install into a Symfony application, but IIRC the bundle's default configuration causes that error on a totally new install until you set things up. And, last time I tried creating a recipe for the bundle I just ran into too many quirks with the recipe checker to make it work efficiently, so I haven't tried again to be able to avoid the initial error message.

Try this as a baseline for the bundle config, place it at config/packages/gos_web_socket.yaml:

parameters:
    # Adds fallback params in case the corresponding env vars are not set.
    # This allows you to run cache:warmup even if your
    # environment variables are not available yet.
    # You should not need to change this value.
    env(GOS_WEB_SOCKET_SERVER_IP): '127.0.0.1'
    env(GOS_WEB_SOCKET_SERVER_PORT): 1337

gos_web_socket:
    server:
        port: '%env(int:GOS_WEB_SOCKET_SERVER_PORT)%' # The port the socket server will listen on
        host: '%env(GOS_WEB_SOCKET_SERVER_IP)%'       # The host ip to bind to
        router:
            resources:
                -
                    resource: '%kernel.project_dir%/config/pubsub/websocket/*'
                    type: 'glob'

@xxxMikel
Copy link

xxxMikel commented Oct 7, 2020

I have the same problem - I tried to install version >=3.4.0 and get the same error message:
You have requested a non-existent parameter "gos_web_socket.server.host".
After having added config/packages/gos_web_socket.yaml I ran the installation a second time - but this time I get the error:
!! In FileLocator.php line 44:
!!
!! The file "//config/pubsub/websocket" does not exist.

@mbabker
Copy link
Contributor

mbabker commented Oct 7, 2020

Create the config/pubsub/websocket directory.

If I can find time, I'll see if I can make a recipe for 3.0 that works and maybe that helps with some of the initial install struggles. When I tried the recipe last, it was for 2.3 and it just did not go well at all because of the wider range of supported PubSubRouterBundle versions (if anyone cares, symfony/recipes-contrib#881 was the recipe which is pretty much the exact same advice here just automated).

@Lyro1
Copy link

Lyro1 commented Nov 18, 2020

This works when I do the two steps mentioned above 👍

@Dekminoz
Copy link

Hi , i have the same issue on "composer require gos/web-socket-bundle"

"You have requested a non-existent parameter "gos_web_socket.server.host""

My gos_web_socket.yaml file exist in config/packages/gos_web_socket.yaml

What can i do ?

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

No branches or pull requests

5 participants