Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

TypeError: Cannot read property 'indexOf' of undefined #1

Closed
sonoseco opened this issue Jan 14, 2019 · 12 comments
Closed

TypeError: Cannot read property 'indexOf' of undefined #1

sonoseco opened this issue Jan 14, 2019 · 12 comments
Labels
bug Something isn't working

Comments

@sonoseco
Copy link

Installed the plugin, added the platform to the config file but keep getting this error.

TypeError: Cannot read property 'indexOf' of undefined stdout 23:45:52 at API.platform (/usr/local/lib/node_modules/homebridge/lib/api.js:108:12) stdout 23:45:52 at Server._loadPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:316:45) stdout 23:45:52 at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:86:36) stdout 23:45:52 at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:45:10) stdout 23:45:52 at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) stdout 23:45:52 at Module._compile (internal/modules/cjs/loader.js:689:30) stdout 23:45:52 at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10) stdout 23:45:52 at Module.load (internal/modules/cjs/loader.js:599:32) stdout 23:45:52 at tryModuleLoad (internal/modules/cjs/loader.js:538:12) stdout 23:45:52 at Function.Module._load (internal/modules/cjs/loader.js:530:3) stdout 23:45:52 at Function.Module.runMain (internal/modules/cjs/loader.js:742:12) stdout 23:45:52 at startup (internal/bootstrap/node.js:283:19) stdout 23:45:52 at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)

@langovoi
Copy link
Owner

Could you provide full log with -D flag for homebridge and env DEBUG=*?

@nicknicknickos
Copy link
Contributor

If you copy/pasted the config example from README.md, there's a typo which might be causing this issue.

Look at your config and see how 'platform' is spelled. In the example, it's spelled 'platfrom' and will cause errors.

@nicknicknickos
Copy link
Contributor

Created a PR for this

@sonoseco
Copy link
Author

sonoseco commented Jan 15, 2019

It looks like the typo was the issue as I no longer see that error, however, I am receiving a different error now:

/usr/local/lib/node_modules/homebridge/lib/platformAccessory.js:17

  if (!uuid.isValid(UUID)) throw new Error("UUID '" + UUID + "' is not a valid UUID. Try using the provided 'generateUUID' function to create a valid UUID from any arbitrary string, like a serial number.");

Error: UUID 'RINCON_7828CA18D02201400' is not a valid UUID. Try using the provided 'generateUUID' function to create a valid UUID from any arbitrary string, like a serial number.

    at new PlatformAccessory (/usr/local/lib/node_modules/homebridge/lib/platformAccessory.js:17:34)

    at MediaRenderer1._createAccessory (/homebridge/node_modules/homebridge-upnp/MediaRenderer1.js:17:25)

    at _client.getDeviceDescription (/homebridge/node_modules/homebridge-upnp/Device.js:47:22)

    at /homebridge/node_modules/@langovoi/upnp-device-client/index.js:52:5

    at /homebridge/node_modules/@langovoi/upnp-device-client/index.js:613:7

    at ConcatStream.<anonymous> (/homebridge/node_modules/concat-stream/index.js:37:43)

    at ConcatStream.emit (events.js:187:15)

    at finishMaybe (/homebridge/node_modules/readable-stream/lib/_stream_writable.js:630:14)

    at endWritable (/homebridge/node_modules/readable-stream/lib/_stream_writable.js:638:3)

    at ConcatStream.Writable.end (/homebridge/node_modules/readable-stream/lib/_stream_writable.js:594:41)

    at IncomingMessage.onend (_stream_readable.js:628:10)

    at Object.onceWrapper (events.js:273:13)

    at IncomingMessage.emit (events.js:187:15)

    at endReadableNT (_stream_readable.js:1094:12)

    at process._tickCallback (internal/process/nex

@langovoi
Copy link
Owner

@hjtech I already know about this issue and preparing fix, but I want to understand which device provide not valid UUID. Could you provide to me logs with -D flag for Homebridge and env DEBUG=*? (for your privacy send it to my email: marklangovoi@gmail.com)

@langovoi
Copy link
Owner

I released 0.1.8 with fix UUID.

@langovoi langovoi added the bug Something isn't working label Jan 15, 2019
@sonoseco
Copy link
Author

0.1.8 fixed it! Thank you @langovoi

@langovoi
Copy link
Owner

@hjtech could you say, which device you successfully used with plugin? It need for supported and tested devices list which I prepare.

@sonoseco
Copy link
Author

It was able to detect all my Sonos speakers, a Yamaha AV receiver and one Samsung TV (out of two). Though the Samsung TV showed up in the Home app, it is always showing "No Response" and can't control it, but I have to do more troubleshooting.

@langovoi
Copy link
Owner

Could you say device models (like Sonos Beam or Samsung KU6300)?

hough the Samsung TV showed up in the Home app, it is always showing "No Response" and can't control it, but I have to do more troubleshooting.

This because you use AV receiver with TV :-( I know about this problem, but still searching for solution...

@sonoseco
Copy link
Author

Models are: Sonos Beam and Sonos One, Samsung UN65F9000 and Yamaha RX-3050. None of the Samsung TVs are connected to the receiver but the UN65F9000 is connected to the Sonos Beam.

@langovoi
Copy link
Owner

Samsung UN65F9000

Could you provide firmware version?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants