Read the statement by Michael Teeuw here.
Error Running Magic Mirror on Google Compute
-
I want to run MM2 on google compute engine jessie so multiple clients can access it as a website… I seem to have it running minus the ip whitelist isn’t working…
i pasted
ipWhitelist: ["::fff:0.0.0.0/1", "::fff:128.0.0.0/2", "::fff:192.0.0.0/3", "::fff:224.0.0.0/4", "127.0.0.1", "::ffff:127.0.0.1", "::1"],
into the config… It runs the node serveronly fine , but displays
This device is not allowed to access your mirror.
Please check your config.js or config.js.sample to change this.admin@magicmirror:~/MagicMirror$ node serveronly/ Starting MagicMirror: v2.1.0 Loading config ... WARNING! Could not load config file. Starting with default configuration. Error found: TypeError: Object # has no method 'accessSync' Loading module helpers ... No helper found for module: updatenotification. No helper found for module: helloworld. All module helpers loaded. Starting server op port 8080 ... Server started ... Sockets connected & modules started ... Ready to go! Please point your browser to: http://localhost:8080 Access denied to IP address: my.home.ip.here
any ideas or is there any way to disable whitelisting completely?
-
Apologies for bumping an old topic but I have the same issue here. I flashed a new sd card this weekend and set up MM2 again. My MM2 works fine in normal mode(electron) but if I get this error when running only the server.
WARNING! Could not load config file. Starting with default configuration. Error found: TypeError: Object # has no method 'accessSync'
@onetwankyfive Were you able to get around this problem?
-
@d3r This whitelist configuration is a bit dependent upon your network. If you have a router that assigns a different IP address, then this won’t work. For example, my Netgear Nighthawk router assigns IP addresses in the 10.0.0.X range, which are not covered by this whitelist. You’ll need to add values that represent your specific network. Otherwise, you can use
[ ]
to allow everyone to see your mirror interface.In windows, open up a command prompt by clicking on the Start Button and then typing
cmd
in the search bar. Click on the first result and you’ll get a command prompt. Enteripconfig
and it will respond with your IP address. Take that IP address and add it to your whitelist value in yourconfig.js
. If you want to authorize every machine on your network, replace the final value in that ip address with 0 and add “/24”. In my case, it’s10.0.0.0/24
. In most other networks, it will be192.168.0.0/24
. That should allow any device on your local network the ability to view the Mirror by browsing to its IP address.If you’re using Ubuntu or some other flavor of UNIX,
ctrl+alt+t
will get you a command prompt. The command in UNIX isifconfig
, notipconfig
. Don’t ask, because I don’t know why. -
@bhepler Hey, thanks for your reply. I don’t see how changing the whitelist would do anything since the whitelist is located in the config and the config can’t be loaded in server only. I could be mistaken. I think my issue is a bit different. I should have expanded more. I’m on a pi3 and I’m running the code on the same pi.
This is when I run node server only::~/MagicMirror $ node serveronly Starting MagicMirror: v2.1.1 Loading config ... ***WARNING! Could not load config file. Starting with default configuration. Error found: TypeError: Object # has no method 'accessSync'*** Loading module helpers ... No helper found for module: updatenotification. No helper found for module: helloworld. All module helpers loaded. Starting server on port 8080 ... Starting server op port 8080 ... Server started ... Sockets connected & modules started ... Ready to go! Please point your browser to: http://localhost:8080
and when I run npm start it does find the config which I find very strange.
~/MagicMirror $ npm start > magicmirror@2.1.1 start /home/drpi1/MagicMirror > sh run-start.sh Starting MagicMirror: v2.1.1 Loading config ... Loading module helpers ... No helper found for module: alert. No helper found for module: clock. No helper found for module: calendar_monthly. Initializing new module helper ... Module helper loaded: calendar Initializing new module helper ... Module helper loaded: MMM-Wunderlist-Enhanced Initializing new module helper ... Module helper loaded: MMM-GarminActivities No helper found for module: MMM-doomsDay. Initializing new module helper ... Module helper loaded: newsfeed Initializing new module helper ... Module helper loaded: MMM-WunderGround Initializing new module helper ... Module helper loaded: MMM-Strava Initializing new module helper ... Module helper loaded: MMM-Remote-Control No helper found for module: MMM-iFrameReload. No helper found for module: MMM-iFrame. Initializing new module helper ... Module helper loaded: MMM-Readfile No helper found for module: MMM-Carousel. All module helpers loaded. Starting server on port 8080 ... Starting server op port 8080 ... Server started ... Connecting socket for: calendar Starting node helper for: calendar Connecting socket for: MMM-Wunderlist-Enhanced Connecting socket for: MMM-GarminActivities Starting node helper for: MMM-GarminActivities Connecting socket for: newsfeed Starting module: newsfeed Connecting socket for: MMM-WunderGround MMM-WunderGround helper started ... Connecting socket for: MMM-Strava Starting module: MMM-Strava Connecting socket for: MMM-Remote-Control Starting node helper for: MMM-Remote-Control Connecting socket for: MMM-Readfile Staring module helper: MMM-Readfile Sockets connected & modules started ... Launching application.
-
@d3r That’s really curious. Because I do not have that problem with
node serveronly
.node serveronly Starting MagicMirror: v2.1.1 Loading config ... Loading module helpers ... No helper found for module: alert. Initializing new module helper ... Module helper loaded: updatenotification No helper found for module: clock. No helper found for module: MMM-Globe. All module helpers loaded. Starting server on port 8080 ... Starting server op port 8080 ... Server started ... Connecting socket for: updatenotification Sockets connected & modules started ... Ready to go! Please point your browser to: http://localhost:8080
It looks like you are running two different mirrors on that box. The list of modules loaded in each case is different. I think you’re logged in as different users, so the
~
folder is going to point to different spots.What do you get in return when you run
ls -lh /home/
? -
@bhepler said in Error Running Magic Mirror on Google Compute:
@d3r That’s really curious. Because I do not have that problem with node serveronly.
I used to run node serveronly fine too. Then last week my sd card starting showing signs that it would die soon. So, I flashed raspbian on a new sd card and started fresh.
~ $ ls -lh /home/ total 4.0K drwxr-xr-x 32 drpi1 drpi1 4.0K May 22 14:59 drpi1
I have the default pi user deleted for security reasons. That’s the only thing I did different on this card.
I think the list is different because it fails to load the config in node serveronly so the modules that are supposed to run do not. -
@d3r Well, there goes that theory.
At this point, all I can think of is a permissions problem. What doesls -lh ~/MagicMirror/config
get you? -
:~ $ ls -lh ~/MagicMirror/config total 24K -rw-r--r-- 1 drpi1 drpi1 7.7K May 21 18:00 configglobetest.js -rw-r--r-- 1 drpi1 drpi1 8.3K May 22 16:42 config.js -rw-r--r-- 1 drpi1 drpi1 1.6K May 21 02:28 config.js.sample
I