-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
TypeError: Cannot read properties of undefined (reading 'on') #2793
Labels
Comments
have you tried disabling your 3d party modules to see if the error goes away? |
already tried. Error stays. I have deleted and installed the software again. Now it works but I think I will see this error soon again |
Did you make a copy of config file before it went wrong if so reload old
one remove you new config file somewhere else. If you didn't make a copy of
your configuration file.
Move the copy in documents as a back up.
Now you can edit the last modules you put on even remove it completely and
see if that fixes the issue. Its always a pain when things go wrong.
I am not a coder and only know a very little about javascript so can't see
what's wrong I always go back take off what I did it usually fixes the
problem. Always make a copy of your configuration file when it's working so
you can then just replace it.
James Harris hope this is some help
…On Sat, 22 Jan 2022, 10:23 1BlauNitrox, ***@***.***> wrote:
Yesterday my mirror works without any issues. Today in the morning I
started the software and following error occures:
[22.01.2022 11:07.08.678] [ERROR] Whoops! There was an uncaught exception...
[22.01.2022 11:07.08.680] [ERROR] TypeError: Cannot read properties of undefined (reading 'on')
at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:104:5)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
The mirror is on the lastest version, because I downloaded the software
yesterday.
The Modules I have installed are:
- Spotify
- Calendar_monthly
- some default modules like weather or clock
- an own module to display my substitution plan from school
My config.js looks like this:
let config = {
address: "localhost", // 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"], // 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: "alert",
},
{
module: "clock",
position: "top_left"
},
{
module: "calendar_monthly",
position: "top_left",
},
{
module: "weather",
position: "top_right",
config: {
weatherProvider: "openweathermap",
type: "current",
location: "myCity",
locationID: "myCityID", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
apiKey: "myAPIKey"
}
},
{
module: "weather",
position: "top_right",
header: "Wettervorhersage",
config: {
weatherProvider: "openweathermap",
type: "forecast",
location: "myCity",
locationID: "myCityID", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
apiKey: "myAPIKey"
}
},
{
module: "MMM-NowPlayingOnSpotify",
position: "bottom_left",
config: {
showCoverArt: true,
clientID: "myId",
clientSecret: "mySecret",
accessToken: "myToken",
refreshToken: "myToken"
}
},
{
module: "MMM-VPlan",
position: "bottom_right",
config: {
username: "myUsername",
password: "myPassword"
}
},
]
};
The issues occurred not for the first time. Some days ago I had the same
issues and decited to delete and install the MagicMirror software again.
After this the mirror runs perfectly. Today in the morning I change one
line of code in my module: if(this.response.lenght <= 0) { to if(this.response.length
<= 0) {
Than I deleted the old module from modules folder and copyed the new one.
Now my mirror doesn`t start because of the error.
—
Reply to this email directly, view it on GitHub
<#2793>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMBWX3XODNTZM7A5HKXTBTUXKASDANCNFSM5MRYKNIQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yesterday my mirror works without any issues. Today in the morning I started the software and following error occures:
The mirror is on the lastest version, because I downloaded the software yesterday.
The Modules I have installed are:
My config.js looks like this:
The issues occurred not for the first time. Some days ago I had the same issues and decited to delete and install the MagicMirror software again. After this the mirror runs perfectly. Today in the morning I change one line of code in my module:
if(this.response.lenght <= 0) {
toif(this.response.length <= 0) {
Than I deleted the old module from modules folder and copyed the new one. Now my mirror doesn`t start because of the error.
I already wrote a forum post: https://forum.magicmirror.builders/topic/16233/error-while-starting-magic-mirror/22
The text was updated successfully, but these errors were encountered: