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

UnhandledPromiseRejectionWarning #87

Closed
ooskay opened this issue Aug 2, 2018 · 6 comments
Closed

UnhandledPromiseRejectionWarning #87

ooskay opened this issue Aug 2, 2018 · 6 comments

Comments

@ooskay
Copy link

ooskay commented Aug 2, 2018

Hi,
getting below error message with every loading Macig Miror on pm2 logs.
Error messages are disappear when module are disabled.

1|mm | (node:2597) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property ‘refs’ of undefined
1|mm | (node:2597) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
1|mm | (node:2597) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property ‘refs’ of undefined
1|mm | (node:2597) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Cannot read property ‘refs’ of undefined

@dvbit
Copy link

dvbit commented Aug 25, 2018

me too

@Snille
Copy link
Contributor

Snille commented Oct 8, 2018

I to get the same error...

@Jopyth
Copy link
Owner

Jopyth commented Nov 18, 2018

I have updated MM and now have the same warning. However everything still works currently, doesn't it? I will see if I have time to track down the problem. Unfortunately it shows no line numbers, so the time I had today was not enough to fix it. :(

@shbatm
Copy link
Contributor

shbatm commented Jan 4, 2019

Tracked with MMM-Logging. I will see if I can fix in my existing update.

2019-01-04T13:32:58 <error> (node:5229) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'refs' of undefined
    at /home/pi/MagicMirror/modules/MMM-Remote-Control/node_helper.js:276:53
    at /home/pi/MagicMirror/modules/MMM-Remote-Control/node_modules/simple-git/src/git.js:780:18
    at Git.<anonymous> (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_modules/simple-git/src/git.js:820:18)
    at done (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_modules/simple-git/src/git.js:1432:21)
    at /home/pi/MagicMirror/modules/MMM-Remote-Control/node_modules/simple-git/src/git.js:1457:16 (process/warning.js:18 writeOut)
2019-01-04T13:32:58 <error> (node:5229) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (process/warning.js:18 writeOut)
2019-01-04T13:32:58 <error> (node:5229) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (process/warning.js:18 writeOut)

@shbatm
Copy link
Contributor

shbatm commented Jan 4, 2019

It's this line: var baseUrl = result[0].refs.fetch; for some modules it looks like simple-git fails. Adding a try catch block for it in my PR.

shbatm added a commit to shbatm/MMM-Remote-Control that referenced this issue Jan 4, 2019
@bolish
Copy link

bolish commented Feb 17, 2019

Hi,

Same issue here, MMM-Logging logs

2019-02-15T22:45:59 Launching application. (/home/pi/MagicMirror/js/electron.js:82 App.) 2019-02-15T22:45:59 ERROR! Could not find main module js file for .AppleDouble (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_helper.js:258 Class.loadModuleDefaultConfig) 2019-02-15T22:46:03 (node:6793) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'refs' of undefined (/home/pi/MagicMirror/internal/process/warning.js:18 writeOut) 2019-02-15T22:46:03 (node:6793) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (/home/pi/MagicMirror/internal/process/warning.js:18 writeOut) 2019-02-15T22:46:03 (node:6793) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'refs' of undefined (/home/pi/MagicMirror/internal/process/warning.js:18 writeOut) 2019-02-15T22:46:03 (node:6793) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): TypeError: Cannot read property 'refs' of undefined (/home/pi/MagicMirror/internal/process/warning.js:18 writeOut) 2019-02-15T22:46:03 (node:6793) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): TypeError: Cannot read property 'refs' of undefined (/home/pi/MagicMirror/internal/process/warning.js:18 writeOut) 2019-02-15T22:46:04 (node:6793) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 5): TypeError: Cannot read property 'refs' of undefined (/home/pi/MagicMirror/internal/process/warning.js:18 writeOut) 2019-02-15T22:46:08 MMM-Logging updated config received, reloading console (/home/pi/MagicMirror/modules/MMM-Logging/node_helper.js:30 Class.socketNotificationReceived)

Any fix on your side guys?

@Jopyth Jopyth closed this as completed in 560f004 Feb 21, 2019
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

6 participants