Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

TypeError: Cannot read properties of undefined

Featured Replies

Posted

Hello! I recently purchased a Polisy and installed the trial version of ST-Sonos to test it out before purchasing. The node server runs for about a day with no issues and then errors with the following stack trace. Restarting the node server is successful and it works again for about a day until it crashes again in the same manner. 

2022-06-07 14:03:20 error: NS: uncaughtException REPORT THIS!: TypeError: Cannot read properties of undefined (reading 'members')
    at Player.recalculateGroupVolume (/var/polyglot/pg3/ns/00:21:b9:02:28:1f_3/node_modules/sonos-discovery/lib/prototypes/Player/recalculateGroupVolume.js:4:32)
    at NotificationListener.notificationHandler (/var/polyglot/pg3/ns/00:21:b9:02:28:1f_3/node_modules/sonos-discovery/lib/models/Player.js:370:25)
    at NotificationListener.emit (node:events:539:35)
    at /var/polyglot/pg3/ns/00:21:b9:02:28:1f_3/node_modules/sonos-discovery/lib/NotificationListener.js:125:17
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2022-06-07 14:03:20 error: POLY: uncaughtException: Cannot read properties of undefined (reading 'members')
TypeError: Cannot read properties of undefined (reading 'members')
    at Player.recalculateGroupVolume (/var/polyglot/pg3/ns/00:21:b9:02:28:1f_3/node_modules/sonos-discovery/lib/prototypes/Player/recalculateGroupVolume.js:4:32)
    at NotificationListener.notificationHandler (/var/polyglot/pg3/ns/00:21:b9:02:28:1f_3/node_modules/sonos-discovery/lib/models/Player.js:370:25)
    at NotificationListener.emit (node:events:539:35)
    at /var/polyglot/pg3/ns/00:21:b9:02:28:1f_3/node_modules/sonos-discovery/lib/NotificationListener.js:125:17
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2022-06-07 14:03:20 error: NS: uncaughtException: Cannot read properties of undefined (reading 'members')
TypeError: Cannot read properties of undefined (reading 'members')
    at Player.recalculateGroupVolume (/var/polyglot/pg3/ns/00:21:b9:02:28:1f_3/node_modules/sonos-discovery/lib/prototypes/Player/recalculateGroupVolume.js:4:32)
    at NotificationListener.notificationHandler (/var/polyglot/pg3/ns/00:21:b9:02:28:1f_3/node_modules/sonos-discovery/lib/models/Player.js:370:25)
    at NotificationListener.emit (node:events:539:35)
    at /var/polyglot/pg3/ns/00:21:b9:02:28:1f_3/node_modules/sonos-discovery/lib/NotificationListener.js:125:17
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

 

Let me know if there is anything else necessary to further troubleshoot. I would like to get this functional so I can test before buying. Thank you!

  • 3 weeks later...
  • Author

So I keep restarting the node server and it keeps crashing with the same error. I enabled debug logging on the last cycle and it appears it fails right after communicating regarding my Sonos Roam. Restarting and trying again to see if it is repeating this pattern.

2022-06-27 14:06:11 debug: NS: Volume Change: {"uuid":"RINCON_38420B33FC4601400","previousVolume":53,"newVolume":53,"roomName":"Sonos Roam"}
2022-06-27 14:06:11 debug: NS: UUID: RINCON_38420B33FC4601400 - Room: Sonos Roam - New Volume: 53
2022-06-27 14:06:11 debug: NS: Message Sent: {
  set: [
    { address: 'b33fc46', driver: 'GV0', value: '53', uom: 51 },
    [length]: 1
  ]
}
2022-06-27 14:06:11 debug: POLY: _sendMessage: sending 
      {"set":[{"address":"b33fc46","driver":"GV0","value":"53","uom":51}]} to udi/pg3/ns/status/00:21:b9:02:28:1f_3
2022-06-27 14:06:11 error: NS: uncaughtException REPORT THIS!: TypeError: Cannot read properties of undefined (reading 'members')
    at Player.recalculateGroupVolume (/var/polyglot/pg3/ns/00:21:b9:02:28:1f_3/node_modules/sonos-discovery/lib/prototypes/Player/recalculateGroupVolume.js:4:32)
...

@simplextech any insights or suggestions for debugging? I'd really like stabilize this NS so I can actually buy it in confidence. Happy to provide the whole debug log for your review.

 

Thank you!

7 hours ago, mbeauchemin said:

any insights or suggestions for debugging?

That is interesting.  Please do send me a private message and attach the log file to the message.  Do you have any other Sonos players besides the Roam? 

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.