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

systray failed to start: Cannot read properties of undefined (reading 'items') #10

Open
UndarkAido opened this issue Dec 19, 2021 · 4 comments

Comments

@UndarkAido
Copy link

My project is just the example except that I had to make to constructor new SysTray.default

systray failed to start: Cannot read properties of undefined (reading 'items')
-snip-\node_modules\systray2\index.js:179
    if (item.items != null) {
             ^

TypeError: Cannot read properties of undefined (reading 'items')
    at addInternalId (C-snip-\node_modules\systray2\index.js:179:14)      
    at -snip-\node_modules\systray2\index.js:301:87
    at Array.forEach (<anonymous>)
    at SysTray.<anonymous> (-snip-\node_modules\systray2\index.js:301:57)
    at step (-snip-\node_modules\systray2\index.js:52:23)
    at Object.next (-snip-\node_modules\systray2\index.js:33:53)
    at -snip-\node_modules\systray2\index.js:27:71
    at new Promise (<anonymous>)
    at __awaiter (-snip-\node_modules\systray2\index.js:23:12)
    at C-snip-\node_modules\systray2\index.js:285:99

Process finished with exit code 1
{
  "name": "wallpapergarden-client",
  "main": "main.js",
  "type": "module",
  "scripts": {
    "start": "node ."
  },
  "dependencies": {
    "systray2": "^2.1.4"
  }
}
@felixhao28
Copy link
Owner

I cannot reproduce it. Can you share your project?

@vimal
Copy link

vimal commented Dec 29, 2021

(node:29669) UnhandledPromiseRejectionWarning: TypeError: input.on is not a function
    at new Interface (readline.js:189:11)
    at Object.createInterface (readline.js:69:10)
    at SysTray.<anonymous> (/Users/vimaldas/node-dev/aws-uploader/node_modules/systray2/index.js:296:61)
    at step (/Users/vimaldas/node-dev/aws-uploader/node_modules/systray2/index.js:52:23)
    at Object.next (/Users/vimaldas/node-dev/aws-uploader/node_modules/systray2/index.js:33:53)
    at /Users/vimaldas/node-dev/aws-uploader/node_modules/systray2/index.js:27:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/vimaldas/node-dev/aws-uploader/node_modules/systray2/index.js:23:12)
    at /Users/vimaldas/node-dev/aws-uploader/node_modules/systray2/index.js:285:99
    at new Promise (<anonymous>)
(node:29669) 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: 3)
(node:29669) [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.```

I am on MacOS Catalina and just tried the code from the example
Systray version is 2.1.4

@felixhao28
Copy link
Owner

@vimal Are you running the program from a shell, which supports standard output stream?

@UndarkAido
Copy link
Author

I was running it through Webstorm on Windows, I deleted the project already. Could try to recreate it.

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

3 participants