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

Uncaught (in promise) TypeError: Cannot read property 'baseUrl' of undefined #111

Open
tiptronic opened this issue Apr 18, 2019 · 1 comment

Comments

@tiptronic
Copy link

I just switched networks and ran this line:

let discovery = new SonosDiscovery(sonosDiscoverySettings);

and getting the error:

Uncaught (in promise) TypeError: Cannot read property 'baseUrl' of undefined
    at NotificationListener.topologyChange (/Users/andy/dev-git/ElectroKC/node_modules/sonos-discovery/lib/SonosSystem.js:109)
    at NotificationListener.emit (events.js:182)
    at parseTopology.then (/Users/andy/dev-git/ElectroKC/node_modules/sonos-discovery/lib/NotificationListener.js:117)
    at process._tickCallback (internal/process/next_tick.js:68)

the error appears here (SonosSystem.js around line 109):

    // Update available services
    const anyPlayer = _this.getAnyPlayer();
    soap.invoke(`${anyPlayer.baseUrl}/MusicServices/Control`, soap.TYPE.ListAvailableServices)

I have a player here, but even if not - it should not throw, or?

Any idea or mechanism to recover from this situation?

@tiptronic
Copy link
Author

Here's a bit more information:
I removed one of my SonosOne speakers from a stereo-pair into a new network. What I didn't do was to split the stereo-pair. So Sonos showed me the room, with a question-mark (as one speaker) and the other speaker. This triggered the error.
After I split the speaker-pair the problem disappeared...
(btw: Sonos own desktop app didn't find the speakers as well - just the iOS.app showed the problem)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant