-
Notifications
You must be signed in to change notification settings - Fork 25
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
Discovered data char: "TypeError: Cannot read property 'on' of undefined" #12
Comments
Looks like characteristic discovery for characteristic fe51 does not return a value in your installation. You have it all the time? |
I've just checked my logs for the last 48h (logrotate is on, so I can't go back further :/) and nothing showed up. I'll keep an eye on it. |
Had another one in the logs from a different device this time: 2020-05-01T08:50:46.544Z am43:02dec6987ad1 AM43 connected for data reading TypeError: Cannot read property 'on' of undefined |
Do you get any battery and position values into your mqtt broker/homeassistant? Haven't got this error a single time in 4 months log on 2 devices. Are you running on Rpi? I noticed that upgrading the bluez increases stability. The os packaging system mostly contains a pretty old version of bluez, while there are still some possibly relevant issues fixed. You can check version by performing ‘bluetoothctl -v’. Upgrade instructions: https://github.com/zewelor/bt-mqtt-gateway/wiki/Upgrade-Bluez-on-Raspbian. |
Recently updated to the latest version.
2020-04-29T21:59:22.497Z am43:02d4146eaf57 discovered data char
/usr/lib/node_modules/am43-ctrl/src/am43.js:117
characteristic.on('data', function (data, isNotification) {
^
TypeError: Cannot read property 'on' of undefined
at discoveryResult (/usr/lib/node_modules/am43-ctrl/src/am43.js:117:32)
at /usr/lib/node_modules/am43-ctrl/node_modules/@abandonware/noble/lib/peripheral.js:119:13
at Service. (/usr/lib/node_modules/am43-ctrl/node_modules/@abandonware/noble/lib/service.js:56:7)
at Object.onceWrapper (events.js:417:26)
at Service.emit (events.js:310:20)
at Noble.onCharacteristicsDiscover (/usr/lib/node_modules/am43-ctrl/node_modules/@abandonware/noble/lib/noble.js:398:13)
at NobleBindings.emit (events.js:310:20)
at NobleBindings.onCharacteristicsDiscovered (/usr/lib/node_modules/am43-ctrl/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:368:8)
at Gatt.emit (events.js:310:20)
at Object.callback (/usr/lib/node_modules/am43-ctrl/node_modules/@abandonware/noble/lib/hci-socket/gatt.js:514:12)
Installed packages:
cat */package.json | jq '._from'
"abbrev@1"
"accepts@~1.3.7"
"ansi-regex@^2.0.0"
"ansi-styles@^3.2.0"
"aproba@^1.0.3"
"are-we-there-yet@~1.1.2"
"[email protected]"
"async-limiter@~1.0.0"
"balanced-match@^1.0.0"
"base64-js@^1.0.2"
"bindings@^1.4.0"
"bl@^4.0.1"
"[email protected]"
"brace-expansion@^1.1.7"
"buffer-from@^1.0.0"
"buffer@^5.5.0"
"[email protected]"
"callback-stream@^1.0.2"
"camelcase@^5.0.0"
"chownr@^1.1.1"
"cliui@^5.0.0"
"code-point-at@^1.0.0"
"color-convert@^1.9.0"
"[email protected]"
"commist@^1.0.0"
"[email protected]"
"concat-stream@^1.6.2"
"console-control-strings@~1.1.0"
"[email protected]"
"content-type@~1.0.4"
"[email protected]"
"[email protected]"
"core-util-is@~1.0.0"
"debug@^4.0.1"
"decamelize@^1.2.0"
"decompress-response@^4.2.0"
"deep-extend@^0.6.0"
"delegates@^1.0.0"
"depd@~1.1.2"
"destroy@~1.0.4"
"detect-libc@^1.0.2"
"d@1"
"duplexify@^3.6.0"
"[email protected]"
"emoji-regex@^7.0.1"
"encodeurl@~1.0.2"
"end-of-stream@^1.1.0"
"es5-ext@~0.10.14"
"es6-iterator@~2.0.1"
"es6-map@^0.1.5"
"es6-set@~0.1.5"
"es6-symbol@~3.1.1"
"escape-html@~1.0.3"
"etag@~1.8.1"
"event-emitter@~0.3.5"
"expand-template@^2.0.3"
"express@^4.16.3"
"extend@^3.0.0"
"ext@^1.1.2"
"[email protected]"
"finalhandler@~1.1.2"
"find-up@^3.0.0"
"forwarded@~0.1.2"
"[email protected]"
"fs-constants@^1.0.0"
"fs-minipass@^1.2.5"
"fs.realpath@^1.0.0"
"gauge@~2.7.3"
"get-caller-file@^2.0.1"
"[email protected]"
"glob@^7.1.3"
"glob-parent@^3.1.0"
"glob-stream@^6.1.0"
"has-unicode@^2.0.0"
"help-me@^1.0.1"
"[email protected]"
"iconv-lite@^0.4.4"
"ieee754@^1.1.4"
"ignore-walk@^3.0.1"
"inflight@^1.0.4"
"inherits@~2.0.3"
"ini@~1.3.0"
"[email protected]"
"is-absolute@^1.0.0"
"isarray@~1.0.0"
"is-extglob@^2.1.0"
"is-fullwidth-code-point@^1.0.0"
"is-glob@^3.1.0"
"is-negated-glob@^1.0.0"
"is-relative@^1.0.0"
"is-unc-path@^1.0.0"
"is-windows@^1.0.1"
"json-stable-stringify-without-jsonify@^1.0.1"
"leven@^2.1.0"
"locate-path@^3.0.0"
"[email protected]"
"[email protected]"
"methods@~1.1.2"
"[email protected]"
"[email protected]"
"mime-types@~2.1.24"
"mimic-response@^2.0.0"
"minimatch@^3.0.4"
"minimist@^1.2.5"
"minipass@^2.8.6"
"minizlib@^1.2.1"
"mkdirp-classic@^0.5.2"
"mkdirp@^0.5.1"
"mqtt@^2.18.2"
"mqtt-packet@^5.6.0"
"ms@^2.1.1"
"nan@^2.14.0"
"napi-build-utils@^1.0.1"
"[email protected]"
"needle@^2.2.1"
"[email protected]"
"next-tick@~1.0.0"
"node-abi@^2.7.0"
"node-addon-api@^2.0.0"
"node-pre-gyp@^0.14.0"
"noop-logger@^0.1.1"
"nopt@^4.0.1"
"npm-bundled@^1.0.1"
"npmlog@^4.0.2"
"npm-normalize-package-bin@^1.0.1"
"npm-packlist@^1.1.6"
"number-is-nan@^1.0.0"
"object-assign@^4.1.0"
"once@^1.3.0"
"on-finished@~2.3.0"
"ordered-read-streams@^1.0.0"
"osenv@^0.1.4"
"os-homedir@^1.0.0"
"os-tmpdir@^1.0.0"
"parseurl@~1.3.3"
"path-dirname@^1.0.0"
"path-exists@^3.0.0"
"path-is-absolute@^1.0.0"
"[email protected]"
"p-limit@^2.0.0"
"p-locate@^3.0.0"
"prebuild-install@^5.3.3"
"process-nextick-args@~2.0.0"
"proxy-addr@~2.0.5"
"p-try@^2.0.0"
"pumpify@^1.3.5"
"pump@^3.0.0"
"[email protected]"
"range-parser@~1.2.1"
"[email protected]"
"rc@^1.2.7"
"readable-stream@^2.0.6"
"readline-sync@^1.4.9"
"reinterval@^1.1.0"
"remove-trailing-separator@^1.0.1"
"require-directory@^2.1.1"
"require-main-filename@^2.0.0"
"rimraf@^2.6.1"
"safe-buffer@~5.1.1"
"safer-buffer@>= 2.1.2 < 3"
"sax@^1.2.4"
"semver@^5.3.0"
"[email protected]"
"[email protected]"
"set-blocking@~2.0.0"
"[email protected]"
"signal-exit@^3.0.0"
"simple-concat@^1.0.0"
"simple-get@^3.0.3"
"split2@^2.1.1"
"statuses@~1.5.0"
"stream-shift@^1.0.0"
"string_decoder@~1.1.1"
"string-width@^1.0.1"
"strip-ansi@^3.0.1"
"strip-json-comments@~2.0.1"
"tar-fs@^2.0.0"
"tar@^4.4.2"
"tar-stream@^2.0.0"
"through2-filter@^3.0.0"
"through2@^2.0.1"
"to-absolute-glob@^2.0.0"
"[email protected]"
"tunnel-agent@^0.6.0"
"typedarray@^0.0.6"
"type-is@~1.6.18"
"type@^1.0.1"
"ultron@~1.1.0"
"unc-path-regex@^0.1.2"
"unique-stream@^2.0.2"
"[email protected]"
"usb@^1.6.2"
"util-deprecate@~1.0.1"
"[email protected]"
"vary@~1.1.2"
"websocket-stream@^5.1.2"
"which-module@^2.0.0"
"which-pm-runs@^1.0.0"
"wide-align@^1.1.0"
"wrap-ansi@^5.1.0"
"wrappy@1"
"ws@^3.2.0"
"xtend@^4.0.1"
"y18n@^4.0.0"
"yallist@^3.0.3"
"yargs@^13.2.2"
"yargs-parser@^13.1.2"
The text was updated successfully, but these errors were encountered: