GSConnect / gnome-shell-extension-gsconnect

KDE Connect implementation for GNOME
GNU General Public License v2.0
3.15k stars 255 forks source link

"undefined" in Notification on Ubuntu 21.04 #1108

Open Bungeefan opened 3 years ago

Bungeefan commented 3 years ago

ATTENTION: GSConnect only supports the latest, stable version of GNOME. We are no longer accepting bug reports for previous versions.

Describe the bug

I know this isn't the latest GNOME version, but the one used by the newest Ubuntu release (21.04), maybe it also applies to the newer version.

Whenever I get a notification through KDE-Connect on Snapchat "undefined" is appended. Example as an image attached! I could only reproduce it with Snapchat, I looked at the notification log of Android and the only difference I could spot was that "android.text" was null. Tested: Snapchat, Telegram, Signal

Steps To Reproduce:

  1. Enable Snapchat Notifications
  2. Get a snap from someone
  3. See the notification on gnome
  4. See error

Expected behavior

The same notification without the "undefined".

Screenshots

KDE-Connect_undefined

Support Log

GSConnect: 45 (user)
GJS:       16702
Session:   x11
OS:        Ubuntu 21.04
--------------------------------------------------------------------------------
-- Journal begins at Fri 2021-04-23 03:06:54 CEST, ends at Wed 2021-04-28 21:28:28 CEST. --
Apr 28 21:27:00 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:01 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:02 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:03 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:04 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:05 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:06 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:07 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:08 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:09 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:10 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:11 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:12 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:13 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:14 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:15 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:16 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:17 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:18 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:19 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:20 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:21 steam.desktop[9779]: Fossilize INFO: Setting autogroup scheduling.
Apr 28 21:27:21 steam.desktop[9882]: Fossilize INFO: Setting autogroup scheduling.
Apr 28 21:27:21 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:22 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:23 steam.desktop[9985]: Fossilize INFO: Setting autogroup scheduling.
Apr 28 21:27:23 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:24 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:25 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:26 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:27 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:28 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:29 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:30 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:31 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:32 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:33 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:34 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:35 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:36 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:37 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:38 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:39 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:40 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:41 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:42 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:43 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:44 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:45 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:46 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:47 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:49 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:50 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:51 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:52 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:53 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:53 steam.desktop[10101]: Fossilize INFO: Setting autogroup scheduling.
Apr 28 21:27:54 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:55 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:56 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:57 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:58 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:27:59 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:00 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:00 steam.desktop[10204]: Fossilize INFO: Setting autogroup scheduling.
Apr 28 21:28:01 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:02 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:03 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:04 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:05 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:06 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:07 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:08 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:09 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:10 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:11 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:12 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:13 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:14 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:15 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:16 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:17 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:18 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:19 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:20 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:21 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:22 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:23 org.gnome.Shell.Extensions.GSConnect[3108]: [/service/device.js:_readLoop:338]: OnePlus 6: {
                                                              "id": 1619638104469,
                                                              "type": "kdeconnect.notification",
                                                              "body": {
                                                                "id": "0|com.snapchat.android|1431325696|null|10113",
                                                                "isCancel": true
                                                              }
                                                            }
Apr 28 21:28:23 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:23 org.gnome.Shell.Extensions.GSConnect[3108]: [/service/device.js:_readLoop:338]: OnePlus 6: {
                                                              "id": 1619638104648,
                                                              "type": "kdeconnect.notification",
                                                              "body": {
                                                                "payloadHash": "d194a2095c0c3dca0e7840ec583dfef4",
                                                                "id": "0|com.snapchat.android|-344973985|null|10113",
                                                                "onlyOnce": false,
                                                                "isClearable": true,
                                                                "appName": "Snapchat",
                                                                "time": "1619638104522",
                                                                "ticker": "von Simon ******",
                                                                "title": "von Simon ******"
                                                              },
                                                              "payloadSize": 16825,
                                                              "payloadTransferInfo": {
                                                                "port": 1744
                                                              }
                                                            }
Apr 28 21:28:23 org.gnome.Shell.Extensions.GSConnect[3108]: [/service/backends/lan.js:_onIdentity:343]: {
                                                              "id": 1619638104749,
                                                              "type": "kdeconnect.identity",
                                                              "body": {
                                                                "deviceId": "ae8fca9ae40ab9ae",
                                                                "deviceName": "OnePlus 6",
                                                                "protocolVersion": 7,
                                                                "deviceType": "phone",
                                                                "incomingCapabilities": [
                                                                  "kdeconnect.telephony.request_mute",
                                                                  "kdeconnect.notification",
                                                                  "kdeconnect.ping",
                                                                  "kdeconnect.notification.reply",
                                                                  "kdeconnect.notification.action",
                                                                  "kdeconnect.share.request",
                                                                  "kdeconnect.bigscreen.stt",
                                                                  "kdeconnect.clipboard.connect",
                                                                  "kdeconnect.runcommand",
                                                                  "kdeconnect.contacts.request_all_uids_timestamps",
                                                                  "kdeconnect.sms.request_conversations",
                                                                  "kdeconnect.telephony.request",
                                                                  "kdeconnect.mpris",
                                                                  "kdeconnect.sms.request_conversation",
                                                                  "kdeconnect.findmyphone.request",
                                                                  "kdeconnect.sms.request_attachment",
                                                                  "kdeconnect.systemvolume",
                                                                  "kdeconnect.mousepad.keyboardstate",
                                                                  "kdeconnect.sftp.request",
                                                                  "kdeconnect.share.request.update",
                                                                  "kdeconnect.notification.request",
                                                                  "kdeconnect.mousepad.request",
                                                                  "kdeconnect.photo.request",
                                                                  "kdeconnect.sms.request",
                                                                  "kdeconnect.contacts.request_vcards_by_uid",
                                                                  "kdeconnect.mpris.request",
                                                                  "kdeconnect.battery.request",
                                                                  "kdeconnect.clipboard"
                                                                ],
                                                                "outgoingCapabilities": [
                                                                  "kdeconnect.sms.messages",
                                                                  "kdeconnect.telephony",
                                                                  "kdeconnect.mpris",
                                                                  "kdeconnect.notification",
                                                                  "kdeconnect.contacts.response_uids_timestamps",
                                                                  "kdeconnect.findmyphone.request",
                                                                  "kdeconnect.ping",
                                                                  "kdeconnect.mousepad.keyboardstate",
                                                                  "kdeconnect.share.request",
                                                                  "kdeconnect.bigscreen.stt",
                                                                  "kdeconnect.contacts.response_vcards",
                                                                  "kdeconnect.notification.request",
                                                                  "kdeconnect.mousepad.echo",
                                                                  "kdeconnect.clipboard.connect",
                                                                  "kdeconnect.mousepad.request",
                                                                  "kdeconnect.presenter",
                                                                  "kdeconnect.sftp",
                                                                  "kdeconnect.photo",
                                                                  "kdeconnect.runcommand.request",
                                                                  "kdeconnect.mpris.request",
                                                                  "kdeconnect.sms.attachment_file",
                                                                  "kdeconnect.systemvolume.request",
                                                                  "kdeconnect.battery",
                                                                  "kdeconnect.clipboard"
                                                                ],
                                                                "tcpPort": 1716,
                                                                "tcpHost": "192.168.0.247"
                                                              }
                                                            }
Apr 28 21:28:24 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:25 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:26 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:27 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps
Apr 28 21:28:28 gnome-shell[9570]: Sandbox: attempt to open unexpected file /proc/self/maps

System Details (please complete the following information):

GSConnect environment (if applicable):

Additional Notes:

GSConnect freshly installed after I used pure KDE-Connect for a while (where this issue didn't exist)

andyholmes commented 3 years ago

ticker is deprecated and there should be both title & text pair, but it looks like some notifications only have a title field.

I guess the best thing to do here if text is missing is to map appName to the notification title and title to the notification body. Unless appName and title are the same, in which case there should only be a title and the body nulled out.

Bungeefan commented 3 years ago

I just wanted to note that there are also notifications on Android which only use text without any title! Therefore, it's displayed as

undefined: Message Text

so maybe just skip the title in this case.