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

TypeError in SitemapParser #62

Open
tomdc01 opened this issue Jan 10, 2017 · 1 comment
Open

TypeError in SitemapParser #62

tomdc01 opened this issue Jan 10, 2017 · 1 comment

Comments

@tomdc01
Copy link

tomdc01 commented Jan 10, 2017

Has anyone run into the following:

# npm -v
2.15.11
# node -v
v4.7.2
# npm start -- --name "myOpenHAB-Bridge" --server x.x.x.x:xxxx --sitemap somerset

Starting the bridge myOpenHAB-Bridge ...
/opt/OpenHAB-HomeKit-Bridge/lib/SitemapParser.js:98
      return widget.type === 'Frame' && (widget.icon === 'outlet' || widget.label === 'outlet');

                   ^

TypeError: Cannot read property 'type' of undefined
    at SitemapParser.looksLikeOutletFrame (/opt/OpenHAB-HomeKit-Bridge/lib/SitemapParser.js:76:12)
    at SitemapParser.parseSitemap (/opt/OpenHAB-HomeKit-Bridge/lib/SitemapParser.js:30:16)
    at /opt/OpenHAB-HomeKit-Bridge/lib/openHABBridge.js:59:39
    at Request._callback (/opt/OpenHAB-HomeKit-Bridge/lib/RestClient.js:31:11)
    at Request.self.callback (/opt/OpenHAB-HomeKit-Bridge/node_modules/request/request.js:186:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (/opt/OpenHAB-HomeKit-Bridge/node_modules/request/request.js:1081:10)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)

@tomdc01
Copy link
Author

tomdc01 commented Jan 10, 2017

I've managed to get past this error by hard coding the return value of looksLikeOutletFrame() but now hitting more type error issues:

Starting the bridge myOpenHAB-Bridge ...
/opt/OpenHAB-HomeKit-Bridge/lib/SitemapParser.js:98
      return widget.type === 'Frame' && (widget.icon === 'outlet' || widget.label === 'outlet');
                   ^

TypeError: Cannot read property 'type' of undefined
    at SitemapParser.looksLikeOutletFrame (/opt/OpenHAB-HomeKit-Bridge/lib/SitemapParser.js:76:12)
    at SitemapParser.parseSitemap (/opt/OpenHAB-HomeKit-Bridge/lib/SitemapParser.js:30:16)
    at /opt/OpenHAB-HomeKit-Bridge/lib/openHABBridge.js:59:39
    at Request._callback (/opt/OpenHAB-HomeKit-Bridge/lib/RestClient.js:31:11)
    at Request.self.callback (/opt/OpenHAB-HomeKit-Bridge/node_modules/request/request.js:186:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (/opt/OpenHAB-HomeKit-Bridge/node_modules/request/request.js:1081:10)
    at emitOne (events.js:77:13)
    at Request.emit (events.js:169:7)

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