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-PublicTransportHafas - Error when loading - DeparturFetcher.mjs

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    43 Posts 7 Posters 5.5k Views 7 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.
    • P Offline
      p1lspeda @KristjanESPERANTO
      last edited by

      @KristjanESPERANTO
      Thanks for your patience,

      Edit: did a complete reinstall and now it works. I must have misconfigured something and could not remember what or how.

      #############################
      This is what I have done:

      • I switched to the master branch yesterday and ran @sdetweil 's update script no change
      • I’ve done a fresh module install - no change
      • I’ve ran @sdetweil 's upgrade script - no change
      pi@magicmirror:~/MagicMirror $ git branch
        _fix_clipping
      * master
      pi@magicmirror:~/MagicMirror $ cd modules/MMM-PublicTransportHafas/
      pi@magicmirror:~/MagicMirror/modules/MMM-PublicTransportHafas $ npm ci --omit=dev
      
      > mmm-publictransporthafas@3.1.11 prepare
      > [ -f node_modules/.bin/husky ] && husky || echo husky is not installed.
      
      husky is not installed.
      
      added 63 packages, and audited 64 packages in 20s
      
      19 packages are looking for funding
        run `npm fund` for details
      
      found 0 vulnerabilities
      pi@magicmirror:~/MagicMirror/modules/MMM-PublicTransportHafas $
      pi@magicmirror:~/MagicMirror $ grep version package.json
              "version": "2.31.0",
      

      Here’s my config.js

                      {
                              module: "MMM-PublicTransportHafas",
                              position: "top_right",
                              config: {
                                      stationID: "000405041",                   // Replace with your stationID!
                                      stationName: "Höfchen/Listmann",   // Replace with your station name!
                                      direction: "",                    // Show only departures heading to this station. (A station ID.)
                                      ignoredLines: [],                 // Which lines should be ignored? (comma-separated list of line names)
                                      excludedTransportationTypes: [],  // Which transportation types should not be shown on the mirror? (comma-separated list of types) possible values: StN for >
                                      timeToStation: 10,                // How long do you need to walk to the next Station?
                                      showColoredLineSymbols: true,     // Want colored line symbols?
                                      useColorForRealtimeInfo: true,    // Want colored real time information (timeToStation, early)?
                                      showTableHeadersAsSymbols: true,  // Table Headers as symbols or text?
                                      maxUnreachableDepartures: 0,      // How many unreachable departures should be shown?
                                      maxReachableDepartures: 10,        // How many reachable departures should be shown?
                                      customLineStyles: "",             // Prefix for the name of the custom css file. ex: Leipzig-lines.css (case sensitive)
                                      showOnlyLineNumbers: false        // Display only the line number instead of the complete name, i. e. "11" instead of "STR 11"
                                       }
                      },
      
      

      The error still occurs.
      At this point I’m completely clueless

      S 1 Reply Last reply Reply Quote 0
      • V Offline
        Vulan12354
        last edited by

        Hello together,

        i tried your instruction and updated MM and node.

        My node Version is 23.7.0
        My MM Version is 2.31.0
        git branch shows me master (highlighted)

        I also updated the module Version to: “3.1.11”

        Still got the error message.

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @Vulan12354
          last edited by

          @Vulan12354 how did you upgrade MagicMirror?

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @p1lspeda
            last edited by

            @p1lspeda on my upgrade script, can you show me the ~/MagicMirror/installers/upgrade.log

            or tell me the command you used

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            P 1 Reply Last reply Reply Quote 0
            • P Offline
              p1lspeda @sdetweil
              last edited by

              @sdetweil
              I removed the entire MagicMirror directory before reinstalling MM.
              I didn’t make a backup, so I cannot provide the log. Sorry.

              For updating I tried

              bash -c  "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)"
              

              and

              bash -c  "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)" apply
              

              and the fresh install was achieved by using

              bash -c  "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/raspberry.sh)"
              
              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @p1lspeda
                last edited by sdetweil

                @p1lspeda great thanks…

                only THIS one DOES the upgrade

                bash -c  "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)" apply
                

                BUT, if you did a git pull manually then the local code would be at the new/current version
                and I would abort, as you are ALREADY at the current level…

                THEN you have to do

                bash -c  "$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)" force
                

                cause I won’t let you upgrade OVER the same release accidentally

                ~/MagicMirror/installers/upgrade.log is created and updated in all cases.
                so we can tell what happened

                if it didn’t seem to work, I want to know… and get the log,
                even if you decide to abort and start over

                these scripts are very conservative… I do NOT want to destroy your running MM system

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                P V 2 Replies Last reply Reply Quote 0
                • P Offline
                  p1lspeda @sdetweil
                  last edited by

                  @sdetweil
                  good to know for the future. Thanks.
                  I was unaware of the “force” parameter, that’s why I never tried it.

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @p1lspeda
                    last edited by

                    @p1lspeda i do not publish force, as i do not want people to use it willy nilly.

                    danger…

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • V Offline
                      Vulan12354 @sdetweil
                      last edited by

                      @sdetweil

                      It looks like it is working now, but at the moment the module cant get any information about the bus schedule. But the MagicMirror is starting without any error message.

                      Thank you for your patience.

                      I will wait till monday, and tell you all if its working now or not.

                      1 Reply Last reply Reply Quote 1
                      • V Offline
                        Vulan12354
                        last edited by

                        Hey together,

                        it is working now.
                        The last bug was a known issue.

                        link Issue 193

                        Thanks all for helping to fix my problem!

                        1 Reply Last reply Reply Quote 2
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 4 / 5
                        • 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