Category : mercure

I followed the symfony documentation for Mercure here: https://symfony.com/doc/current/mercure.html#programmatically-generating-the-jwt-used-to-publish So i create my token provider, but when i use it, i got a 401. Did i miss something ? SymfonyComponentHttpClientException ClientException HTTP/1.1 401 Unauthorized returned for "http://mercure:3000/.well-known/mercure". I dump the hub and i see some difference : when i use the secret, i got this ..

Read more

I’m trying to make a publish with the Hub Interface but everytime I get this error SSL connect error for "https://localhost:8000/.well-known/mercure" I’m running mercure with the Symfony Local Web Server, so mercure it’s running on https://localhost:8000/.well-known/mercure. I have checked and it is running but I can’t manage to make a publish. I’m making this call ..

Read more

I am having some issues with my NotificationService on my UAT environment, but, oddly, this is working fine on my local server. $ php7 bin/console cache:clear In DefinitionErrorExceptionPass.php line 54: Cannot autowire service "AppServiceNotificationService": argument "$hub" of method "__construct()" references interface "SymfonyComponentMercureHubInterface" but no such service exists. Did you create a class that implements this ..

Read more

Hy ! I’ve been blocking this issue for 2 days now. I’m trying to set up authentication for Mercure so that a customer can subscribe to "private" hubs. So I configured my environment variables as stipulated in the Symfony and Mercury documentation here they are: my .env of my app Symfony: ###> mercure/bundle ### MERCURE_URL=http://mydemoapp.com:80/.well-known/mercure ..

Read more

I am currently facing a small problem having never used Mercure, I followed a tutorial to implement Mercure on my Symfony 5 application which uses Turbo. Mercure works very well, but the problem is that I want to use Mercure to display data that is stored in the database (MSSQL) via another application. Overall in ..

Read more

docker-compose mercure: image: dunglas/mercure environment: – MERCURE_PUBLISHER_JWT_KEY=sdfsd345V&(%tovyv3ver – MERCURE_SUBSCRIBER_JWT_KEY=sdfsd345V&(%tovyv3ver – DEBUG=debug # Enable the debug mode. You should not enable it in production! – SERVER_NAME=:80 # Allow Mercure to run in HTTP, for PHP container to call it. Should not be set in production! – MERCURE_EXTRA_DIRECTIVES=cors_allowed_origins * ports: – "1337:80" start docker-compose up –build open ..

Read more