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

Update system information #3337

Merged
merged 3 commits into from
Jan 7, 2024

Conversation

KristjanESPERANTO
Copy link
Contributor

  • Add ELECTRON_ENABLE_GPU
  • Remove docker version
  • Differentiation between installed and used node version
  • Highlight "Ready to go!" for server mode (Since we display system information in the console, it is easy to overlook this important line.)

Electron mode

Before

[07.01.2024 16:37.30.591] [INFO]  System information:
 ### SYSTEM:   manufacturer: Notebook; model: N650DU; raspberry: undefined; virtual: false
 ### OS:       platform: linux; distro: Debian GNU/Linux; release: 12; arch: x64; kernel: 5.10.0-20-amd64
 ### VERSIONS: electron: 27.2.0; node: 18.17.1; npm: 10.2.4; pm2: 5.3.0; docker: 20.10.24+dfsg1
 ### OTHER:    timeZone: Europe/Berlin

After

[07.01.2024 16:39.04.736] [INFO]  System information:
### SYSTEM:   manufacturer: Notebook; model: N650DU; raspberry: undefined; virtual: false
### OS:       platform: linux; distro: Debian GNU/Linux; release: 12; arch: x64; kernel: 5.10.0-20-amd64
### VERSIONS: electron: 27.2.0; used node: 18.17.1; installed node: 21.1.0; npm: 10.2.4; pm2: 5.3.0
### OTHER:    timeZone: Europe/Berlin; ELECTRON_ENABLE_GPU: undefined

server mode

Before

[07.01.2024 16:36.49.106] [LOG]   
Ready to go! Please point your browser to: http://localhost:8080
[07.01.2024 16:36.49.287] [INFO]  System information:
 ### SYSTEM:   manufacturer: Notebook; model: N650DU; raspberry: undefined; virtual: false
 ### OS:       platform: linux; distro: Debian GNU/Linux; release: 12; arch: x64; kernel: 5.10.0-20-amd64
 ### VERSIONS: electron: undefined; node: 21.1.0; npm: 10.2.4; pm2: 5.3.0; docker: 20.10.24+dfsg1
 ### OTHER:    timeZone: Europe/Berlin

After

[2024-01-07 16:33:53.804] [INFO]  
>>>   Ready to go! Please point your browser to: http://localhost:8080   <<< 
[2024-01-07 16:33:53.997] [INFO]  System information:
### SYSTEM:   manufacturer: Notebook; model: N650DU; raspberry: undefined; virtual: false
### OS:       platform: linux; distro: Debian GNU/Linux; release: 12; arch: x64; kernel: 5.10.0-20-amd64
### VERSIONS: electron: undefined; used node: 21.1.0; installed node: 21.1.0; npm: 10.2.4; pm2: 5.3.0
### OTHER:    timeZone: Europe/Berlin; ELECTRON_ENABLE_GPU: undefined 

- Add ELECTRON_ENABLE_GPU
- Remove docker version
- Differentiation between installed and used node version
Since we display system information in the console, it is easy to overlook this important line.
@KristjanESPERANTO KristjanESPERANTO mentioned this pull request Jan 7, 2024
3 tasks
@KristjanESPERANTO KristjanESPERANTO changed the title Extendsysteminfo Change system information Jan 7, 2024
@KristjanESPERANTO KristjanESPERANTO changed the title Change system information Update system information Jan 7, 2024
@rejas rejas merged commit 407072d into MagicMirrorOrg:develop Jan 7, 2024
5 checks passed
@rejas
Copy link
Collaborator

rejas commented Jan 7, 2024

Merged. When running it on my pi4 I get this in the error log (this error already happened with the original PR too):

0|MagicMirror  | [07.01.2024 17:28.44.645] [ERROR] Whoops! There was an uncaught exception...
0|MagicMirror  | [07.01.2024 17:28.44.646] [ERROR] Error: write EFAULT
0|MagicMirror  |     at afterWriteDispatched (node:internal/stream_base_commons:160:15)
0|MagicMirror  |     at writeGeneric (node:internal/stream_base_commons:151:3)
0|MagicMirror  |     at Socket._writeGeneric (node:net:931:11)
0|MagicMirror  |     at Socket._write (node:net:943:8)
0|MagicMirror  |     at writeOrBuffer (node:internal/streams/writable:392:12)
0|MagicMirror  |     at _write (node:internal/streams/writable:333:10)
0|MagicMirror  |     at Socket.write (node:internal/streams/writable:337:10)
0|MagicMirror  |     at execSync (node:child_process:981:20)
0|MagicMirror  |     at node:electron/js2c/asar_bundle:2:12708
0|MagicMirror  |     at /home/rejas/MagicMirror/node_modules/systeminformation/lib/system.js:64:21
0|MagicMirror  |     at ChildProcess.exithandler (node:child_process:422:7)
0|MagicMirror  |     at ChildProcess.emit (node:events:514:28)
0|MagicMirror  |     at maybeClose (node:internal/child_process:1091:16)
0|MagicMirror  |     at Socket.<anonymous> (node:internal/child_process:449:11)
0|MagicMirror  |     at Socket.emit (node:events:514:28)
0|MagicMirror  |     at Pipe.<anonymous> (node:net:323:12) {
0|MagicMirror  |   errno: -14,
0|MagicMirror  |   code: 'EFAULT',
0|MagicMirror  |   syscall: 'write'
0|MagicMirror  | }
0|MagicMirror  | [07.01.2024 17:28.44.646] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
0|MagicMirror  | [07.01.2024 17:28.44.647] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MagicMirrorOrg/MagicMirror/issues

SysInfo is shown nevertheless:

0|MagicMirror  | [07.01.2024 17:28.45.318] [INFO]  System information:
0|MagicMirror  | ### SYSTEM:   manufacturer: ; model: ; raspberry: undefined; virtual: false
0|MagicMirror  | ### OS:       platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.1.69-v8+
0|MagicMirror  | ### VERSIONS: electron: 27.2.0; used node: 18.17.1; installed node: 20.8.0; npm: 10.1.0; pm2: 5.3.0

@sdetweil
Copy link
Collaborator

sdetweil commented Jan 7, 2024

/home/rejas/MagicMirror/node_modules/systeminformation/lib/system.js:64

@KristjanESPERANTO
Copy link
Contributor Author

That is strange. I have a Pi4 here but have yet to set it up. I probably won't be able to do that in the next few days. Could it be that systeminformation uses libraries that are incompatible with the Raspi? Has anyone else run it on a Raspi?

@khassel
Copy link
Collaborator

khassel commented Jan 7, 2024

will try it on raspi later ...

@khassel
Copy link
Collaborator

khassel commented Jan 7, 2024

I can reproduce this error on a raspi with arm64 (but not on arm).

It is caused by the line const staticData = await si.getStaticData(); which is already in a try/catch block.

So I think they are getting these info's in a thread and trying this until it succeeds.

It is really ugly because the above error is thrown 7 times when starting. Will dig in the systeminformation code later.

It happens only when running npm start, not with npm run server, so tried a newer electron version but no success.

@KristjanESPERANTO
Copy link
Contributor Author

Thanks for looking it up!

Until systimformation fixes that, maybe we could add an if condition that only outputs the system info for non-arm64 systems. Of course, that wouldn't be great, as a lot of users probably use arm64.

@KristjanESPERANTO
Copy link
Contributor Author

I'm working on a approach requesting only the needed information. Maybe that will solve the issue. I' preparing a PR.

@khassel
Copy link
Collaborator

khassel commented Jan 7, 2024

I found no solution for the arm64 problem. I thought of a timing problem but delaying the call (up to 15 sec.) did not change anything.

KristjanESPERANTO added a commit to KristjanESPERANTO/MagicMirror that referenced this pull request Jan 7, 2024
Hopefully this solves the problem with arm64 (reported in PR MagicMirrorOrg#3337).
@KristjanESPERANTO
Copy link
Contributor Author

Can please someone check PR #3338 on arm64?

@khassel
Copy link
Collaborator

khassel commented Jan 7, 2024

only 3 errors instead of 7 before ...

@KristjanESPERANTO
Copy link
Contributor Author

Strange, but a step forward.

Maybe you can gradually reduce the information requested to find out which ones are causing the problems?

			const staticData = await si.get({
				system: "manufacturer, model, raspberry, virtual",
				osInfo: "platform, distro, release, arch",
				versions: "kernel, node, npm, pm2"
			});

@khassel
Copy link
Collaborator

khassel commented Jan 7, 2024

  • if I include any system property --> exception in node_modules/systeminformation/lib/system.js:64:21
  • if I include any osInfo property --> exception in node_modules/systeminformation/lib/osinfo.js:219:15 and node_modules/systeminformation/lib/util.js:562:24
  • versions works

@KristjanESPERANTO
Copy link
Contributor Author

Okay, what now? Comment out system and osInfo and commit?

@khassel
Copy link
Collaborator

khassel commented Jan 7, 2024

no, let us wait, there is much time until next release, at the moment I have no idea.

It is really strange that this occurs only on arm64 and when running under electron. Maybe @rejas has an idea?

rejas pushed a commit that referenced this pull request Jan 14, 2024
by excluding them from global error handling, see discussions in
#3337
rejas pushed a commit that referenced this pull request Jan 14, 2024
Hopefully this solves the problem with arm64 (reported in PR #3337).
@KristjanESPERANTO
Copy link
Contributor Author

I have now also looked at the issue on a Pi 4 and can only confirm what you have already found out and have no direct solution.

I have found an existing open issue (sebhildebrandt/systeminformation#873) and have added my findings there. If anyone finds out anything else, they could add it there. If this is fixed, we could reverse the changes from #3349.

One more note: I have noticed that the "raspberry" field seems never to be filled. I have opened a new issue for this: sebhildebrandt/systeminformation#881.

@KristjanESPERANTO KristjanESPERANTO deleted the extendsysteminfo branch January 16, 2024 21:15
@rejas rejas mentioned this pull request Apr 1, 2024
rejas added a commit that referenced this pull request Apr 1, 2024
## [2.27.0] - 2024-04-01

Thanks to: @bugsounet, @crazyscot, @illimarkangur, @jkriegshauser,
@khassel, @KristjanESPERANTO, @Paranoid93, @rejas, @sdetweil and
@vppencilsharpener.

This release marks the first release without Michael Teeuw (@MichMich).
A very special thanks to him for creating MagicMirror and leading the
project for so many years.

For more info, please read the following post: [A New Chapter for
MagicMirror: The Community Takes the
Lead](https://forum.magicmirror.builders/topic/18329/a-new-chapter-for-magicmirror-the-community-takes-the-lead).

### Added

- Output of system information to the console for troubleshooting (#3328
and #3337), ignore errors under aarch64 (#3349)
- [chore] Add `eslint-plugin-package-json` to lint the `package.json`
files (#3368)
- [weather] `showHumidity` config is now a string describing where to
show this element. Supported values: "wind", "temp", "feelslike",
"below", "none". (#3330)
- electron-rebuild test suite for electron and 3rd party modules
compatibility (#3392)
- Create MM² icon and attach it to electron process (#3407)

### Updated

- Update updatenotification (update_helper.js): Recode with pm2 library
(#3332)
- Removing lodash dependency by replacing merge by spread operator
(#3339)
- Use node prefix for build-in modules (#3340)
- Rework logging colors (#3350)
- Update pm2 to v5.3.1 with no allow-ghsas (#3364)
- [chore] Update husky and let lint-staged fix ESLint issues
- [chore] Update dependencies including electron to v29 (#3357) and
node-ical
- Update translations for estonian (#3371)
- Update electron to v29 and update other dependencies
- [calendar] fullDay events over several days now show the left days
from the first day on and 'today' on the last day
- Update layout of current weather indoor values

### Fixed

- Correct apibase of weathergov weatherprovider to match documentation
(#2926)
- Worked around several issues in the RRULE library that were causing
deleted calender events to still show, some
initial and recurring events to not show, and some event times to be off
an hour. (#3291)
- Skip changelog requirement when running tests for dependency updates
(#3320)
- Display precipitation probability when it is 0% instead of blank/empty
(#3345)
- [newsfeed] Suppress unsightly animation cases when there are 0 or 1
active news items (#3336)
- [newsfeed] Always compute the feed item URL using the same helper
function (#3336)
- Ignore all custom css files (#3359)
- [newsfeed] Fix newsfeed stall issue introduced by #3336 (#3361)
- Changed `log.debug` to `log.log` in `app.js` where logLevel is not set
because config is not loaded at this time (#3353)
- [calendar] deny fetch interval < 60000 and set 60000 in this case
(prevent fetch loop failed) (#3382)
- added message in case where config.js is missing the module.export
line PR #3383
- Fixed an issue where recurring events could extend past their
recurrence end date (#3393)
- Don't display any `npm WARN <....>` on install (#3399)
- Fixed move suncalc dependency to production from dev, as it is used by
clock module
- [compliments] Fix mirror not responding anymore when no compliments
are to be shown (#3385)

### Deleted

- Unneeded file headers (#3358)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Michael Teeuw <[email protected]>
Co-authored-by: Kristjan ESPERANTO <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Karsten Hassel <[email protected]>
Co-authored-by: Ross Younger <[email protected]>
Co-authored-by: Bugsounet - Cédric <[email protected]>
Co-authored-by: jkriegshauser <[email protected]>
Co-authored-by: illimarkangur <[email protected]>
Co-authored-by: sam detweiler <[email protected]>
Co-authored-by: vppencilsharpener <[email protected]>
Co-authored-by: Paranoid93 <[email protected]>
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

Successfully merging this pull request may close these issues.

4 participants