fopen(http://127.0.0.1:3000/.well-known/mercure/): failed to open stream: Failed to parse address "0"

428 Views Asked by At

I use Symfony 5.1.*. I get this terrible bug, I don't know what's happen, I waste my day for nothing, if any one know something to save my carrier in programming.

#.env
MERCURE_PUBLISH_URL=http://localhost:3000/.well-known/mercure/
#config/packages/mercure.yaml
mercure:
    enable_profiler: '%kernel.debug%'
    hubs:
        default:
            url: http://localhost:3000/.well-known/mercure/
            jwt: '%env(MERCURE_JWT_TOKEN)%'

I run the command

 ./mercure --jwt-key='!ChangeMe!' --addr='localhost:3000' --allow-anonymous --cors-allowed-origins='http://localhost:8000'
1

There are 1 best solutions below

1
On

I found this bug on the symfony bug tracker: https://github.com/symfony/symfony/issues/38081

The problem was caused by a change in php 7.4.10, that broke symfony/http-client.

update: Updating to Symfony 5.1.6 fixed the problem. I guess that for Symfony 4.4 the latest version will fix the problem as well.