nextcloud / nextcloud/richdocuments

Mention notification request fails with 404

Open
#4,418 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs info
Dominant language
JavaScript
Stars
453
Forks
147
Avg merge
14h 54m
Merged PRs (30d)
83

Description

Describe the bug
Mention notification request fails with 404

To Reproduce
Steps to reproduce the behavior:

  1. Share Document between two users
  2. mention other user in the document
  3. Check console

Image

Expected behavior
Mention notification in notification center

Screenshots

Image

Request

{"mention":"alice"}

Response

{"message":"Notification already present"}
  • Response says notification already present but I don't see notification in alice's account

Server details

Nextcloud version: latest master

Version of the richdocuments app: latest main

Version of Collabora Online: latest master

Browser log
21:16:29.125 Uncaught (in promise) 
Object { stack: "Y@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:631251\nLe@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:642671\nf@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:647347\nEventHandlerNonNull*715/We</<@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:647606\n715/We<@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:646935\nvt@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:654052\n_request@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:656879\nrequest@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:655406\n715/</t/<@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:657327\n715/a/<@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:625550\nuiMention@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:1865049\npostMessageHandler@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:1872920\ne.prototype.handlePostMessage/<@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:1841416\ne.prototype.handlePostMessage@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:1841272\ne/<@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:1840247\nEventListener.handleEvent*e@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:1840205\nmounted@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:1867918\nZt@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:26639\nbt@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:34555\ninsert@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:37998\nj@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:58724\nKg/<@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:60077\nbh/e.prototype._update@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:32129\nn@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:32899\ne.prototype.get@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:29101\ne.prototype.run@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:29838\n_h@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:35116\nqr/<@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:27659\nDs@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:27071\npromise callback*Hn@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:27159\nqr@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:27721\ncu@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:35628\ne.prototype.update@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:29774\ne.prototype.notify@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:9524\nset@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:11412\nii/ua.set@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:42532\nopenFileInfo@http://nextcloud.local/apps-extra/viewer/js/viewer-main.mjs:8:13980\nopenFile@http://nextcloud.local/apps-extra/viewer/js/viewer-main.mjs:8:13325\nasync*file@http://nextcloud.local/apps-extra/viewer/js/viewer-main.mjs:8:10283\nZt@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:26626\ne.prototype.run@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:29986\n_h@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:35116\nqr/<@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:27659\n", message: "Request failed with status code 404", name: "AxiosError", code: "ERR_BAD_REQUEST", config: {…}, request: XMLHttpRequest, response: {…}, status: 404 }
​
code: "ERR_BAD_REQUEST"
​
config: Object { timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", … }
​
message: "Request failed with status code 404"
​
name: "AxiosError"
​
request: XMLHttpRequest { readyState: 4, timeout: 0, withCredentials: false, … }
​
response: Object { data: {…}, status: 404, statusText: "Not Found", … }
​
stack: "Y@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:631251\nLe@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:642671\nf@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:647347\nEventHandlerNonNull*715/We</<@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:647606\n715/We<@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:646935\nvt@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:654052\n_request@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:656879\nrequest@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:655406\n715/</t/<@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:657327\n715/a/<@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:625550\nuiMention@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:1865049\npostMessageHandler@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:1872920\ne.prototype.handlePostMessage/<@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:1841416\ne.prototype.handlePostMessage@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:1841272\ne/<@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:1840247\nEventListener.handleEvent*e@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:1840205\nmounted@http://nextcloud.local/apps-extra/richdocuments/js/richdocuments-viewer.js:2:1867918\nZt@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:26639\nbt@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:34555\ninsert@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:37998\nj@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:58724\nKg/<@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:60077\nbh/e.prototype._update@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:32129\nn@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:32899\ne.prototype.get@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:29101\ne.prototype.run@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:29838\n_h@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:35116\nqr/<@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:27659\nDs@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:27071\npromise callback*Hn@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:27159\nqr@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:27721\ncu@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:35628\ne.prototype.update@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:29774\ne.prototype.notify@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:9524\nset@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:11412\nii/ua.set@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:42532\nopenFileInfo@http://nextcloud.local/apps-extra/viewer/js/viewer-main.mjs:8:13980\nopenFile@http://nextcloud.local/apps-extra/viewer/js/viewer-main.mjs:8:13325\nasync*file@http://nextcloud.local/apps-extra/viewer/js/viewer-main.mjs:8:10283\nZt@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:26626\ne.prototype.run@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:29986\n_h@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:35116\nqr/<@http://nextcloud.local/apps-extra/viewer/js/logger-CYBBkF-8.chunk.mjs:2:27659\n"
​
status: 404
​
<prototype>: Object { constructor: Y(e, t, n, r, a), toJSON: toJSON(), stack: "", … }
uiMention.js:39:16

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at uiMention.js:39:16 and reproduce the mention flow by sharing a document, mentioning another user, and checking the request and response. Trace the request behind the 404 and the “Notification already present” response; done means the mentioned user can see the notification in the notification center without the failed request.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.