Rocket.chat.electron: Desktop notifications are sent only sporadically

Created on 15 Apr 2020  路  8Comments  路  Source: RocketChat/Rocket.Chat.Electron

My Setup

  • Operating System: macOS 10.15.4
  • App Version: 2.17.9
  • Installation type: DMG

  • [X] I have tested with the latest version
  • [X] I can simulate the issue easily

Description

Since a few weeks, desktop notifications are not realiable anymore on my 3.1.1 (updated today, before it was 3.0.4 which was affected as well). instance with the Electron client (works fine in browser). If I use the "Test Desktop Notifications" button in the profile, browser console shows:

Bildschirmfoto 2020-04-15 um 14 29 58

Plaintext version

notifications.js:77 Uncaught (in promise) TypeError: Only absolute URLs are supported
    at getNodeRequestOptions (/Applications/Rocket.Chat.New.app/Contents/Resources/app.asar/node_modules/electron-fetch/lib/index.js:1220)
    at /Applications/Rocket.Chat.New.app/Contents/Resources/app.asar/node_modules/electron-fetch/lib/index.js:1293
    at new Promise (<anonymous>)
    at /Applications/Rocket.Chat.New.app/Contents/Resources/app.asar/node_modules/electron-fetch/lib/index.js:1290
(anonymous) @ remote.js:265
metaToPlainObject @ remote.js:265
error @ remote.js:219
metaToValue @ remote.js:225
(anonymous) @ remote.js:216
array @ remote.js:216
metaToValue @ remote.js:225
(anonymous) @ remote.js:286
(anonymous) @ remote.js:276
emit @ events.js:203
EventEmitter.emit @ domain.js:476
onMessage @ init.ts:50
async function (async)
create @ notifications.js:59
Notification @ notifications.js:52
(anonymous) @ 2c035fa7a13a201fc64b2125b64ec902d155340f.js?meteor_js_resource=true:973
(anonymous) @ 2c035fa7a13a201fc64b2125b64ec902d155340f.js?meteor_js_resource=true:1
Promise.then (async)
n.then @ 2c035fa7a13a201fc64b2125b64ec902d155340f.js?meteor_js_resource=true:653
notify @ 2c035fa7a13a201fc64b2125b64ec902d155340f.js?meteor_js_resource=true:973
click .js-test-notifications @ 2c035fa7a13a201fc64b2125b64ec902d155340f.js?meteor_js_resource=true:973
(anonymous) @ 2c035fa7a13a201fc64b2125b64ec902d155340f.js?meteor_js_resource=true:750
t._withTemplateInstanceFunc @ 2c035fa7a13a201fc64b2125b64ec902d155340f.js?meteor_js_resource=true:750
(anonymous) @ 2c035fa7a13a201fc64b2125b64ec902d155340f.js?meteor_js_resource=true:750
(anonymous) @ 2c035fa7a13a201fc64b2125b64ec902d155340f.js?meteor_js_resource=true:750
h._withCurrentView @ 2c035fa7a13a201fc64b2125b64ec902d155340f.js?meteor_js_resource=true:750
(anonymous) @ 2c035fa7a13a201fc64b2125b64ec902d155340f.js?meteor_js_resource=true:750
delegatedHandler @ 2c035fa7a13a201fc64b2125b64ec902d155340f.js?meteor_js_resource=true:750
dispatch @ 2c035fa7a13a201fc64b2125b64ec902d155340f.js?meteor_js_resource=true:517
g.handle @ 2c035fa7a13a201fc64b2125b64ec902d155340f.js?meteor_js_resource=true:517

Current Behavior

Desktop notifications not realiable

Expected Behavior

Desktop notifications should be sent whenever they get triggered.

notifications bug

Most helpful comment

On Ubuntu 19.10 and both 2.16 and 2.17.
Gnome 3.34.2

I don't get notifications or sounds at all. Very frustrating.

Also the selected sound for alerts get's reset to blank every time I reset the app.

All 8 comments

On Ubuntu 19.10 and both 2.16 and 2.17.
Gnome 3.34.2

I don't get notifications or sounds at all. Very frustrating.

Also the selected sound for alerts get's reset to blank every time I reset the app.

I'm getting the same errors on Windows so it seems to be a bug in the client behaviour.

Platform Windows 10.
Client Version: 2.17.7

Same on Windows 10/Client 2.17.9

https://github.com/RocketChat/Rocket.Chat.Electron/blob/3596a26ffb9ddd1ce8ea4fd466372c97ebbefe85/src/preload/notifications.js#L57-L60

Just a guess, but it is referencing a server icon (i.e. default Rocket.Chat icon) on the Test Desktop Notification (which utilizes electron-fetch), and failing because a local path is being returned?

edit: #1509

image

Same problem here.

Can you guys please try version 2.17.11 which was just released?

The PR https://github.com/RocketChat/Rocket.Chat.Electron/pull/1662 should fix this problem. 馃槉

Still investigating: seems to work for some users and for some not.

Does this require a server update as well or only the client?

Is it possible all clients talking with each other need to be updated? Eg. the person sending a text to me isn't updated yet while I am and I don't get the notification?

Edit: Uppon further testing I conclude:

  • desktop notifications are indeed fixed
  • there's another bug with desktop notifications sound not being played at all for all users besides one on the server

Closed by #1662

Was this page helpful?
0 / 5 - 0 ratings