Comments (34)
Hmm, that's strange, because the syntax is correct at that location.
Can you do me a favorite and delete the module folder and reclone it from github? It won't delete any of your settings, but it might fix the issue.
from mmm-pages.
Additionally, please try updating magic mirror core if the above doesn't solve the issue. You can do so by doing git pull && npm install
while inside the magic mirror folder.
from mmm-pages.
Hi edward-shen,
thanks for your reply, deleting the MMM-pages folder and git clone from your repository didnt help.
Same error:
ERROR! Could not validate main module js file.
0|mm | /home/pi/MagicMirror/modules/MMM-pages/MMM-pages.js:162
0|mm | )), this.config.animationTime / 2);
0|mm | ^
For your second suggestion right now i dont want to update to mm 2.4.1 because of the CPU issue and the kms fake driver (which brings new problems). I am staying with MM 2.3.1.
AxLED
from mmm-pages.
I can't seem to replicate the behavior: I have a v2.3.1 working perfectly on my test instance with this module.
For now, try reverting to an older version. Go to the MMM-pages folder and type this: git reset --hard 92c4
. Does the problem still persist?
from mmm-pages.
Hi edward
I have this same issue and have had it for about 2 weeks.
Check out https://forum.magicmirror.builders/topic/8624/mmm-pages-not-able-to-get-it-to-be-consistent-all-modules-on-page-one
I'm running Stretch and MM 2.4.1
I have no errors in pm2 file but there are something in the console see attached files.
Console Pages Error.log
MagicMirror-error.log
MagicMirror-out.log
And the git reset --hard 92c4
was no help.
I hope this helps!
from mmm-pages.
Hey @GeckospotNixie, I'm really sorry that you've been having this problem for multiple weeks!
I suggested reverting to an earlier version for @Ax-LED because he's using an older version of MM, which I currently suspect that the older version of MM does not support a JS feature that a newer version of MM has.
As for your issue, it might be related to the issue posted at the end of #9.
Honestly, I have no idea why this behavior occurs with your setup, as the log files you provided show no indicator that MMM-pages is failing. I'll try to do some debugging and get back to both of you.
That being said, I'm having trouble reproducing the issue you guys have.
from mmm-pages.
@Ax-LED You said you were able to fix it after reverting to an older version? Can you please go into the MMM-pages directory and tell me the first 5 or so characters you see after running git rev-parse HEAD
?
from mmm-pages.
@GeckospotNixie Could you try disabling MMM-NOAA and tell me if the issue persists?
from mmm-pages.
Edward
Thank you for the reply!
So I'm new to MagicMirror and I guess new to Linux and Raspberry Pi.
Well I thought I knew something but this project has me thinking I'm a noob.
Ok I have done what youโre asking a number of times.
This is the strangest thing if I strip the config file so it only has the standard modules and restart I can get it to work.
So then I build up the config file with all the modules on the pages I like and it will work and I can even reboot and it will work.
But see as this is a work in progress I shut down the Pi at night.
Then when I boot it up the next day all modules are on the first page.
And I have not found out why or how to solve this.
This is the history working on your request now.
from mmm-pages.
That's fine! I'm pretty stumped on this issue as well!
Can you please try removing MMM-NOAA from your config.js? I want to make sure that that module is not causing this issue!
from mmm-pages.
Edward
For some reason it is working now.
It sat for hours with just one page and I rebooted and when I looked back its working.
At the time of the first post I did try git reset โhard 92c4
and I did not see any change I the way it was working.
So I will shut it down tonight and see how it boots in the morning.
If I have the issue in the morning I will remove NOAA from the config file.
And see if that helps.
FYI
Sorry to post here I was hoping to get in contact with oy on the MagicMirror forum.
from mmm-pages.
Edward
Last night when I said it was working it really was not.
It would switch between pages 2 and 3 and not display page 1.
NOAA was on page 2.
This morning I again had the issue all items on the first page and not switching.
I'm not sure but I think your right the NOAA module is giving issues in this setup.
So I got a console log first thing. 'Pages Error 08-30-18 09_05.log'
I changed the config file removing NOAA and it all started working.
Console log 'Pages Error 08-30-18 09_22.log'
Here is my config file now
Pages Error 08-30-18 09_05.log
Pages Error 08-30-18 09_22.log
Hope this all helps.
GeckospotNixie
from mmm-pages.
Hi Edward,
here is the response of git rev-parse HEAD
(my old, working version):
pi@raspberrypi:~/MagicMirror/modules/MMM-pages $ git rev-parse HEAD
edc1e08e65174c69db188894cd58e6e078f42716
AxLED
from mmm-pages.
Hi Edward,
i also tested reverting to the previous version you suggested git reset --hard 92c4
Didnt work either, still all modules on site on and error like in first post.
AxLED
from mmm-pages.
Hi Edward,
i have further details, the error and the behavior with all modules on default site only occurs on the display connected to pi directly. If i open MM from a webbrowser in LAN the setup of my pages is perfect.
Maybe this helps to find the error. Could it be, that electron does different interpreting vs. firefox browser on a pc?
AxLED
from mmm-pages.
Hi Edward,
i guess i found the reason, it is in the setTimeout
code.
If i change the code in MMM-pages.js (latest version) from
setTimeout(() => MM.getModules()
.withClass(this.config.modules[self.curPage])
.enumerate(module => module.show(
self.config.animationTime / 2,
{ lockString: self.identifier },
)), this.config.animationTime / 2);
to the spelling of your old (and working) version:
setTimeout(() => {
MM.getModules()
.withClass(self.config.modules[self.curPage])
.enumerate((module) => {
module.show(
self.config.animationTime / 2,
{ lockString: self.identifier }
);
});
}, this.config.animationTime / 2);
it works (on Display direct connected to pi and LAN via browser).
AxLED
from mmm-pages.
Sorry for the delay, but I've made a push now that implements your fix.
Let me know if that helps.
from mmm-pages.
Hi Edward,
unfortunatelly the fix doesnt work, same behavior like on my first post in this issue.
/home/pi/MagicMirror/modules/MMM-pages/MMM-pages.js:156
0|mm | )), this.config.animationTime / 2);
0|mm | ^
0|mm | SyntaxError: Unexpected token )
AxLED
from mmm-pages.
Hi Edward,
i guess i found the reason, it is in thesetTimeout
code.
If i change the code in MMM-pages.js (latest version) fromsetTimeout(() => MM.getModules() .withClass(this.config.modules[self.curPage]) .enumerate(module => module.show( self.config.animationTime / 2, { lockString: self.identifier }, )), this.config.animationTime / 2);
to the spelling of your old (and working) version:
setTimeout(() => { MM.getModules() .withClass(self.config.modules[self.curPage]) .enumerate((module) => { module.show( self.config.animationTime / 2, { lockString: self.identifier } ); }); }, this.config.animationTime / 2);
it works (on Display direct connected to pi and LAN via browser).
AxLED
Thank you Ax-LED! I had the same problem but this fix solved it.
from mmm-pages.
@Olli6 Hey!
Honestly I'm still pretty bugged about this change. AFAIK the only significant change is the change from self
to this
, but that shouldn't significantly change anything. Can you also do me a favor and provide your node version and magic mirror version?
from mmm-pages.
Hi! Sorry for the delay in my response. As soon as I find out how to figure out my MM version and node version I will tell you - in other words - if you can tell me how to do it I can check it for you! Sorry, I am pretty noob at this.
from mmm-pages.
Please go into a terminal on your Pi and change the directory to the location where MagicMirror resides.
Then, run the following commands:
cat package.json | grep "version"
node --version
Thanks!
from mmm-pages.
MM version 2.2.2 and node v6.12.2
from mmm-pages.
Thanks for the fast reply!
I believe this issue no longer exists on newer versions of Magic Mirror and nodejs. If you have nothing holding you back from updating (e.g. some weird module that requires an older version of magic mirror), please consider updating!
In your Magic mirror directory,
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt install -y nodejs
git pull && npm install
from mmm-pages.
same problem,
see link:
#4 (comment)
from mmm-pages.
Hi Edward,
i guess i found the reason, it is in thesetTimeout
code.
If i change the code in MMM-pages.js (latest version) fromsetTimeout(() => MM.getModules() .withClass(this.config.modules[self.curPage]) .enumerate(module => module.show( self.config.animationTime / 2, { lockString: self.identifier }, )), this.config.animationTime / 2);
to the spelling of your old (and working) version:
setTimeout(() => { MM.getModules() .withClass(self.config.modules[self.curPage]) .enumerate((module) => { module.show( self.config.animationTime / 2, { lockString: self.identifier } ); }); }, this.config.animationTime / 2);
it works (on Display direct connected to pi and LAN via browser).
AxLED
I got the same error here and Ax-LED's solution was what worked for me.
Here are my "versions":
~/MagicMirror$ cat package.json | grep "version"
"version": "2.6.0",
~/MagicMirror$ node --version
v9.11.2
Just for the record in case anyone stumble upon this :)
And Edward, thanks for the great module!!!!
from mmm-pages.
Thanks for filing a bug report. I'm surprised that the issue still exists in newer versions of MM, so I've just implemented the fix suggested by @Ax-LED, and properly credited him in the git commit.
Please let me know if the issue persists with the newest update of MMM-pages.
from mmm-pages.
I'm going to close this issue since I've implemented the fix, but please feel free to comment on this issue again if the problem persists.
from mmm-pages.
Feb 2020 and have found a module that doesn't work with MMM-pages.... MMM-GoogleTasks. Which module would this be an issue with?
from mmm-pages.
See jgauth/MMM-GoogleTasks#5, it's a problem with MMM-GoogleTasks.
(For reference, next time please create a new issue, as everyone who made a comment in this thread gets notified of a new post by default. Thanks!)
from mmm-pages.
I guess then give its been 2 years this isn't going to get fixed.
from mmm-pages.
From that post it looks like there's a fork (jayked/MMM-GoogleTasks) that supposedly fixes it. Caveat emptor, haven't tried it myself.
from mmm-pages.
OK great thanks. Just installed this version and it works :)
from mmm-pages.
Glad to be of help.
from mmm-pages.
Related Issues (20)
- Page-Duration HOT 5
- [feature request] Have the option to start (some) "fixed" modules hidden HOT 8
- [BUG] Modules disapper from pages after rotationHomePage times out HOT 4
- Pause rotation not working HOT 11
- Changing pages doesn't work - bugs in the console HOT 9
- Does this do some kind of overlay in background? HOT 8
- mmm-pages do not work with mmm-traffic HOT 7
- Cant change pages with alexa HOT 2
- currentweather only displays "loading.." HOT 2
- MMM-CalendarExt2 Page (Scene) Change Notification HOT 2
- NOOB help. MMM-Pages appears to work but I wont rotate.... it does work exactly as programmed when clicking MMM-PageIndicator buttons with mouse. HOT 4
- Using a module multiple times HOT 5
- Same module, different instance HOT 1
- Option to Make custom.css work? HOT 3
- Automatic page changes influenced by rotationDelay HOT 2
- No default weather modules are populating HOT 2
- Option to stay on hidden page even if rotationHomePage is set. HOT 1
- delete a page number with crontan HOT 1
- New Maintainer ? HOT 2
- hiddenOnStartup flag get overridden
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mmm-pages.