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.
89
questions
1
vote
0
answers
25
views
Why I can't send cookie in Mercure with Symfony?
I make an online auction site and I want the user who previously had the highest bid to be able to receive a real-time notification, when another user has submitted a higher bid than his. So I want to ...
0
votes
0
answers
35
views
Symfony : multiple mercure subscriptions
I've developed an app based on this tutorial : https://symfonycasts.com/screencast/turbo
By the way, my app is broadcasting HTML updates on several topics, ie : chat-messages, notifications, chat-...
1
vote
0
answers
39
views
Api platform + mercure. How to modify a published entity when mercure service is not working
Well, I cannot figure out how to proceed if the mercure service (hub) is not working in the server. If this happens, I don't mind updates to subscribed clients, but I need the api to work as expected ...
1
vote
1
answer
105
views
DDEV not serving Symfony Mercure-Hub over HTTPS
I am running a Symfony Project via drud/ddev (nginx) for local development.
I did this many times before and had no issues whatsoever.
In my recent project I have to use the Mercure-Hub to push ...
0
votes
0
answers
37
views
Symfony ApiPlateform:V3 & mercure fail send update with Operations
Apiplateform:V3 doesn't send Mercure update when I set my crud operations like Post
if I uncomment the operation below the mercure update fail being sent
update are send only if I don t set the ...
0
votes
0
answers
34
views
React 17 useMemo create a losted instance of object
[EDIT]
Thanks to @dbuchet for his anwser. The problem comes from the fact that in StrictMode in dev mode only, everythings is running twice.
[PROBLEM]
I just got a weird beavour in React.
My context :...
0
votes
0
answers
29
views
How set customs params into a payload key of JSW if I use Cookie as auth mechanism and mercure() Twig extension
I have the following scenario for a chatroon with Symfony 5.4 and MercureBundle. Chat conversation function like a charm, but I don't understand how to include additional info (username) into a ...
0
votes
0
answers
28
views
Symfony 6 - Updating Textarea field for usage of multiple users in realtime with ajax and mercure protocol (SSE)
I am currenlty working on a Symfony 6 project. Now I have the requirement to realize an environment in which a textarea field can be used by multiple users in real time. So that each user can see what ...
0
votes
0
answers
36
views
How to set a broadcast driver in the event of laravel?
I have an event like this
<?php
namespace App\Events;
use Illuminate\Broadcasting\Channel;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\...
1
vote
1
answer
217
views
apiplatform mercure start not work : https://caddy "SSL certificate problem"
Unable to start working with mercury and apiplatform3.
However, my configuration is basic. (wsl2 / debian)
I kept the basic configuration to be able to start.
#api/.env
MERCURE_JWT_SECRET=&...
1
vote
1
answer
111
views
Deploy Mercure on Apache Server
I'm having trouble setting up Mercure in production mode with Symfony 4.4 on ovh server. It's working well in dev mode but when I'm trying to deploy it in prod, I have this issue.
loading initial ...
0
votes
1
answer
308
views
chat with Symfony mercure Failed to send an update & Message does not added in the data base
i want to create a real time chat group with symfony mercure, this is my MessageController code but i have this error when i ping mercure to do the update "Failed to send an update", also ...
1
vote
1
answer
191
views
Unable to setup Mercure with docker and Nginx (502 Bad Gateway)
I'm currently trying to set up a project with Mercure. My initial project has been setup by someone else, so I have very few knowledge of either Nginx or Docker.
We've tried some solutions found when ...
0
votes
0
answers
69
views
Routines::tlsv1 alert internal error for mercure server on docker
can connect to the server nginx on docker but can't publish something via PHP routines::tlsv1 alert internal error
URL to publish https://mercure/.well-known/mercure for the container, for public web ...
0
votes
0
answers
67
views
How to configure mercure connection subscription counts?
I am using eventSource for subscription
const eventSource = new EventSource(url);
eventSource.onmessage = event => { console.log('publishEventFromTopic');}
After 6th connection (new tab ...
0
votes
0
answers
378
views
Docker Symfony Mercure TransportException Failed to connect to localhost port 3000 after 0 ms: Connection refused
Can't do publish to mercure inside symfony controller, but I can do it from postMan and from demo mercure URL http://localhost:3000/.well-known/mercure/ui/
From class PublishController extends ...
0
votes
1
answer
285
views
Mercure issues with changing JWT secret key
im having problem with my Mercure App,
Im running via docker-compose image of mercure:
version: '3.7'
networks:
default:
external:
name: localdev
services:
mercure:
image: ...
0
votes
2
answers
232
views
Mercure and vue subscribing
im having some difficulties with mercure and Vue. I want to subscribe from vue to my mercure topic but im still getting 401 errors
Im running my mercure as docker image:
sudo docker run \
...
0
votes
1
answer
219
views
Mercure keeps binding to port 80
I'm using the Mercure hub 0.13, everything works fine on my development machine, but on my test server the hub keeps on trying to bind on port 80, resulting in a error, as nginx is already running on ...
0
votes
1
answer
199
views
How to differentiate the data of one topic or another coming from Mercure hub if the client is suscribed to two topics
I have a a dashboard on a Symony app with two ChartJS graphs, one for temperature data, and the other for pressure data. I need update both on realtime; for that purpose I try to use MercureBundle ...
-2
votes
2
answers
1k
views
Symfony 5.4 - How am i supposed to properly start mercure using symfony [closed]
I installed mercure using the following command as stated in the documentation:
composer require mercure
After that, i'm supposed to start the mercure server and here is the issue: how?
Symfony's ...
0
votes
0
answers
160
views
Mercure - Symfony - Algorithm rsa.sha256
I'm working on
Symfony 5.3
Mercure bundle 0.3.4
php 8.1
I would like to bind my API with my mercure HUB, I use the mercure bundle 0.3.4, and in my mercure.yaml I'm trying to change the algorithm to '...
1
vote
0
answers
327
views
How to configure Mercure bundle to send notifications to web UI on a Symfony application
I'm starting with Mercure hub, but I have some doubts that are stopping me. The idea is add to a Symfony 5.4 web application (its a management web application based on sf 5.4) the classic notification ...
0
votes
0
answers
160
views
How mercure handle multiple hub subscription?
I was wondering how Mercure will handle subscription when multiple instance of a hub are launch with Kubernetes.
Here we can read:
To subscribe to updates, the client opens an HTTPS connection
...
0
votes
2
answers
578
views
Run Mercure on production : 404 no found
I am contacting you because I can't get mercure to work in production.
The binary prebuild runs fine, but when I try to connect to the hub, I get a 404 no found.
Here is the command I run :
sudo ...
1
vote
1
answer
2k
views
Symfony Mercure "Failed to send an update"
I am having an issue sending updates to the Caddy-based Mercure Hub with both the Symfony Mercure\HubInterface and the "pure" PHP example.
When attempting to publish an update (following the ...
0
votes
0
answers
113
views
Symfony/React/Mercure - Determining which topic triggered an event with multiple topic subscriptions
We are using Mercure on a Symfony/React stack and we have multiple topic subscriptions for our apps. Currently, I am having trouble determining which topic triggered an event on the FE. We are using ...
0
votes
2
answers
465
views
Raspbian / Mercure - bind: permission denied
I'm trying to run Mercure on my Raspbian.
First :
I tried with mercure-legacy_0.13.0_Linux_armv6.tar.gz using the following command to run mercure
JWT_KEY='example'; ADDR='localhost:3000'; DEMO='1'; ...
2
votes
2
answers
1k
views
Configuration of Mercure with Symfony 5
I'm trying to code a chat with Symfony 5 and Mercure, but I have some issues with the configuration. I work with Windows 10.
This is the documentation that I followed : https://github.com/dunglas/...
2
votes
0
answers
1k
views
SSL error when trying to connect to local Caddy server
I have setup a Mercure hub from Symfony/api-platform.
Mercure hub is being served via Caddy over SSL (e.g. https://example.com/.well-known/mercure).
Caddy is a dockerized service.
I am trying to build ...
1
vote
1
answer
344
views
Docker - Symfony5/Mercure : Impossible to reach mercure hub
I try with no success to access to Mercure's hub through my browser at this URL :
http://locahost:3000 => ERR_CONNECTION_REFUSED
I use Docker for my development. Here's my docker-compose.yml :
# ...
0
votes
0
answers
423
views
Symfony 5.3, Mercure and Vue -> SSL connect error for "https://localhost:8000/.well-known/mercure"
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 ...
1
vote
1
answer
68
views
Mercure Hub server load - better solution
What is better solution taking into account server load (Mercure Hub)?
Users subscribe for one general topic so that Mercure Pushes information to all of them through this one topic and, based on ...
1
vote
1
answer
953
views
Mercure/Symfony: Authorization Error with JWT Key
I am using mercure from the symfony binary. After setting up a new project via
symfony new mercure
cd mercure
symfony composer req make mercure annotations
symfony console make:controller
symfony ...
1
vote
1
answer
131
views
How to deploy Mercure Binary on heroku?
I am trying to deploy my Mercure server on a Heroku app
I downloaded a Linux version of Mercure and extract it and I added this procfile to it:
web: ADDR=$PORT ./mercure
and I pushed everything using ...
0
votes
0
answers
939
views
Caddy server SSL installed but not working
I have a Caddy config file that I used to run a Caddy server.
The file is as below:
# Learn how to configure the Mercure.rocks Hub on http s://mercure.rocks/docs/hub/config
{
http_port 4133
...
1
vote
0
answers
891
views
mercure symfony and Caddy server not working
I have installed Caddy in my CentOS 7 then I have downloaded the latest mercure that uses Caddy.
I tried to run mercure using the below command:
/usr/bin/caddy run --environ --config Caddyfile.
The ...
0
votes
1
answer
727
views
Mercure with symfony not working with vue
I got a problem with configure mercure under symfony with vue. I'm using mercure hub which is attached in symfony cli. in .env file I changed mercure urls to using http because it caused me error with ...
1
vote
0
answers
105
views
Mercure doesn't update DELETE method when use SoftDeleatable extensions
For a project, I use Api Platform and Mercure. I currently have a problem with the SoftDeleatable extension. Without this extension, when I delete an entity, Mercure receives the DELETE. But if I use ...
1
vote
0
answers
207
views
Issue using Mercure Hub
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 ...
1
vote
0
answers
346
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://...
3
votes
1
answer
1k
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 ...
2
votes
1
answer
738
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 ...
0
votes
0
answers
392
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 ...
1
vote
0
answers
1k
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 ...
3
votes
1
answer
3k
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 ...
0
votes
1
answer
640
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:/...
1
vote
2
answers
481
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", ...
0
votes
1
answer
440
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 ...
2
votes
1
answer
860
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 ...