balena-io / balena-cli

The official balena CLI tool.
Apache License 2.0
453 stars 138 forks source link

Cannot read property 'toString' of undefined at login #860

Closed pimterry closed 4 years ago

pimterry commented 6 years ago

https://sentry.io/resinio/cli/issues/528502491/

TypeError: Cannot read property 'toString' of undefined
  File "...\resin-cli\node_modules\node-localstorage\LocalStorage.js", line 176, in LocalStorage.setItem
    valueString = value.toString();
  File "...\resin-cli\node_modules\resin-settings-storage\build\storage.js", line 58, in null.<anonymous>
    return localStorage.setItem(name, value);
  File "...\resin-cli\node_modules\bluebird\js\release\util.js", line 16, in tryCatcher
    return target.apply(this, arguments);
  File "\resin-cli\node_modules\bluebird\js\release\method.js", line 39, in Function.Promise.attempt.Promise.try
    value = tryCatch(fn)();
  File "...\resin-cli\node_modules\resin-settings-storage\build\storage.js", line 54, in Object.set
    return Promise.try(function () {
...
(13 additional frame(s) were not displayed)

TypeError: Cannot read property 'toString' of undefined

Looks like this is due to us trying to save an undefined token during resin login, not clear why we're doing that though.

pdcastro commented 4 years ago

No longer occurs in Sentry.io