• 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.

MMM-FRITZ-Box-Callmonitor throws an error after enabling phonebook sync

Scheduled Pinned Locked Moved Unsolved Troubleshooting
4 Posts 4 Posters 2.7k 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
    kovu94
    last edited by kovu94 Sep 8, 2018, 12:23 PM Sep 7, 2018, 8:35 PM

    Hi there,

    I recently build up a magicmirror2 install on a raspberry Pi Zero W.
    The MM is working and now I’m playing around with modules.

    After installing the MMM-FRITZ-Box-Callmonitor module it shows incoming calls and also call history. But when I activate the phonebook sync it throws me an error on the console:

    Received config for MMM-FRITZ-Box-Callmonitor
    MMM-FRITZ-Box-Callmonitor is waiting for incoming calls.
    Starting access to FRITZ!Box...
    Whoops! There was an uncaught exception...
    TypeError: PythonShell is not a constructor
        at Class.loadDataFromAPI (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_helper.js:216:17)
        at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_helper.js:62:10)
        at Socket.<anonymous> (/home/pi/MagicMirror/modules/node_modules/node_helper/index.js:113:11)
        at emitTwo (events.js:125:13)
        at Socket.emit (events.js:213:7)
        at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:513:12
        at _combinedTickCallback (internal/process/next_tick.js:131:7)
        at process._tickCallback (internal/process/next_tick.js:180:9)
    MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
    

    The config for the module is:

    	{
    		module: "MMM-FRITZ-Box-Callmonitor",
    		position: "bottom_left",	// This can be any of the regions. Best results in left or right regions.
    		header: "Letzte Anrufe", // This is optional
    		config: {
    			showContactsStatus: "true",
    			fritzIP: "192.168.178.1",
    			showContactsStatus: "true",
    			maximumCallDistance: "9999999999",
    			username: "username",
    			password: "password",
    			debug: "true",
    			// See 'Configuration options' for more information.
    		}
    	},
    

    Where can I see the debug informations? On the MM screen I only see this:
    0_1536352119253_c946f163-3bdc-491a-9209-2de5d31e8aea-image.png
    and the sync circle is running without ending.

    The issue occures everytime I reload the MM website.

    During the install of the module I don’t get errors but I’m not that firm with linux to go deeper in the programming.

    Maybe someone can help?

    Thanks,
    kovu94

    H 1 Reply Last reply Jan 2, 2019, 9:06 AM Reply Quote 0
    • H Offline
      Hein-Jan @kovu94
      last edited by Jan 2, 2019, 9:06 AM

      @kovu94

      Although I did not have a problem with syncing, (actually I was not getting any call history) my logs gave a similar error.

      TypeError: PythonShell is not a constructor
          at Class.loadDataFromAPI (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_helper.js:216:17)
          at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_helper.js:69:9)
          at Socket.<anonymous> (/home/pi/MagicMirror/modules/node_modules/node_helper/index.js:113:11)
          at emitTwo (events.js:126:13)
          at Socket.emit (events.js:214:7)
          at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:528:12
          at _combinedTickCallback (internal/process/next_tick.js:131:7)
          at process._tickCallback (internal/process/next_tick.js:180:9)
      

      Looking for the error on internet I found some references to the PythonShell dependency that is being used. It seems that PythonShell is now running at version 1.0.7. Where it was running @ version 0.5.0 during development of the module.

      I have reverted back to 0.5.0 and things are working like they should!

      Go to cd ~/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_modules.
      Remove the Python-shell directory and all its content:
      rm python-shell -r.
      Now reinstall the old version with:
      npm install python-shell@0.5.0.

      Restart your MagicMirror and it should work.

      Al least it did for me. :smiling_face:

      Hein-Jan

      1 Reply Last reply Reply Quote 0
      • S Offline
        Sandy2503
        last edited by Jan 7, 2019, 2:04 PM

        @kovu94 - You can modify the 3 Files documented here to fix the problem

        Sandy2503

        1 Reply Last reply Reply Quote 0
        • S Offline
          satsatt
          last edited by Feb 7, 2019, 5:26 PM

          @sandy2503 said in MMM-FRITZ-Box-Callmonitor throws an error after enabling phonebook sync:

          ted

          I carefully made this corrections you suggested but now got more errors.

          
          Whoops! There was an uncaught exception...
          SyntaxError: Unexpected token F in JSON at position 2
              at JSON.parse (<anonymous>)
              at PythonShell.asJson (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_modules/python-shell/index.js:358:21)
              at /home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_modules/python-shell/index.js:310:42
              at Array.forEach (<anonymous>)
              at PythonShell.recieveInternal (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_modules/python-shell/index.js:306:15)
              at PythonShell.receiveStderr (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_modules/python-shell/index.js:290:21)
              at Socket.<anonymous> (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_modules/python-shell/index.js:108:18)
              at emitOne (events.js:116:13)
              at Socket.emit (events.js:211:7)
              at addChunk (_stream_readable.js:263:12)
          MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
          If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
          Whoops! There was an uncaught exception...
          TypeError: Cannot read property 'indexOf' of undefined
              at PythonShell._endCallback (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_helper.js:233:25)
              at terminateIfNeeded (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_modules/python-shell/index.js:148:39)
              at ChildProcess.<anonymous> (/home/pi/MagicMirror/modules/MMM-FRITZ-Box-Callmonitor/node_modules/python-shell/index.js:121:13)
              at emitTwo (events.js:126:13)
              at ChildProcess.emit (events.js:214:7)
              at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
          MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
          If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
          
          

          git show Joseph Bethge 30.oct.2016

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            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