Closed jotwg closed 5 years ago
@jotwg
Cannot read property 'toString' of undefined
That looks like the root cause. I'll look into it. Thanks for attaching the log, that's very helpful.
@jotwg I think I got it. Should be solved in a few minutes.
@jotwg I opened a new PR for the update with the fix. As soon as it's merged you can try it with the version.
thumbs up and many thanks for this super fast fix!
Device will be added successfully now and I'm getting responses from the server.
Thanks a lot!
After adding a new device in the http-adapter configuration by providing name of the device, one action with name, URL (without preceding "http://"), HTTP method and HTTP content-type, I don't see a new thing.
mozilla WebThings Gateway on raspi 4 Current version: 0.10.0 Last update: Thu Nov 14 2019 01:06:19 GMT+0100 (Central European Standard Time)
The log file shows: 2019-11-21 18:02:11.533 INFO : Unloading HttpAdapter 2019-11-21 18:02:11.536 INFO : http: Adapter: HttpAdapter unloaded 2019-11-21 18:02:15.054 INFO : Loading add-on: http-adapter 2019-11-21 18:02:16.051 INFO : http: Opening database: /home/pi/.mozilla-iot/config/db.sqlite3 2019-11-21 18:02:16.817 INFO : http: Loading add-on http-adapter from /home/pi/.mozilla-iot/addons/http-adapter 2019-11-21 18:02:17.125 INFO : http: Unhandled Rejection 2019-11-21 18:02:17.126 ERROR : http: TypeError: Cannot read property 'toString' of undefined 2019-11-21 18:02:17.127 ERROR : http: at new Device (/home/pi/mozilla-iot/gateway/node_modules/gateway-addon/lib/device.js:20:15) 2019-11-21 18:02:17.127 ERROR : http: at new HttpDevice (/home/pi/.mozilla-iot/addons/http-adapter/lib/http-adapter.js:26:9) 2019-11-21 18:02:17.128 ERROR : http: at HttpAdapter. (/home/pi/.mozilla-iot/addons/http-adapter/lib/http-adapter.js:105:34)
2019-11-21 18:02:17.128 ERROR : http: at Generator.next ()
2019-11-21 18:02:17.129 ERROR : http: at fulfilled (/home/pi/.mozilla-iot/addons/http-adapter/lib/http-adapter.js:10:58)
2019-11-21 18:02:17.129 ERROR : http: at
Any idea?
Thx!