Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking output control throws error in JS console #806

Closed
4 of 10 tasks
novwhisky opened this issue Feb 7, 2022 · 5 comments
Closed
4 of 10 tasks

Clicking output control throws error in JS console #806

novwhisky opened this issue Feb 7, 2022 · 5 comments
Labels

Comments

@novwhisky
Copy link

Iris version

3.61.1

Operating system(s) affected

  • Windows
  • MacOS
  • iOS
  • Android
  • Linux
  • Other

Browser(s) affected

  • Firefox
  • Chrome
  • Edge
  • Other

What happened?

After upgrading to snapserver 0.26.0 from a mistaken Debian repo install, clicking on the outputs speaker icon causes the Iris UI to go blank and a TypeError to be thrown in the web console when Snapcast is enabled. Refreshing the page will bring the controls back, but AFAICT there's no way to configure outputs as had worked previously. Is this a JSON RPC version issue?

Here's a screen recording of the error

Iris-Snapcast-error.mov

Logs

TypeError: Cannot read properties of undefined (reading 'scheme')
    at A (app.min.js?v=1643875123:79:192392)
    at Wa (app.min.js?v=1643875123:95:57930)
    at bs (app.min.js?v=1643875123:95:104169)
    at uc (app.min.js?v=1643875123:95:96717)
    at sc (app.min.js?v=1643875123:95:96642)
    at Zs (app.min.js?v=1643875123:95:93672)
    at app.min.js?v=1643875123:95:45314
    at t.unstable_runWithPriority (app.min.js?v=1643875123:103:3844)
    at Hi (app.min.js?v=1643875123:95:45023)
    at Gi (app.min.js?v=1643875123:95:45259)
@novwhisky novwhisky added the bug label Feb 7, 2022
@bendschs
Copy link

bendschs commented Feb 8, 2022

i get a black screen when i tap on outputs on latest IOS in safari.

@novwhisky
Copy link
Author

novwhisky commented Feb 9, 2022

I was able to go deeper into debugging Iris by going to "Settings", clicking "<> Debug" in the top-right corner, enabling "Test mode", checking "Log actions" and reloading Iris. That turned on verbose console output and allowed me to better inspect the React/Redux componentry.

Looks like this was an issue with orphaned snapcast client entries, possibly from prior to upgrading snapserver. The web console will log a persist/REHYDRATE action object with key: 'snapcast'. If you expand payload.clients there's probably a lot of random hex strings where connected: false. I noted down a list of all these IDs and used the JSON-RPC to delete each them one-by-one, i.e.

$ telnet localhost 1705

> {"id":2,"jsonrpc":"2.0","method":"Server.DeleteClient","params":{"id":"target-id-to-delete-1"}}
> {"id":2,"jsonrpc":"2.0","method":"Server.DeleteClient","params":{"id":"target-id-to-delete-2"}}
> {"id":2,"jsonrpc":"2.0","method":"Server.DeleteClient","params":{"id":"target-id-to-delete-3"}}

Successful requests will respond with a large client object. I also added a meaningful --hostID name argument to all of my snapclients in /etc/default/snapclient (NOT the snapcast server) and restarted so I can distingush them more easily.

Reloading Iris after that I can now control Snapcast by clicking the speaker icon again. For @jaedb I would recommend using componentDidCatch around the OutputControl component to prevent the entire app from unmounting in scenarios like this. Also a way to delete groups from web client UI would be helpful.

@jaedb
Copy link
Owner

jaedb commented Feb 13, 2022

@novwhisky awesome sleuthing - nice work. It would be nice to more gracefully handle historical clients, but your suggestion for a ErrorBoundary is a great idea in the meantime.

@bendschs
Copy link

would also be nice, to add a button for cleaning up old disconnected clients.

@novwhisky: thx, i was able to manually clean my list, now the blackscreen-error when tapping devices on ios and macos is gone.

cheers
bendsch

@novwhisky
Copy link
Author

Thanks @jaedb 😁 . I see you have error boundaries already implemented elsewhere, are you interested in me opening a PR for this?

jojo141185 pushed a commit to seppi91/Iris that referenced this issue Mar 9, 2022
jojo141185 pushed a commit to seppi91/Iris that referenced this issue Mar 9, 2022
jojo141185 pushed a commit to seppi91/Iris that referenced this issue Mar 9, 2022
* Logging when applying preconfiguration

* Exposing snapcast_ssl to config

* Adding loading message to handle load issues

* Refactoring App to functional component, to run pre-ready actions (preconfiguration, etc)

* Removing surplus props

* Update entrypoint.sh

* Update entrypoint.sh

* Update french translation

* Remove unneeded translations

* Update french translation (part 2)

* Removing animation from Parallax, potential (but unlikely) performance kick, jaedb#767

* Using album_type for filtering type, fixes jaedb#788

* Restructuring and functional component-ifying

* Adding verify_certificates config to disable cert validation for internal certs, fixes jaedb#778

* Constructor, not method call

* Removing additional backends, now that they can be added using PIP_PACKAGES env var

* Lint fixing double-space

* Example of additional pip packages via environment vars

* Actual test for base App (shallow render only, for now)

* Housekeeping

* Upgrading to more functional components

* useHistory

* Ditching load_queue flags, instead using simple loading prop on item itself (less capable but greater performance and predictability) and fixes jaedb#774

* Nesting Switches and subviews

* All modals using dedicated /modal URL for routing

* Tracklist 'source' to contain all the meta we need for queue (avoids unnecessary remote lookups)

* Radio added_from stores seeds, rather than building concatenated URI

* Buildout

* formatSimpleObject as our source; updating context menus

* More formatSimpleObjects

* Correctly fetching type (may need to split source vs items)

* Rebuilding context menu items (WIP)

* Context consistency, formatContext, context playlist submenu

* More context menu items; Callbacks for love/library toggles

* Slim progress bar for mobile; production buildout

* Refactoring selection, now TrackList state-managed

* Adding enqueuing and shuffle-add; Correctly adding 'from' for playlist and album context menu actions'

* Tracks context detect common provider; useTimer hook for state-accessible intervals/timers

* Usin vanilla HTML drag

* Update nl.yaml

Donkder to Donker

* Hooking dropzones

* React DnD as provider working pretty well, still WIP

* Context menu on queue 'Play next' just moves tracks; Starting touch-support for dragging

* Adding touch backend, works awesome, viable candidate as primary backend

* Both touch and HTML5 draggers depending on device, prevents nasty mouse experience

* Removing dragger; Fixing play_next by upgrading action payload to object - easier to read

* Disable dragability fully unless can_sort, prevents impossible scrolling on touch devices

* Using mopidy-spotify from apt so it manages all system deps, fixes jaedb#797

* Custom context menu provides its own components

* Enqueue full album/artist/playlist working (but unloaded tracks, not yet); Fixing kiosk playback position

* Drag and drop for grid items, need better support for ref objects (eg playlist with no tracks loaded)

* Proper checks for snapcast_enabled (and spotify_enabled) before adding event hooks; fixes jaedb#790

* Drag and drop ready to go; Context menu not perfect, but better than current

* Use full playlist as context when fetching its tracks, for future callbacks

* Buildout

* Standard import for state; Updating GridItem which needs support for useDrag hook (render only, not actual dnd UX tests)

* Removing Array test, failing since upgrading to Functional component, well, coz it now returns a function

* Buildout 3.61.0

* Bump nanoid from 3.1.23 to 3.2.0

Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.23 to 3.2.0.
- [Release notes](https://github.com/ai/nanoid/releases)
- [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md)
- [Commits](ai/nanoid@3.1.23...3.2.0)

---
updated-dependencies:
- dependency-name: nanoid
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump path-parse from 1.0.6 to 1.0.7

Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump follow-redirects from 1.11.0 to 1.14.7

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.11.0 to 1.14.7.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.11.0...v1.14.7)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump tmpl from 1.0.4 to 1.0.5

Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump url-parse from 1.5.1 to 1.5.4

Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.1 to 1.5.4.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](unshiftio/url-parse@1.5.1...1.5.4)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump ws from 6.2.1 to 6.2.2

Bumps [ws](https://github.com/websockets/ws) from 6.2.1 to 6.2.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](websockets/ws@6.2.1...6.2.2)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Create codeql-analysis.yml

* Bump dns-packet from 1.3.1 to 1.3.4

Bumps [dns-packet](https://github.com/mafintosh/dns-packet) from 1.3.1 to 1.3.4.
- [Release notes](https://github.com/mafintosh/dns-packet/releases)
- [Changelog](https://github.com/mafintosh/dns-packet/blob/master/CHANGELOG.md)
- [Commits](mafintosh/dns-packet@v1.3.1...v1.3.4)

---
updated-dependencies:
- dependency-name: dns-packet
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Security patches, buildout 3.61.1

* Error boundary wrapping for breakpoints, addresses jaedb#806

* Fallback value when no uri provided, properly fixes jaedb#806

* Bump follow-redirects from 1.14.7 to 1.14.8

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.14.7...v1.14.8)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Safe navigating spotify settings

* Play/pause snapcast streams using meta_mpd.py plugin

* Merging common events

* Bump url-parse from 1.5.4 to 1.5.10

Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.4 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](unshiftio/url-parse@1.5.4...1.5.10)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Delete snapcast client; Hide whole group if all clients within it are disconnected and hidden

* Make sure state has clients before trying to render them, may be cause of jaedb#806

* Using real-world examples (Linux host)

* Ignoring docker_secondary for testing multi-room environments

* Reinstating ID tag for CSS heirarchy, fixes jaedb#815

* Correcting negative margins for mobile

* Playback progress now far bottom, prevents visual clash with volume bars (of different widths)

* Docker example using mpd_meta.py

* Buildout v3.62.0

Co-authored-by: James Barnsley <[email protected]>
Co-authored-by: Bas van Boven <[email protected]>
Co-authored-by: Matthias Meulien <[email protected]>
Co-authored-by: Sebastiaan Speck <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants