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

Calendar only showing loading #70

Open
KoboseHome opened this issue Aug 22, 2024 · 5 comments
Open

Calendar only showing loading #70

KoboseHome opened this issue Aug 22, 2024 · 5 comments

Comments

@KoboseHome
Copy link

I installed MMM-GoogleCalendar a couple of days ago, and have slowly been working through setup issues using my pi zero w. So far I have been able to see that the google account was authorized (I got 10 upcoming events when authorizing). I also resolved issues seen in the pm logs relating to not having the right calendar ID (I would recommend adding more details in the read me regarding adding the full calendar domain when putting the ID). After resolving these issues I am not seeing any more errors in the pm logs, but the module still shows loading regardless of how long I wait or reboot the device. I have manually looked through the pm2 logs (MagicMirror-error.log MagicMirror-out.log) and did not see any errors pop up when starting. I did try the pm2 restart mm followed by pm2 logs mm and was not getting new logs (likely since the pm2 restart mm failed with this error [PM2][ERROR] Process or Namespace mm not found).

Do you have any other recommendations for where to look for issues? I am slowly picking up linux/raspberry pi/MM programing but am still very green as it has been a while since the last time I was coding in linux consistently.

@mtitus83
Copy link

mtitus83 commented Aug 23, 2024

Same here, stuck at "Loading ...". There are a few things I noticed that are worth reporting as well; mostly just repeat of @KoboseHome .

The first thing I noticed is that node authorize.js was unhappy and threw and error; I'm unable to reproduce this to show it but I can tell you that it basically said that token.js was missing. But after authenticating it spit out this.

MMM-GoogleCalendar: Upcoming 10 events:
2024-09-28T19:00:00-04:00 - Meeting

So, I'm using "calendar-week" and whats odd is that ^ event is about 2 weeks away. I have events on my calendar for this week in that specific calendar that I would expect to see. I'm not sure if that output should show all 10 events or not but as you can see there's several upcoming events on my calendar. I think this is enough evidence to show that I'm authenticating and pulling calendar entries.

I attached a clip of my mm error log log-sanitized.txt which I believe to be the error. I can confirm that the Google Calendar ID is correct (as above) for obvious reasons I have masked that and the Bearer Token with '_REDACTED_' in the log.

I'll spend a little bit longer investigating just for kicks, I only know enough to be dangerous though.
log-sanitized.txt

@mtitus83
Copy link

I"m dumb - it works. I misunderstood the directions and excluded @group.calendar.google.com from my calendar ID. I'll leave this for posterity so anyone else failing to follow directions can find it :)

@KoboseHome
Copy link
Author

I do have an update on this. The display will show everything in the calendar after 1 reset a day. Every other reset of the raspberry pi, or of MagicMirror, the calendar only shows loading. I was thinking it could be related to API settings limiting the responses to once a day, so I made a change on the google account, however that did not seem to resolve the issue immediately. I also was able to get the pm2 logs (I replaced mm with MagicMirror), but they do not show any errors. I also continue to get meeting info when I run node authorize.js, regardless of if they are showing on the dashboard or not.

@randomBrainstormer
Copy link
Owner

Hi @KoboseHome, thanks for the detailed update! When you mention 'reset,' could you clarify whether you're referring to rebooting the Raspberry Pi, restarting MagicMirror, or something else? If you're restarting the Pi, it's possible that the Google API might be failing to authenticate again, which could cause the module to get stuck on 'loading.'

To troubleshoot further, I’d recommend checking the browser console for any errors when the calendar is stuck on loading. You can do this by connecting a monitor to your Pi and opening the browser console (usually with F12). This might provide more insight into what’s going wrong.

Additionally, if the issue persists, try looking deeper into the logs right after a fresh start to see if there’s any unusual activity or failed API requests. Since you've made changes to the API settings, make sure the credentials and tokens are still valid after each reboot.

Let me know if you find anything new, or if you need more help!

@randomBrainstormer
Copy link
Owner

I’ve pushed an update based on the error log attached by @mtitus83 to make the initial error log even more explicit. Thanks for bringing this to my attention!

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