MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    SOLVED TelegramBot runs multiple times

    Troubleshooting
    3
    8
    176
    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.
    • CFenner
      CFenner last edited by

      I’m new to the Telegram module. I installed it and it works so far. But whens I’m developing on my modules, I typically run the Mirror UI on my laptop. This gives me than the following error:

      1|mm  | [TELBOT] Error 409 Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
      

      Also the Telegram chat says that I must not run multiple bot instance.

      How can I overcome this? Shouldn’t the bot be running on the mirror and not in my browser?

      M 1 Reply Last reply Reply Quote 0
      • M
        MMRIZE @CFenner last edited by

        @cfenner
        It doesn’t work on multi-instances. If you run two fronts ui at the same time, the error will happens.
        How to overcome? Well, there be almost no solution for that.
        Maybe you can modify node_helper.js not to execute one more instance from another front but I’m not sure that is what you really want.

        1 Reply Last reply Reply Quote 0
        • CFenner
          CFenner last edited by

          Maybe the node_helper should only be initialized for the first time:

          https://github.com/bugsounet/MMM-TelegramBot/blob/d569c7ee9d22c7ff7618b67101cf68ad7b93106e/node_helper.js#L424

          B 1 Reply Last reply Reply Quote 0
          • B
            bugsounet @CFenner last edited by

            I have already try to allow multi insence but TB sever refuse it
            So, I can’t do something for this


            I am not a reference in this forum
            I am not a magician
            I'm just a developer

            Please DON'T ADS ANY of My Modules There !

            Follow new support of 4th party modules on https://forum.bugsounet.fr

            CFenner 1 Reply Last reply Reply Quote 0
            • CFenner
              CFenner @bugsounet last edited by

              @bugsounet Just to clarify, I think we don’t need multiple bot instances, just reuse one bot instance from multiple UI instances.

              I files a PR for prevent re-initialization if there is already a bot.

              B 2 Replies Last reply Reply Quote 0
              • B
                bugsounet @CFenner last edited by

                @cfenner I have commit for purpose un dev branch, I will see main code maybe I will made some change this week.

                Naturally, I will push it soon 😉

                Thx for your purpose 🙂


                I am not a reference in this forum
                I am not a magician
                I'm just a developer

                Please DON'T ADS ANY of My Modules There !

                Follow new support of 4th party modules on https://forum.bugsounet.fr

                1 Reply Last reply Reply Quote 0
                • B
                  bugsounet @CFenner last edited by bugsounet

                  @cfenner: pushed in master with v1.4.0

                  • Added: Your purpose code
                  • Added: Protect for duplicate message
                  • ToFix: Screenshot with scrot prog (scrot don’t return the last file link)

                  I am not a reference in this forum
                  I am not a magician
                  I'm just a developer

                  Please DON'T ADS ANY of My Modules There !

                  Follow new support of 4th party modules on https://forum.bugsounet.fr

                  CFenner 1 Reply Last reply Reply Quote 0
                  • CFenner
                    CFenner @bugsounet last edited by

                    @bugsounet thanks, i have no issues anymore.

                    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 Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                    This forum is using NodeBB as its core | Contributors
                    Contact | Privacy Policy