nodeSolidServer / nodeSolidServer/node-solid-server
Server sends phantom WebSocket pub messages
Personne n'a encore pris cette issue.
- Langage dominant
- JavaScript
- Étoiles
- 1.8k
- Forks
- 308
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Based on the spec (https://github.com/solid/solid-spec/blob/master/api-websockets.md#subscription), client can subscribe and the server will send WebSocket pub messages on CRUD operations. I use this for inbox monitoring - notify user about new messages in his Solid inbox. So when anybody POSTs to his inbox, solid server sends WS pub message to my application, this works fine.
However, there are "phantom" WS pub messages even when there is no user-triggered CRUD operation on the inbox. From the spec, it should be only when POST, PUT, PATCH or, DELETE happens on the source.
Now, this is hard to debug/investigate. But I can reproduce it, using my application https://whyineedtofillusername.github.io/inbox/:
- login using WebID
- send a message to any other WebID (lastly I tried sending messages between https://inbox1.inrupt.net/profile/card#me and https://inbox4.inrupt.net/profile/card#me, using Activity Streams message functionality; one in Chrome and the other user in Firefox)
- the only request the application does is this POST request (copied from Chrome, user Inbox1 sending message to user Inbox4):
POST /inbox/ HTTP/1.1
Host: inbox4.inrupt.net
Connection: keep-alive
Content-Length: 437
sec-ch-ua: "Google Chrome";v="89", "Chromium";v="89", ";Not A Brand";v="99"
Accept: application/json, text/plain, */*
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36
Content-Type: application/ld+json
Origin: https://whyineedtofillusername.github.io
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://whyineedtofillusername.github.io/
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
{..} (json payload)
The request above produces WS message
pub https://inbox1.inrupt.net/inbox/

Now there shouldn't be any reason for this, but it looks like the solid server is doing some CRUD operation on the sender's inbox as well. Is this intentional? When I compare the RDF for https://inbox1.inrupt.net/inbox/ before and after sending the message, there is no change (not even the "terms:modified" has changed). So it doesn't look like there's been any CRUD operation on the source.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par le POST signalé vers la boîte de réception du destinataire et suivez le traitement de publication WebSocket du serveur pour les messages pub qui en résultent. Comparez l’état de la boîte de réception et les chemins de requête de l’expéditeur et du destinataire, puis vérifiez que les notifications ne sont émises que pour la ressource dont l’opération CRUD a changé.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript
- Domaine
- api, backend
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100