@karsten13
In case of electron-rebuild this is no problem as it is only required during compile but not at runtime.
Read the statement by Michael Teeuw here.
Posts
-
RE: electron-rebuild problems with MagicMirror 2.22.0
-
RE: electron-rebuild problems with MagicMirror 2.22.0
I have a docker installation running for development here on my notebook.
Everytime a module needs “npm install” I exec to the container and run the command in the container cause there will be called the correct npm and node version in the container and not the ones I currently use on my notebook.
In this case the directory structure is the same as with a locally installed MagicMirror and the postinstall script will work as excepted. -
RE: electron-rebuild problems with MagicMirror 2.22.0
@KristjanESPERANTO
The problem with installing it in the module directory is that we need to compile the library against the electron version installed in the MagicMirror project.
If electron-rebuild is installed in the module directory it might fail to detect the right electron version (which was the cause of the rebuild problems in the past).
So the right way is to install electron-rebuild in the same project as electron and call it from there.It might be worth to think about adding it as a dependency in the main project.
-
RE: electron-rebuild problems with MagicMirror 2.22.0
Hi and thank you for contributing. I confirm that changing to magicmirror-rebuild did not make things batter but worse. I now followed the suggestion of @sdetweil and implemented his postinstall script. Things are working perfectly now and should work in future releases, too.
I merged the new changes to the master a few minutes ago and released version 0.0.7 of MMM-GPIO-Notifications. I will implement this approach in my other modules, too.
-
RE: Help with MMM-EmbedURL
I setup a new environment today and tested your configuration. There are a few issues with it i did not see cause you did not use the code signs to paste your configuration in the forum.
Please use the
```
YOUR CONFIGURATION
```which results in
YOUR CONFIGURATIONnext time.
First thing is that you set the
basicElementTypeandembedElementTypein the wrong level. They need to be set as child object ofconfig.The second problem is that you use a wrong time of double quotes. It looks like your editor uses a wired type of encoding.
“is not the same as
"With the following config everything works well:
/* Magic Mirror Config Sample * * By Michael Teeuw https://michaelteeuw.nl * MIT Licensed. * * For more information on how you can configure this file * see https://docs.magicmirror.builders/getting-started/configuration.html#general * and https://docs.magicmirror.builders/modules/configuration.html */ let config = { electronOptions: { webPreferences: { webSecurity: false, webviewTag: true, }, fullscreen: true, alwaysOnTop: false }, // ignoreXOriginHeader: true, // ignoreContentSecurityPolicy: true, address: "192.168.1.1", // Address to listen on, can be: // - "localhost", "127.0.0.1", "::1" to listen on loopback interface // - another specific IPv4/6 to listen on a specific interface // - "0.0.0.0", "::" to listen on any interface // Default, when address config is left out or empty, is "localhost" port: 8080, basePath: "/", // The URL path where MagicMirror is hosted. If you are using a Reverse proxy // you must set the sub path here. basePath must end with a / ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1", "10.18.8.0/24"], // Set [] to allow all IP addresses // or add a specific IPv4 of 192.168.1.5 : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"], // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"], useHttps: false, // Support HTTPS or not, default "false" will use HTTP httpsPrivateKey: "", // HTTPS private key path, only require when useHttps is true httpsCertificate: "", // HTTPS Certificate path, only require when useHttps is true language: "de", locale: "de-DE", logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging timeFormat: 24, units: "metric", // serverOnly: true/false/"local" , // local for armv6l processors, default // starts serveronly and then starts chrome browser // false, default for all NON-armv6l devices // true, force serveronly mode, because you want to.. no UI on this device modules: [ { module: "clock", position: "top_center", }, { module: "MMM-EmbedURL", position: "top_right", header: "Current Weather", config: { embedElementType: "webview", basicElementType: "div", updateInterval: 120, attributes: [ "frameborder=0", ], embed: [ “https://www.wunderground.com/dashboard/pws/KVTCAMBR4?cm_ven=localwx_pwsdash” ] }, }, { module: "MMM-Touch", position: "bottom_center", config: { debug: true, useDisplay: false, defaultMode: "default", gestureCommands: { default: { TAP_1: (commander) => { commander.sendNotification("USER_PRESENCE", true); }, PRESS_1: (commander) => { commander.sendNotification("SCREEN_TOGGLE", { forced: true }); }, SWIPE_UP_1: (commander) => { commander.sendNotification("SCREEN_ON", { forced: true }); }, SWIPE_DOWN_1: (commander) => { commander.sendNotification("SCREEN_OFF", { forced: true }); }, SWIPE_LEFT_1: (commander) => { commander.sendNotification("PROFILE_INCREMENT_HORIZONTAL", null); }, SWIPE_RIGHT_1: (commander) => { commander.sendNotification("PROFILE_DECREMENT_HORIZONTAL", null); } } } } }, ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") { module.exports = config; } -
RE: electron-rebuild problems with MagicMirror 2.22.0
@sdetweil
New installation, new luck!
Everything works well now and i think if found the reason for the problems.As i wrote earlier i am running TeleFrame on the same Pi with MagicMirror. This time i installed TeleFrame manually instead of with the installer as i saw that the automatic installer of Teleframe installs a global version of Electron and adds architecture settings to the “.profile” file of the user.
-
RE: electron-rebuild problems with MagicMirror 2.22.0
Today i started a new approach and removed the “node_modules” folder of MagicMirror before the update to make sure no other electron-rebuild packages are installed.
As i do have a second electron app running on my mirror (TeleFrame) is stopped this application and removed the “/home/pi/.electron-gyp” folder to make sure everything is clean before the update.
I then did the update with your script and the “npm install” step of my MMM-GPIO-Notifications module fails.
I cloned your “MMM-Buttons” module and tried to install only this module but i get the same compile error. I enabled the DEBUG flag. Maybe you see something i do not see but it looks like the correct electron-rebuild version is used:
pi@mirror-eg:~/MagicMirror/modules/MMM-Buttons $ npm install > Magic-Mirror-Module-Buttons@1.0.0 postinstall > ./postinstall /home/pi/MagicMirror/modules/MMM-Buttons ⠋ Searching dependency tree electron-rebuild rebuilding with args: [Arguments] { '0': { buildPath: '/home/pi/MagicMirror/modules/MMM-Buttons', electronVersion: '22.0.0', arch: 'arm', extraModules: [], onlyModules: null, force: undefined, headerURL: undefined, types: [ 'prod', 'optional' ], mode: undefined, debug: undefined, prebuildTagPrefix: 'v', forceABI: undefined, useElectronClang: false, disablePreGypCopy: false, projectRootPath: '/home/pi/MagicMirror/modules/MMM-Buttons' } } +0ms electron-rebuild rebuilding with args: /home/pi/MagicMirror/modules/MMM-Buttons 22.0.0 arm Set(0) {} false https://www.electronjs.org/headers [ 'prod', 'optional' ] false +8ms electron-rebuild exploring /home/pi/MagicMirror/modules/MMM-Buttons/node_modules/onoff +0ms electron-rebuild exploring /home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll +4ms electron-rebuild exploring /home/pi/MagicMirror/modules/MMM-Buttons/node_modules/lodash.debounce +1ms electron-rebuild exploring /home/pi/MagicMirror/modules/MMM-Buttons/node_modules/bindings +2ms electron-rebuild exploring /home/pi/MagicMirror/modules/MMM-Buttons/node_modules/nan +1ms electron-rebuild exploring /home/pi/MagicMirror/modules/MMM-Buttons/node_modules/file-uri-to-path +1ms electron-rebuild identified prod deps: Set(0) { onoff: true, epoll: true, 'lodash.debounce': true, bindings: true, nan: true, 'file-uri-to-path': true } +1ms electron-rebuild scanning: /home/pi/MagicMirror/modules/MMM-Buttons/node_modules +5ms electron-rebuild rebuilding epoll with args [ 'node', 'node-gyp', 'rebuild', '--runtime=electron', '--target=22.0.0', '--arch=arm', '--dist-url=https://www.electronjs.org/headers', '--build-from-source', '--verbose' ] +0ms gyp verb command rebuild [] gyp verb command clean [] gyp verb clean removing "build" directory ⠙ Building module: epoll, Completed: 0gyp verb command configure [] gyp verb download using dist-url https://www.electronjs.org/headers gyp verb find Python Python is not set from command line or npm configuration gyp verb find Python Python is not set from environment variable PYTHON gyp verb find Python checking if "python3" can be used gyp verb find Python - executing "python3" to get executable path ⠹ Building module: epoll, Completed: 0gyp verb find Python - executable path is "/usr/bin/python3" gyp verb find Python - executing "/usr/bin/python3" to get version ⠸ Building module: epoll, Completed: 0gyp verb find Python - version is "3.7.3" gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3" gyp verb get node dir compiling against --target node version: 22.0.0 gyp verb command install [ '22.0.0' ] gyp verb download using dist-url https://www.electronjs.org/headers gyp verb install input version string "22.0.0" gyp verb install installing version: 22.0.0 gyp verb install --ensure was passed, so won't reinstall if already installed ⠼ Building module: epoll, Completed: 0gyp verb install version is already installed, need to check "installVersion" gyp verb got "installVersion" 9 gyp verb needs "installVersion" 9 gyp verb install version is good gyp verb get node dir target node version installed: 22.0.0 gyp verb build dir attempting to create "build" dir: /home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build gyp verb build dir "build" dir needed to be created? Yes gyp verb python symlink creating symlink to "/usr/bin/python3" at "/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build/node_gyp_bins/python3" gyp verb build/config.gypi creating config file gyp verb build/config.gypi writing out config file: /home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build/config.gypi gyp verb config.gypi checking for gypi file: /home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/config.gypi gyp verb common.gypi checking for gypi file: /home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/common.gypi gyp verb gyp gyp format was not specified; forcing "make" gyp info spawn /usr/bin/python3 gyp info spawn args [ gyp info spawn args '/home/pi/MagicMirror/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/home/pi/MagicMirror/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/home/pi/.electron-gyp/22.0.0/include/node/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/home/pi/.electron-gyp/22.0.0', gyp info spawn args '-Dnode_gyp_dir=/home/pi/MagicMirror/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/home/pi/.electron-gyp/22.0.0/<(target_arch)/node.lib', gyp info spawn args '-Dmodule_root_dir=/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' gyp info spawn args ] ⠙ Building module: epoll, Completed: 0gyp verb command build [] gyp verb build type Release gyp verb architecture armv7l gyp verb node dev dir /home/pi/.electron-gyp/22.0.0 gyp verb `which` succeeded for `make` /usr/bin/make gyp verb bin symlinks adding symlinks (such as Python), at "/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build/node_gyp_bins", to PATH gyp info spawn make gyp info spawn args [ 'V=1', 'BUILDTYPE=Release', '-C', 'build' ] make: Verzeichnis „/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build“ wird betreten g++ -o Release/obj.target/epoll/src/epoll.o ../src/epoll.cc '-DNODE_GYP_MODULE_NAME=epoll' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-DELECTRON_ENSURE_CONFIG_GYPI' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DUSING_ELECTRON_CONFIG_GYPI' '-DV8_COMPRESS_POINTERS' '-DV8_COMPRESS_POINTERS_IN_SHARED_CAGE' '-DV8_ENABLE_SANDBOX' '-DV8_31BIT_SMIS_ON_64BIT_ARCH' '-D__STDC_FORMAT_MACROS' '-DOPENSSL_NO_PINSHARED' '-DOPENSSL_THREADS' '-DOPENSSL_NO_ASM' '-DBUILDING_NODE_EXTENSION' -I/home/pi/.electron-gyp/22.0.0/include/node -I/home/pi/.electron-gyp/22.0.0/src -I/home/pi/.electron-gyp/22.0.0/deps/openssl/config -I/home/pi/.electron-gyp/22.0.0/deps/openssl/openssl/include -I/home/pi/.electron-gyp/22.0.0/deps/uv/include -I/home/pi/.electron-gyp/22.0.0/deps/zlib -I/home/pi/.electron-gyp/22.0.0/deps/v8/include -I../../nan -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -Wno-deprecated-declarations -Wno-cast-function-type -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++17 -MMD -MF ./Release/.deps/Release/obj.target/epoll/src/epoll.o.d.raw -std=c++17 -c ⠴ Building module: epoll, Completed: 0In file included from /home/pi/.electron-gyp/22.0.0/include/node/v8-local-handle.h:12, from /home/pi/.electron-gyp/22.0.0/include/node/v8-array-buffer.h:12, from /home/pi/.electron-gyp/22.0.0/include/node/v8.h:24, from ../src/epoll.cc:11: /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:124:62: warning: left shift count >= width of type [-Wshift-count-overflow] constexpr size_t kPtrComprCageReservationSize = size_t{1} << 32; ^~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:124:59: error: right operand of shift expression ‘(1 << 32)’ is >= than the precision of the left operand [-fpermissive] constexpr size_t kPtrComprCageReservationSize = size_t{1} << 32; ~~~~~~~~~~^~~~~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:125:60: warning: left shift count >= width of type [-Wshift-count-overflow] constexpr size_t kPtrComprCageBaseAlignment = size_t{1} << 32; ^~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:125:57: error: right operand of shift expression ‘(1 << 32)’ is >= than the precision of the left operand [-fpermissive] constexpr size_t kPtrComprCageBaseAlignment = size_t{1} << 32; ~~~~~~~~~~^~~~~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:128:27: error: static assertion failed: Pointer compression can be enabled only for 64-bit architectures kApiSystemPointerSize == kApiInt64Size, ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:186:38: warning: conversion from ‘long long unsigned int’ to ‘size_t’ {aka ‘unsigned int’} changes value from ‘1099511627776’ to ‘0’ [-Woverflow] constexpr size_t kSandboxSize = 1ULL << kSandboxSizeLog2; ~~~~~^~~~~~~~~~~~~~~~~~~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:204:50: warning: conversion from ‘long long unsigned int’ to ‘size_t’ {aka ‘unsigned int’} changes value from ‘34359738368’ to ‘0’ [-Woverflow] constexpr size_t kSandboxGuardRegionSize = 32ULL * GB; ~~~~~~^~~~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:220:56: warning: conversion from ‘long long unsigned int’ to ‘size_t’ {aka ‘unsigned int’} changes value from ‘8589934592’ to ‘0’ [-Woverflow] constexpr size_t kSandboxMinimumReservationSize = 8ULL * GB; ~~~~~^~~~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:230:60: warning: conversion from ‘long long unsigned int’ to ‘size_t’ {aka ‘unsigned int’} changes value from ‘34359738367’ to ‘4294967295’ [-Woverflow] constexpr size_t kMaxSafeBufferSizeForSandbox = 32ULL * GB - 1; ~~~~~~~~~~~^~~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:231:44: error: static assertion failed: The maximum allowed buffer size must not be larger than the sandbox's guard regions static_assert(kMaxSafeBufferSizeForSandbox <= kSandboxGuardRegionSize, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:236:48: error: static assertion failed: The maximum size of a BoundedSize must be synchronized with the kMaxSafeBufferSizeForSandbox static_assert(1ULL << (64 - kBoundedSizeShift) == ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ kMaxSafeBufferSizeForSandbox + 1, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:260:56: error: static assertion failed: kExternalPointerTableReservationSize and kExternalPointerIndexShift don't match static_assert((1 << (32 - kExternalPointerIndexShift)) == kMaxExternalPointers, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ ⠴ Building module: epoll, Completed: 0make: *** [epoll.target.mk:129: Release/obj.target/epoll/src/epoll.o] Fehler 1 make: Verzeichnis „/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build“ wird verlassen ✖ Rebuild Failed An unhandled error occurred inside electron-rebuild node-gyp failed to rebuild '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll'. For more information, rerun with the DEBUG environment variable set to "electron-rebuild". Error: `make` failed with exit code: 2 Error: node-gyp failed to rebuild '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll'. For more information, rerun with the DEBUG environment variable set to "electron-rebuild". Error: `make` failed with exit code: 2 at NodeGyp.rebuildModule (/home/pi/MagicMirror/node_modules/electron-rebuild/lib/src/module-type/node-gyp.js:120:19) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async ModuleRebuilder.rebuildNodeGypModule (/home/pi/MagicMirror/node_modules/electron-rebuild/lib/src/module-rebuilder.js:98:9) at async ModuleRebuilder.rebuild (/home/pi/MagicMirror/node_modules/electron-rebuild/lib/src/module-rebuilder.js:128:14) at async Rebuilder.rebuildModuleAt (/home/pi/MagicMirror/node_modules/electron-rebuild/lib/src/rebuild.js:149:13) at async Rebuilder.rebuild (/home/pi/MagicMirror/node_modules/electron-rebuild/lib/src/rebuild.js:112:17) at async /home/pi/MagicMirror/node_modules/electron-rebuild/lib/src/cli.js:158:9 npm ERR! code 255 npm ERR! path /home/pi/MagicMirror/modules/MMM-Buttons npm ERR! command failed npm ERR! command sh -c ./postinstall npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2023-01-07T11_55_30_111Z-debug-0.logEdit: I will try to re-setup my mirror today to make sure no old things are messing up the installation but it will take a moment.
-
RE: electron-rebuild problems with MagicMirror 2.22.0
@sdetweil Sorry, had no Internet connection for a few hours.
The version of my GPIO module in the development branch uses the postinstall script and there is where the error happens.
It is a Raspberry 4 in my case with 32bit Bullseye.
It is
npm 9.2.0
node 16.19.0
arch armv7l
in my case. -
electron-rebuild problems with MagicMirror 2.22.0
Hi,
today i tried the new release and had the usual problems with electron-rebuild with my MMM-GPIO-Notifications module. I also tried MMM-Buttons of @sdetweil i copied his approche to handle electron-rebuild to my module some time ago.
As nearly all PIR modules will have the same issues i wanted to discuss possible solutions in public.
I use a fully patched Raspberry OS Bullseye 32Bit.
pi@mirror-eg:~ $ cd MagicMirror/modules/ pi@mirror-eg:~/MagicMirror/modules $ git clone https://github.com/sdetweil/MMM-Buttons.git Klone nach 'MMM-Buttons' ... remote: Enumerating objects: 56, done. remote: Counting objects: 100% (4/4), done. remote: Compressing objects: 100% (4/4), done. remote: Total 56 (delta 0), reused 2 (delta 0), pack-reused 52 Entpacke Objekte: 100% (56/56), Fertig. pi@mirror-eg:~/MagicMirror/modules $ cd MMM-Buttons/ pi@mirror-eg:~/MagicMirror/modules/MMM-Buttons $ npm install > Magic-Mirror-Module-Buttons@1.0.0 postinstall > ./postinstall ⠴ Building module: epoll, Completed: 0make: Verzeichnis „/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build“ wird betreten ⠦ Building module: epoll, Completed: 0 CXX(target) Release/obj.target/epoll/src/epoll.o ⠙ Building module: epoll, Completed: 0In file included from /home/pi/.electron-gyp/22.0.0/include/node/v8-local-handle.h:12, from /home/pi/.electron-gyp/22.0.0/include/node/v8-array-buffer.h:12, from /home/pi/.electron-gyp/22.0.0/include/node/v8.h:24, from ../src/epoll.cc:11: /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:124:62: warning: left shift count >= width of type [-Wshift-count-overflow] constexpr size_t kPtrComprCageReservationSize = size_t{1} << 32; ^~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:124:59: error: right operand of shift expression ‘(1 << 32)’ is >= than the precision of the left operand [-fpermissive] constexpr size_t kPtrComprCageReservationSize = size_t{1} << 32; ~~~~~~~~~~^~~~~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:125:60: warning: left shift count >= width of type [-Wshift-count-overflow] constexpr size_t kPtrComprCageBaseAlignment = size_t{1} << 32; ^~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:125:57: error: right operand of shift expression ‘(1 << 32)’ is >= than the precision of the left operand [-fpermissive] constexpr size_t kPtrComprCageBaseAlignment = size_t{1} << 32; ~~~~~~~~~~^~~~~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:128:27: error: static assertion failed: Pointer compression can be enabled only for 64-bit architectures kApiSystemPointerSize == kApiInt64Size, ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:186:38: warning: conversion from ‘long long unsigned int’ to ‘size_t’ {aka ‘unsigned int’} changes value from ‘1099511627776’ to ‘0’ [-Woverflow] constexpr size_t kSandboxSize = 1ULL << kSandboxSizeLog2; ~~~~~^~~~~~~~~~~~~~~~~~~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:204:50: warning: conversion from ‘long long unsigned int’ to ‘size_t’ {aka ‘unsigned int’} changes value from ‘34359738368’ to ‘0’ [-Woverflow] constexpr size_t kSandboxGuardRegionSize = 32ULL * GB; ~~~~~~^~~~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:220:56: warning: conversion from ‘long long unsigned int’ to ‘size_t’ {aka ‘unsigned int’} changes value from ‘8589934592’ to ‘0’ [-Woverflow] constexpr size_t kSandboxMinimumReservationSize = 8ULL * GB; ~~~~~^~~~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:230:60: warning: conversion from ‘long long unsigned int’ to ‘size_t’ {aka ‘unsigned int’} changes value from ‘34359738367’ to ‘4294967295’ [-Woverflow] constexpr size_t kMaxSafeBufferSizeForSandbox = 32ULL * GB - 1; ~~~~~~~~~~~^~~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:231:44: error: static assertion failed: The maximum allowed buffer size must not be larger than the sandbox's guard regions static_assert(kMaxSafeBufferSizeForSandbox <= kSandboxGuardRegionSize, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:236:48: error: static assertion failed: The maximum size of a BoundedSize must be synchronized with the kMaxSafeBufferSizeForSandbox static_assert(1ULL << (64 - kBoundedSizeShift) == ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ kMaxSafeBufferSizeForSandbox + 1, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/pi/.electron-gyp/22.0.0/include/node/v8-internal.h:260:56: error: static assertion failed: kExternalPointerTableReservationSize and kExternalPointerIndexShift don't match static_assert((1 << (32 - kExternalPointerIndexShift)) == kMaxExternalPointers, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ ⠹ Building module: epoll, Completed: 0make: *** [epoll.target.mk:129: Release/obj.target/epoll/src/epoll.o] Fehler 1 make: Verzeichnis „/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build“ wird verlassen ✖ Rebuild Failed An unhandled error occurred inside electron-rebuild node-gyp failed to rebuild '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll'. For more information, rerun with the DEBUG environment variable set to "electron-rebuild". Error: `make` failed with exit code: 2 Error: node-gyp failed to rebuild '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll'. For more information, rerun with the DEBUG environment variable set to "electron-rebuild". Error: `make` failed with exit code: 2 at NodeGyp.rebuildModule (/home/pi/MagicMirror/node_modules/electron-rebuild/lib/src/module-type/node-gyp.js:120:19) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async ModuleRebuilder.rebuildNodeGypModule (/home/pi/MagicMirror/node_modules/electron-rebuild/lib/src/module-rebuilder.js:98:9) at async ModuleRebuilder.rebuild (/home/pi/MagicMirror/node_modules/electron-rebuild/lib/src/module-rebuilder.js:128:14) at async Rebuilder.rebuildModuleAt (/home/pi/MagicMirror/node_modules/electron-rebuild/lib/src/rebuild.js:149:13) at async Rebuilder.rebuild (/home/pi/MagicMirror/node_modules/electron-rebuild/lib/src/rebuild.js:112:17) at async /home/pi/MagicMirror/node_modules/electron-rebuild/lib/src/cli.js:158:9 npm ERR! code 255 npm ERR! path /home/pi/MagicMirror/modules/MMM-Buttons npm ERR! command failed npm ERR! command sh -c ./postinstall npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2023-01-06T11_10_38_105Z-debug-0.log -
RE: MagicMirror Module for running a shell script
@sdetweil Just saw that I had not added any hit words and no about text to the repository. Maybe that was the reason.
-
RE: Help with MMM-EmbedURL
@TK421_VT Sorry for the late response. I will need to set up a identical environment to debug the problem. I will try to figure things out in the next days.
-
RE: MMM-SynologySurveillance
@digied Hi,
that’s definitely a error that should not happen. I will check this tomorrow.You can not add the url directly. It will be fetched from the NAS.
But I am pretty sure that either your port or protocol setting is wrong. The default protocol is
httpwith port5000. If you access the NAS with protocolhttpsit is port5001usually.Can you please try the following config:
{ module: "MMM-SynologySurveillance", position: "top_left", config: { showOneBig: true, addBigToNormal: false, showCamName: false, showBigCamName: false, showUnreachableCams: true, showPositions: true, showBigPositions: true, vertical: true, ds: [ { protocol: "http", host: "192.168.2.26", port: "5000", user: "ewalstra", password: "*********", replaceHostPart: true, cams: [ { alias: "Voordeur", name: "Generic_ONVIF-001", } ] }, ], }, },Edit: I released a new version of the module is was working on the last weeks which improves the error handling. Please use the new version to avoid already fixed problems. I also added more examples to the README to make things about the protocols and ports clearer.
-
RE: MagicMirror Module for running a shell script
@Human99 Hi,
you can use my MMM-TouchButton module for this job.
-
RE: MMM-Screencast window not closing after disconnecting
-
RE: Help with MMM-EmbedURL
@TK421_VT Hi,
that’s weird.
Do you still have Webview enabled in the config with:electronOptions: { webPreferences: { webviewTag: true, } }, -
RE: Title of two modules in one line
Hi,
sorry for my unprecise description. I meant adding the the
justify-content: flex-end;additionally. The whole CSS settings need to look like the following:.MMM-DWD-WarnWeather .wrapper { display: flex; flex-direction: column; align-items: flex-start; width: 320px; gap: 5px; } .MMM-DWD-WarnWeather .warning { width: 100%; display: flex; flex-direction: row; gap: 10px; margin-bottom: 0px; justify-content: flex-end; } .MMM-DWD-WarnWeather .status { width: 100%; text-align: right; margin-top: 0px; } .MMM-DWD-WarnWeather .description { padding-left: 0px; margin-left: 0px; } .MMM-DWD-WarnWeather .small-icon{ float: unset; zoom: unset; -moz-transform: unset; -moz-transform-origin: unset; width: 46px; height: 46px; position: relative; } -
RE: MMM-EmbedURL Not showing full webpage
@plainbroke You will need a external tool like ffmpeg or vlc to convert the stream.
I wrote a small wrapper that calls vlc with the necessary parameters. You can find it here.
There are other tutorials using a docker containter, too. For me this one was the most effective one.
Be aware that the conversion cost a lot of cpu power. Some users had problems running the converter on the same Pi as the mirror is running on.You then can embed the Stream with this module using the setting
embedElementType: "img"or you can use my MMM-SynologySurveillance which supports mjpeg since the last version. -
RE: MMM-EmbedURL Not showing full webpage
@plainbroke Hi, sorry but as no browser supports RTSP nativ at the moment you can not embed it directly.
You will need to convert Rtsp to MPJPEG then it can be embedded.
-
RE: Help with MMM-EmbedURL
@TK421_VT Hi,
your config looks good.
There is one last thing we can try. Can you please use your IP address (the one of the Pi) instead oflocalhostat theaddresssetting.You can get your IP either by hovering over the network icon in the top right corner of the screen or by entering
ip ain the shell.
I had this changed for some other modules in my config cause of Cross-Origin problems and it is the only thing that is different in my setup.
-
RE: Help with MMM-EmbedURL
@TK421_VT Hi,
i setup a quick dev environment and tried to add the URL. You are right the page forbids embedding.
If a activate the Requestly extension in my Firefox and remove the response headers “X-Frame-Options”, “Content-Security-Policy”, “X-Content-Security-Policy” the site can be embedded. I am pretty sure if you follow the instructions in this tutorial you can embed the site into a MagicMirror instance that is running in server mode and is displayed within Firefox or Chrome.The question is if you are running MagicMirror in sever mode and display it in a local browser. If not you use the electron browser and you do not need any extensions but can use
webviewto embed the site.
You will need to enablewebviewin the electronOptions as described in the Readme of the module and you need to setembedElementType: "webview"in the module configuration.