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

Error adding a new/changing old Memo #9

Open
Snille opened this issue Oct 7, 2017 · 7 comments
Open

Error adding a new/changing old Memo #9

Snille opened this issue Oct 7, 2017 · 7 comments

Comments

@Snille
Copy link
Contributor

Snille commented Oct 7, 2017

I have been using the module for some time. But now I keep getting this error in the pm2 log.
I'm on MagicMirror 2.2.0-dev (latest dev version on a RPi3).

This I get when I try to add to a Memo.

0|mm       | [11:11:13 PM] TypeError: Cannot read property 'push' of undefined
0|mm       |     at Class.storeMemos (/home/pi/MagicMirror/modules/MMM-Memo/node_helper.js:106:13)
0|mm       |     at expressApp.get (/home/pi/MagicMirror/modules/MMM-Memo/node_helper.js:45:10)
0|mm       |     at Layer.handle [as handle_request] (/home/pi/MagicMirror/node_modules/express/lib/router/layer.js:95:5)
0|mm       |     at next (/home/pi/MagicMirror/node_modules/express/lib/router/route.js:137:13)
0|mm       |     at Route.dispatch (/home/pi/MagicMirror/node_modules/express/lib/router/route.js:112:3)
0|mm       |     at Layer.handle [as handle_request] (/home/pi/MagicMirror/node_modules/express/lib/router/layer.js:95:5)
0|mm       |     at /home/pi/MagicMirror/node_modules/express/lib/router/index.js:281:22
0|mm       |     at Function.process_params (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:335:12)
0|mm       |     at next (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:275:10)
0|mm       |     at jsonParser (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_modules/body-parser/lib/types/json.js:103:7)

And this when trying to change one.

0|mm       | [11:11:20 PM] TypeError: Cannot read property 'length' of undefined
0|mm       |     at Class.removeMemos (/home/pi/MagicMirror/modules/MMM-Memo/node_helper.js:124:32)
0|mm       |     at expressApp.get (/home/pi/MagicMirror/modules/MMM-Memo/node_helper.js:67:13)
0|mm       |     at Layer.handle [as handle_request] (/home/pi/MagicMirror/node_modules/express/lib/router/layer.js:95:5)
0|mm       |     at next (/home/pi/MagicMirror/node_modules/express/lib/router/route.js:137:13)
0|mm       |     at Route.dispatch (/home/pi/MagicMirror/node_modules/express/lib/router/route.js:112:3)
0|mm       |     at Layer.handle [as handle_request] (/home/pi/MagicMirror/node_modules/express/lib/router/layer.js:95:5)
0|mm       |     at /home/pi/MagicMirror/node_modules/express/lib/router/index.js:281:22
0|mm       |     at Function.process_params (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:335:12)
0|mm       |     at next (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:275:10)
0|mm       |     at jsonParser (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_modules/body-parser/lib/types/json.js:103:7)

I also see that the module don't create the MMM-Memo.josn file (at least it's not present in the MMM-Memo folder any longer.

This is my MMM-Memo part of my config:

		{
			module: "MMM-Memo",
			position: "upper_third",
			classes: "default everyone",
			config: {
				memoTitle: "flyginformation",
				memoDisplayIfEmpty: false,
				memoRotation: -4,
				format: "YYYY-MM-DD - HH:mm",
				memoWidth: 500,
				memoHeight: 500,
				memoDisplayHeader: true,
				memoDisplayDuration: true,
				memoDisplayId: true,
				memoColorBackground: "LightGoldenrod",
				memoDisplayNotification: true,
			}
		},

This is the URL:s I'm trying to execute,

  1. Add infomration (this is used several times adding multiple items to the list with altered information).
http://10.0.0.112:8080/AddMemo?memoTitle=flyginformation&item=SAS%20%23189%20%20lämnade%20ARN%20%20vid%2018%3A13%20mot%20AGH%20%20ankommer%2018%3A58&level=INFO

Response in the web browser looks ok, memo shows up (but I get the first error in the pm2 log):

{"status":"success","item":{"memoTitle":"flyginformation","level":"INFO","item":"SAS #189  lämnade ARN  vid 18:13 mot AGH  ankommer 18:58","timestamp":"2017-10-07T21:28:40.921Z"}}

And...
2. Remove item 1.

http://10.0.0.112:8080/RemoveMemo?memoTitle=flyginformation&item=1

Nothing happens on the memo but I get this in the web browser (I get the second error in the pm2 log):

{"status":"success","payload":{"memoTitle":"flyginformation","item":"1"}}

Then last...
3. Delete the memo.

http://10.0.0.112:8080/RemoveMemo?memoTitle=flyginformation&item=ALL

Response in the web browser looks ok (but I get the second error in the pm2 log):

{"status":"success","payload":{"memoTitle":"flyginformation","item":"ALL"}}

Funny thing is that the information is added to the Memo and it does show up on the mirror.
However, I can not remove an Item or delete the memo once it's there. :)
If I refresh the web browser window the whole memo is gone.

Any ideas? :)

@schnibel
Copy link
Owner

Hi @Snille,
First of all, I'm so sorry, I didn't see your message, notifications I received was in my spam folder !!!
I just updated MagicMirror to version 2.2.2, and I don't have any problem with this module.
Do you still have the problem ?

@Snille
Copy link
Contributor Author

Snille commented Feb 1, 2018

Hi! Yes, still have the problem. Have you found anything? :)

@schnibel
Copy link
Owner

schnibel commented Feb 2, 2018

Arggghhh, No, I didn't find anything because I cannot reproduce the problem.
I'm going to use the MagicMirror 2.2.0-dev branch, in order to see if I can reproduce it...
Did you try to debug it using breakpoints and so on ?

@Snille
Copy link
Contributor Author

Snille commented Feb 3, 2018

Hmm... I have not put any more time in to this actually. :) I just tried to delete and reinstall the module. Just to be sure. :) But the problem still persists. Maybe there is another module that is "breaking" yours? I'm not sure if that's even possible. :)

@Snille
Copy link
Contributor Author

Snille commented Feb 3, 2018

Hi again, I have a secondary mirror (not a real mirror, just the software running on a VM) but on that machine I do not have the same problem it seems... The one I have the problem on is the RPi3 based (real) mirror... The major difference is the CPU power and memory... The RPi is struggling quite a bit with all my modules. Maybe that's the reason? Still, the strange thing is that the "MMM-Memo.json" does not get updated on the RPi3. But it do get updated on the "VM"-one.

@schnibel
Copy link
Owner

schnibel commented Feb 3, 2018 via email

@dmartin9999
Copy link

I am also unable to remove memos using the syntax provided in README.md. Running Raspbian GNU/Linux 9 (stretch) on a Raspberry PI 3 B+

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

No branches or pull requests

3 participants