• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Calendar Module - Unable to load Facebook Birthdays

Scheduled Pinned Locked Moved Solved Troubleshooting
29 Posts 7 Posters 22.5k Views 5 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    KirAsh4 Moderator
    last edited by May 25, 2016, 2:00 AM

    For those of you who are having issues with your Facebook Birthdays calendar … if any of you want to PRIVATELY send me your actual link, I will stick it in my config and see what happens. Presumably it will fail the same way it is for you guys, but at least I’ll have something to test against since mine are working just fine. I don’t have a failed test case … I promise not to sell your information.

    A Life? Cool! Where can I download one of those from?

    1 Reply Last reply Reply Quote 0
    • S Offline
      squidsmarks
      last edited by May 25, 2016, 3:19 AM

      I think we sold our information the moment we signed up to Facebook. Happy to send you the link and see what happens.

      1 Reply Last reply Reply Quote 0
      • K Offline
        KirAsh4 Moderator
        last edited by May 25, 2016, 3:24 AM

        I have Robby’s at the moment, trying to recreate the problem.

        A Life? Cool! Where can I download one of those from?

        1 Reply Last reply Reply Quote 0
        • K Offline
          KirAsh4 Moderator
          last edited by KirAsh4 May 25, 2016, 6:42 AM May 25, 2016, 6:29 AM

          Or maybe it’s because I’m trying to debug from the command line … as always …

          Looks like Facebook is returning an ‘unsupported browser’ page when we try to fetch the data. Well aren’t they clever. Time to do some code massaging …

          A Life? Cool! Where can I download one of those from?

          1 Reply Last reply Reply Quote 0
          • K Offline
            KirAsh4 Moderator
            last edited by May 25, 2016, 5:51 PM

            So here’s the fun part … mine was working. Because I hadn’t gone a 'git pull' in a while on my dev tree, so I never saw the change. Now that I am current, it’s not working. So, none of you are any more crazy than we all are, it really isn’t working. I’m running some debugging and trying to figure out where and why it’s failing.

            A Life? Cool! Where can I download one of those from?

            R 1 Reply Last reply May 25, 2016, 7:31 PM Reply Quote 0
            • R Offline
              robbythedude @KirAsh4
              last edited by May 25, 2016, 7:31 PM

              @KirAsh4 said in Calendar Module - Unable to load Facebook Birthdays:

              So here’s the fun part … mine was working. Because I hadn’t gone a 'git pull' in a while on my dev tree, so I never saw the change. Now that I am current, it’s not working. So, none of you are any more crazy than we all are, it really isn’t working. I’m running some debugging and trying to figure out where and why it’s failing.

              We’ll have to recruit more QA peeps for future commits! :P haha

              1 Reply Last reply Reply Quote 0
              • K Offline
                KirAsh4 Moderator
                last edited by KirAsh4 May 25, 2016, 7:48 PM May 25, 2016, 7:41 PM

                Yeah, not as easy as it sounds. For those who enjoy seeing the nitty gritty, this is what happens with the various calendar payloads and you can clearly see the FB one failing:

                0_1464205641397_huh.png

                Working on trying to figure out why since it does work from the command line, but not in browser.

                A Life? Cool! Where can I download one of those from?

                R 1 Reply Last reply May 25, 2016, 7:43 PM Reply Quote 0
                • R Offline
                  robbythedude @KirAsh4
                  last edited by May 25, 2016, 7:43 PM

                  @KirAsh4 said in Calendar Module - Unable to load Facebook Birthdays:

                  Yeah, not as easy as it sounds. For those who enjoy seeing the nitty gritty, this is what happens with the various calendar payloads and you can clearly see the FB one failing:

                  Working on trying to figure out why since it does work from the command line, but not in browser.

                  What is the tool you’re using in that screenshot to test this out?

                  1 Reply Last reply Reply Quote 0
                  • K Offline
                    KirAsh4 Moderator
                    last edited by May 25, 2016, 7:50 PM

                    Firebug extension in Firefox. Though most browsers have a basic console output if you just hit F12. And the data that you see there is normally not visible. I added those output streams in my dev tree so I can see what’s going on.

                    A Life? Cool! Where can I download one of those from?

                    1 Reply Last reply Reply Quote 0
                    • K Offline
                      KirAsh4 Moderator
                      last edited by May 27, 2016, 6:22 PM

                      Ok, I need some testers … this is working for me with a small change in our fetcher code. So, for those willing to try, please following these steps:

                      Step 1
                      Navigate to the 'MagicMirror/modules/default/calendar/' folder

                      Step 2
                      Open the 'calendarfetcher.js' file in your favorite editor and look for the following line and delete it:

                      ical.fromURL(url, {}, function(err, data) {
                      

                      Step 3
                      After deleting that line, in its place you’re going to paste in the following snippet of code:

                          var opts = {
                              headers: {
                                  'User-Agent': 'Mozilla/5.0 (Node.js 6.0.0) MagicMirror/2.0 (https://github.com/MichMich/MagicMirror)'
                              }
                          }
                          ical.fromURL(url, opts, function(err, data) {
                      

                      Please note that very last line, it’s almost identical to the one you deleted. Only one piece changed and you must put that line in as modified above!

                      Step 4
                      Save and close the file, and relaunch your MM process.

                      Step 5
                      Report back to me.

                      On my setup, it’s working. I’m getting this in my calendar now. (The names you see are birthdays, I simply have a filter to remove 's birthday' form the string that Facebook returns.)

                      0_1464373194299_bdays.png

                      A Life? Cool! Where can I download one of those from?

                      R 1 Reply Last reply May 28, 2016, 2:01 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 2 / 3
                      2 / 3
                      • First post
                        11/29
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy