Questions tagged [mercure]

Mercure is a protocol allowing to push data updates to web browsers and other HTTP clients. Mercure Hub is a reference implementation of the protocol.

mercure
Filter by
Sorted by
Tagged with
1 vote
0 answers
467 views

How to install mercure in Symfony project?

I am trying to implment Symfony Mercure in my local environment. I am following official documentation https://symfony.com/doc/current/mercure.html So accordingly I downloaded binary from link https://...
nas's user avatar
  • 2,325
3 votes
1 answer
2k views

Symfony 5 Mercure Failed to send an update SSL connect error for "https://127.0.0.1:8000/.well-known/mercure"

i'm student and beginner, sorry in advance if i don't understand. I try to use Symfony 5 with mercure but i have some difficulty to send an update to the hub. i check the document to Symfony Mercure ...
devstudent's user avatar
2 votes
1 answer
1k views

Symfony / Mercure / JS EventSource don't send cookie

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 ...
Stollpy's user avatar
  • 45
0 votes
0 answers
508 views

Couldn't connect to server for "http://mercure:7001/.well-known/mercure" // TransportException

i'm little confused about this so i want your help in my docker-compose i think i have configured all want it must be. But the thing is when im trying publish somthing in mercure via symfony he dont ...
vastollordes's user avatar
2 votes
0 answers
2k views

Mercure hub behind Nginx reverse proxy

I try to deploy a Mercure hub on a server. There is already a Symfony app (REST API) served with Apache2 (and Nginx configured in reverse proxy). My idea is to keep the API proxy to Apache2 and ...
Rubix's user avatar
  • 53
4 votes
1 answer
4k views

Symfony + Mercure connection problems. Use HTTPS instead of HTTP

I was trying to establish a connection between two docker containers. One as nginx server + Symfony application, and the second with Mercure. My application is working fine, docker-compose build also ...
Eddy's user avatar
  • 623
0 votes
1 answer
922 views

Run Mercure on production with Symfony and Apache | HTTPS problem

i have a symfony app and i'm using Mercure. To run Mercure i use this command SERVER_NAME=:3000 MERCURE_PUBLISHER_JWT_KEY='something' MERCURE_SUBSCRIBER_JWT_KEY='something' CORS_ALLOWED_ORIGINS=https:/...
AmsiVolv's user avatar
1 vote
2 answers
575 views

Why pushing update to Mercure Hub with PublisherInterface throw a TransferException?

I'm using Mercure Hub in a Docker container on my windows machine. I've got a Symfony application and I want to use the Mercure bundle to push messages to clients. /** * @Route("/message", ...
ceet's user avatar
  • 21
0 votes
1 answer
621 views

Start Mercure Hub Server with Symfony Command class– Issue [Symfony]

The idea is: Instead of launching Mercure Hub server directly in our command line like this: We want to make it easier by using symfony command, therefore we can launch the server like this: NB: We ...
Medinho's user avatar
  • 203
2 votes
1 answer
1k views

Mercure & Event Source Polyfill :Error : No activity within 45000 milliseconds. 2 chars received. Reconnecting

I have a symfony / api PLatform server. I added Mercure to send SSE to API clients. On my client side I subscribe using event Source Polyfill. I manage to receive the messages, but I have the ...
Alexglvr's user avatar
  • 437
1 vote
1 answer
2k views

how to pass MERCURE_EXTRA_DIRECTIVES as enviroment directivei in docker-compose.yml

the new (0.11) mercure configuration grouped all extra directive into a single environment variable. I'm trying to set it via docker-compose.yml but I don't know if it's possible: environment: ...
Dani's user avatar
  • 14.9k
0 votes
3 answers
1k views

Symfony Mercure Error Symfony\Component\Mercure\PublisherInterface

use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\...
Lucifer's user avatar
  • 21
1 vote
0 answers
402 views

How to migrate mercure.rocks legacy configuration to new Caddy Server based configuration

I have a symfony mercure.rocks based chat application, and im trying to switch from old legacy mercure.rocks configuration to new caddy server hub configuration. i tired few methods to make it work, ...
Joseph Miller's user avatar
0 votes
0 answers
1k views

Docker mercure not sending updates with symfony

I made simple docker based application with NGINX, PHP, PostgreSQL, Node, Mercure and Symfony just to test the capabilities of Mercure. The problem is that I'm not getting any updates from Symfony ...
Lladdmi's user avatar
  • 15
1 vote
1 answer
3k views

mercure docker cannot configure properly problem with CORS

I try for a bunch of hours to configure my mercure with docker I didn't manage to solve the corss issue : has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the ...
user2626210's user avatar
0 votes
1 answer
560 views

Can't install Mercure for Symfony project

I tried to follow the documentation for mercure and symfony found here but always encounter an error. The first part : >composer require mercure Works with no issue but as soon as I try to do the ...
Leonos's user avatar
  • 5
0 votes
1 answer
896 views

How to put two Bearer keys in Postman?

My Symfony project uses an authentication check; so there is a token involved. Now I use Mercure as a real-time mechanism used in Symfony; it uses a JWT token also. So how can I put the two Bearer ...
pheromix's user avatar
  • 18.7k
0 votes
1 answer
3k views

Can not configure the new dunglas/mercure image

Problem: Dunglas Mercure just upgraded this week, and has completly change, it now use a caddy web serveur solution instead of a built-in web serveur, it seems to be very cool, but now, i can not ...
Thibault Cabanes's user avatar
0 votes
1 answer
1k views

Symfony how to use Mercure with Messenger + RabbitMQ?

I am looking to use Mercury with RabbitMQ. This is the first time that I have used Mercury as well as RabbitMQ so I am not yet good. Here is where I am: I've installed Mercure, and Messenger. ...
eronn's user avatar
  • 1,770
2 votes
1 answer
2k views

Mercure Docker Invalid JWT Signature from ignoring JWT_KEY from docker-compose

I have a docker-compose which fires up a mercure container docker-compose version: '3.8' services: ... mercure: image: dunglas/mercure ports: - '8003:443' ...
PrimuS's user avatar
  • 2,613
0 votes
1 answer
212 views

Python - Flask with mercure_hub

I tried to follow chat implementation from here https://github.com/dunglas/mercure/tree/master/examples/chat. But so far, I didn't succeed to achieve that. For Mercure hub implementation I build a ...
Raphael Obadia's user avatar
0 votes
1 answer
422 views

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

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://...
Imad Najmi's user avatar
1 vote
2 answers
266 views

Observable updates UI only once

I am fairly new to Angular (10) and try to grasp the concept of Observables. I have a Service and a Component, the services fills an array with participants and the component is supposed to display ...
PrimuS's user avatar
  • 2,613
0 votes
0 answers
729 views

Mercure publish : Peer certificate cannot be authenticated with given CA certificates for

I am trying to configure the latest version of Mercure in production mode. I am running this version mercure_0.10.3_Linux_x86_64 Running command PUBLISHER_JWT_KEY=XXXXXX \ SUBSCRIBER_JWT_KEY=XXXXXX \ ...
reeslo's user avatar
  • 1
1 vote
0 answers
448 views

Problem using the API Mercure with Symfony

Here is the error message : Argument 1 passed to App\Controller\PublisherController::index() must be an instance of Symfony\Component\Mercure\Publisher, instance of Symfony\Component\Mercure\Debug\...
zidanow's user avatar
  • 570
0 votes
2 answers
2k views

Mercure & API platform: auto-publish data

i have a symfony 5.0/API-platform back end project and a react/redux front project, i would like to dispatch updates(POST, PUT, DELETE) to connected clients. For that i am trying to achieve this ...
Mikalov's user avatar
  • 11
0 votes
1 answer
1k views

symfony5/Mercure : How to troubleshot why I can't connect to my mercure hub

I'm trying to setup a Mercure hub with my symfony app. When I try to publish something on it using the Symfony\Component\Mercure\Publisher class, i'm getting a TransportException from curl : "...
Mouke's user avatar
  • 924
1 vote
1 answer
1k views

Symfony 5 / Mercure > Private update. Fetch CORS

I try to integrate Mercure to symfony 5 project. And there are two trouble. I try to send update to private, but it's not work, but if try to send to not private everything works. Command that run ...
Vitaliy Roslov's user avatar
2 votes
0 answers
1k views

Symfony error Couldn't connect to server for "http://localhost:3000/.well-known/mercure"

I have a problem using mercury on a Symfony project, I installed mercury at the root of my project, however, when I test sending a request to mercury I got the error Couldn't connect to server for &...
florian_drupal's user avatar
1 vote
1 answer
743 views

Api Platform Mercure Private Updates Use same JWT for subscribing to Mercure as for User authentication

So I have an Api Platform application with JWT authentication using LexikJWTAuthenticatorBundle. So my users already have a JWT used to authenticate. Can I somehow use this same JWT to authenticate ...
Raress96's user avatar
  • 214
0 votes
1 answer
680 views

ApiPlatform & Mercure (private topics)

My architecture is based on Symfony 4.4 / ApiPLatform / Mercure / Angular 9. I've made working a simple push from Mercure by adding mercure:true in my resources.yaml ApiPlatform conf file. Now I need ...
Samy AZ's user avatar
  • 41
0 votes
1 answer
1k views

symfony 5 mercure bundle HTTP/1.1 400 Bad Request returned

I'm trying to use symfony mercure bundle but it doesn't seem to work even with the example given on the documentation. here is my code in my controller /** * @Route("/test", name="test&...
Lastlevel 48's user avatar
2 votes
1 answer
2k views

get Unauthorized when trying to send post request to mercure hub

I'm working with mercure to get real time response. i configured mercure with docker : mercure: container_name: mercure image: dunglas/mercure restart: always environment: ...
Khaled Boussoffara's user avatar
2 votes
1 answer
3k views

Symfony Mercure : EventSource don't send cookie

With Symfony Mercure, I want to send a cookie authorization : Symfony server : https://127.0.0.1:8000/ Mercure Hub : http://localhost:3000/.well-known/mercure I start my Mercure server with this ...
Gaylord.P's user avatar
  • 1,480
1 vote
3 answers
8k views

JWT key for mercure

I try generate JWT key for Mercure settings I use this manual https://medium.com/@stefan.poeltl/instant-realtime-notifications-with-symfony-and-mercure-e45270f7c8a5 for pass myJWTKey JWT is ...
Developer's user avatar
  • 2,813
1 vote
2 answers
3k views

Request with Symfony HttpClient returns code 0, when the same request with postman works fine

I have a weird problem where a request I make (to my mercure hub) with postman works fine, however the Publisher class (from the Symfony mercure bundle), which uses the Symfony HttpClient will yield ...
mehlichmeyer's user avatar
1 vote
0 answers
644 views

How to make API Platform autodiscovery mechanism for Mercure hub work with Docker image?

I've developped a demo project to illustrate a presentation I'm doing about the Mercure protocol, in which I also use API Platform. I had used the autodiscovery mechanism to retrieve the Mercure hub ...
Chloé's user avatar
  • 344
0 votes
0 answers
866 views

Symfony / Mercure question : 2 users with single self targets can both see each other's supposedly looped messages

I made a chat page where the logged in user should be able to see only his own messages thru single targets. However, every user can see every other user's supposedly self-intended (looped) messages. ...
Coreoida's user avatar
0 votes
0 answers
931 views

dunglas mercure server / javascript EventSource withCredentials : mercureAutorisation cookie not transmited

Making a mercure /hub dispaching Updates with symfony 4.4 works fine until I dont try using credentials with mercureAuthorization cookie. As soon as I add {withCredentials: true} in EventSource, ...
bycrea's user avatar
  • 1
2 votes
0 answers
600 views

Why is Symfony's autowire giving me the debug-version instance of a class? Can I bypass this to get the regular version in dev mode?

I have a problem with the autowiring of Symfony\Component\Mercure\Publisher. Instead I am being autowired Symfony\Component\Mercure\Debug\TraceablePublisher by error. How do I fix this? Error message ...
Coreoida's user avatar
0 votes
2 answers
2k views

react native can't subscribe to mercure backend notifications

I'm working on a notifications system with React Native and Symfony. I configured Mercure with docker to handle front subscription to real time updates : the .env file : ###> symfony/mercure-...
Khaled Boussoffara's user avatar
0 votes
1 answer
2k views

Mercure + Angular + Symfony >>> all on local machine

I'm local on Mac OS 10.14.6 using Angular 8, Symfony 4.3 and mercure 0.72 darwin. I'm quite new to symfony. I wanted to dispatch updates only to authorized clients on my local machine. So far it ...
Allisone's user avatar
  • 8,714
3 votes
2 answers
4k views

How to run Mercure in production with Apache

I have a Symfony project on an Apache server that uses Mercure and I try to setup the Mercure hub in production. To run the Mercure hub in production, I extract the archive mercure_0.6.2_Linux_x86_64....
Alexis Mathias's user avatar
1 vote
1 answer
4k views

Symfony 4 and Mercure with Docker - Couldn't connect to server

I'm trying to run Mercure on Symfony with a Docker image. symfony/mercure version: "v0.2.0", docker-compose.yaml configuration: mercure: container_name: mercure image: dunglas/mercure ...
Srdjan's user avatar
  • 432
0 votes
0 answers
515 views

Symfony 4 and MercureBundle

I'm a new user of this platform and I'm trying to integrate Mercure into Symfony by following the documentation: https://symfony.com/blog/symfony-gets-real-time-push-capabilities . Once all the steps ...
Davide Capriglione's user avatar
2 votes
2 answers
1k views

Is this possible to get mercure protocol with Heroku using API platform?

I deployed a API Platform api and client using Heroku but it seems that Mercure is not working out of the box, but I think my application may have missing configuration. The only thing I configured ...
alexandre-mace's user avatar
0 votes
1 answer
2k views

How to get Mercure server to automatically push to event subscribers?

I have a quick test Symfony application running to try to integrate the Mercure protocol. I have a test Mercure hub running with the following: JWT_KEY='aVerySecretKey' ADDR='localhost:3000' ...
football2801's user avatar
2 votes
1 answer
5k views

How to run Mercure in production

I'm trying to run Mercure on Symfony within a production env. [1st problem] It seems that I need to keep my ssh connection active in order to keep mercure running. Also, I would like to be able to ...
Preciel's user avatar
  • 2,701
2 votes
1 answer
525 views

api-platform: automatic mercure subscriptions for GraphQL queries

api-platform automatically issues events to a mercure hub when updating resources marked with mercure=true and publishes the topics to listen on in the according GET endpoints. Nice. Is there already ...
Stefan's user avatar
  • 3,392

1
2