okTurtles / group-income

A decentralized and private (end-to-end encrypted) financial safety net for you and your friends.
https://groupincome.org
GNU Affero General Public License v3.0
331 stars 44 forks source link

Error in sideEffect related to sending a poll in a DM #1953

Closed taoeffect closed 5 months ago

taoeffect commented 6 months ago

Problem

Screenshot 2024-04-19 at 9 04 09 AM

@dotmacro sent me a DM with the poll below, and I think that's what triggered triggered the error above.

Screenshot 2024-04-19 at 9 11 02 AM

Here's the corresponding error log:

{
  "timestamp": "2024-04-19T16:03:10.260Z",
  "type": "error",
  "msg": [
    "[chelonia] ERROR 'TypeError' in sideEffect for <op_ae|z9brRu3VMmmxg1de3jjiwcjUaQDALmaBUJ2QXU8GYS4vEcKqebGx of z9brRu3VUgFkg1eAfirGJ454n49S9sDgBDRx3EDAzPHXzUMSjaXj>: Cannot read properties of undefined (reading 'split')",
    {
      "name": "TypeError",
      "message": "Cannot read properties of undefined (reading 'split')",
      "stack": "TypeError: Cannot read properties of undefined (reading 'split')\n    at swapUserIDForUsername (eval at chelonia/private/loadManifest (https://xxx.xxx.xxx/assets/js/chunk-M5ENVJQB-cached.js:1:19965), <anonymous>:7074:17)\n    at messageReceivePostEffect (eval at chelonia/private/loadManifest (https://xxx.xxx.xxx/assets/js/chunk-M5ENVJQB-cached.js:1:19965), <anonymous>:7198:13)\n    at Object.sideEffect (eval at chelonia/private/loadManifest (https://xxx.xxx.xxx/assets/js/chunk-M5ENVJQB-cached.js:1:19965), <anonymous>:7475:11)\n    at z9brRu3VQeSP1LaQiXp7p55UkU4rfrSBzkYeEyDQ4daQYyoQcSsg/gi.contracts/chatroom/addMessage/sideEffect (https://xxx.xxx.xxx/assets/js/chunk-M5ENVJQB-cached.js:22:22486)\n    at u (https://xxx.xxx.xxx/assets/js/chunk-SSANYCJJ-cached.js:1:222)\n    at l (https://xxx.xxx.xxx/assets/js/chunk-M5ENVJQB-cached.js:19:27723)\n    at Object.processSideEffects (https://xxx.xxx.xxx/assets/js/chunk-M5ENVJQB-cached.js:19:27802)\n    at chelonia/private/in/handleEvent (https://xxx.xxx.xxx/assets/js/chunk-M5ENVJQB-cached.js:19:25051)\n    at async https://xxx.xxx.xxx/assets/js/chunk-M5ENVJQB-cached.js:19:13995\n    at async okTurtles.eventQueue/queueEvent (https://xxx.xxx.xxx/assets/js/chunk-M5ENVJQB-cached.js:1:2532)"
    },
    {
      "message": "{\"_signedData\":[\"[\\\"z2Drjgb9hxXGP7dt5AtgrviEuorDiJWvvyNStfTfSdUn29vPCje\\\",\\\"8Llpy+slYCKqOgv4rknr3/KTwlLhlIK91Oqlu26VUQSZAzksM1mkIB9q3wbwAQb+85RC6JTP06pZiTSqakN7GDDdwrnbC2tyDypVetYPE9UxMty15xMAKX1zrU2Tbx/GW/+P7rHqlb3nYwEawGXnYf+fNhXel79GWC9et4PQyuLc2hgBOfqk3/t2xSqFCj+OQ/SOSaZxH22kTon1GWlmurMJZbdwd2Ul5VM1nJDYGRe/V6Kh0Ses/FLeb++ZKLcbFECwjvB5LE3n2nH9LbpIvpIJwE/zE8S2VfW0U9iAeqpQv31E2DPF5BloUztgk6/vohmQUnq+OxwWVeVLYjoauOhIDQVreVgm7wnGneCvZVbdNVHkFcBJDFRF8PSgdT/6eucfXhV9W6iKWa9dqtSB/lIe9vJ7ClDnbJWMPp+OELJNpCb30fsQqy01aQqP2YhVDUqhVclspNzoPMbUBS7uYHgiR7xXqaaaZINcIpL2csSNMY5j9fZw72c6+Q8u2Iag5kjGM+p9wRzmDV59GVlfPy3hbgB/90PpMZaZXVzsxaj8rn1eE/rskZgGVwBsQmWNOJrQFSCABt9HALftNXy0Y9Pvouo40EUAuI90Vy37C1CIAJF1VDVSyn/MvaRlNw5zNECW7KP7j9Va8pVD6jKrtFJzyiKZNgYshCRmdaJTTt5SbCjcGb5PH8SJDCnGI3MA1diIz+S/v2xjifEhIvnoQMsTZDv8M+QlGe1CQf4SYlrglyE//aizlvzULs5I3GaE6ZU53KzHmdrFN6jj1Dt/B5znNTh/C1DhU0TJ5SB+mzJciFt0FgV2YAxYNJb7zJwgDWfXxl9cVUmoOswgRtT2suM0qUsvHcns0LBd15VVVxlanChnaVsCPM3AjX+ergpLNHJmfSLU9CsmzjxLVq0mwku9zNdezs5rXpKeDfxzMyV+CIeuf29gE8Air0dOfkbgwDV5mtZCfZ+7t8tmvhPXMb4s4oGHYkpDJ0LlqNkTMfcqjFAqp568f1Pj8w3u64Xi+p+7T8COCDfVP9YCQD0Mlrf3X5TohvTbMJwN7DRN6+gTkTDzZezEFQ==\\\"]\",\"z2DrjgbJf8CxGUDyxr1RPNM5dHHihbvZ5HAPHFmU5wFiAZuSJ3n\",\"VfveWKcoDrpPA2/yNoH9vzD5ABk5MKur6iIK2qfIAn0PCPY7OBsj+3/g+MGlaHYplvfdFVnncfq52L+ZlOLKBw==\"],\"head\":\"{\\\"version\\\":\\\"1.0.0\\\",\\\"previousHEAD\\\":\\\"z9brRu3VRgcQe9iGi5db6VeXm7cJCAsS42DxNd1stZYg79PFSa4H\\\",\\\"height\\\":8,\\\"contractID\\\":\\\"z9brRu3VUgFkg1eAfirGJ454n49S9sDgBDRx3EDAzPHXzUMSjaXj\\\",\\\"op\\\":\\\"ae\\\",\\\"manifest\\\":\\\"z9brRu3VQeSP1LaQiXp7p55UkU4rfrSBzkYeEyDQ4daQYyoQcSsg\\\"}\"}"
    }
  ]
}

NOTE: Interestingly enough, I only got this error while I was logged in on Desktop to the app. I did not see it later in the mobile PWA version of the app.

Solution

Find and fix the problem!

dotmacro commented 6 months ago

On my side, I don't see any votes at all, only a "Jump to poll" message. image

taoeffect commented 6 months ago

On my side, I don't see any votes at all, only a "Jump to poll" message.

Thanks for reporting that! Do you see any related errors in the application logs? Please save them and check those soon as they are rotated every 2000 lines.

taoeffect commented 6 months ago

It's also worth noting, although I'm not sure whether it's related to this or not, that in the error log @dotmacro sent me, she had this undefined error in getDisplayName:

{
  "timestamp": "2024-04-17T01:34:32.195Z",
  "type": "error",
  "msg": [
    "uncaught Vue error in render:",
    {
      "name": "TypeError",
      "message": "o is undefined",
      "stack": "getDisplayName@https://xxx.xxx.xxx/assets/js/GroupChat-FTS7ACEK-cached.js:84:767\nho/<@https://xxx.xxx.xxx/assets/js/GroupChat-FTS7ACEK-cached.js:84:2062\nru@https://xxx.xxx.xxx/assets/js/chunk-BDTA7G6U-cached.js:1:11702\nho@https://xxx.xxx.xxx/assets/js/GroupChat-FTS7ACEK-cached.js:84:1844\nEu/e.prototype._render@https://xxx.xxx.xxx/assets/js/chunk-BDTA7G6U-cached.js:1:17904\nn@https://xxx.xxx.xxx/assets/js/chunk-BDTA7G6U-cached.js:1:22030\nFr</$e.prototype.get@https://xxx.xxx.xxx/assets/js/chunk-BDTA7G6U-cached.js:3:7739\nFr</$e.prototype.run@https://xxx.xxx.xxx/assets/js/chunk-BDTA7G6U-cached.js:3:8472\nMu@https://xxx.xxx.xxx/assets/js/chunk-BDTA7G6U-cached.js:1:23624\nni/<@https://xxx.xxx.xxx/assets/js/chunk-BDTA7G6U-cached.js:1:7756\nir@https://xxx.xxx.xxx/assets/js/chunk-BDTA7G6U-cached.js:1:7697\n"
    }
  ]
}
taoeffect commented 6 months ago

Possibly related to this I noticed an issue where in Firefox it showed a red unread message indicator on both the group icon in the group switcher, and the group chat icon in the navigation menu, but no red numbered icons on the right:

Screenshot 2024-04-19 at 4 56 23 PM

After clicking on the DM with andrea, the red unread indicators went away.