TRIGGERcmd
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    A JavaScript error occurred in the main process

    General Discussion
    2
    10
    21
    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.
    • Tiago Ivanov LavinasT
      Tiago Ivanov Lavinas
      last edited by Tiago Ivanov Lavinas

      This error is appearing for me, when I just added my computer.
      6ba4cf75-1bad-4c0d-ab61-86b41d0e1713-image.png

      RussR 1 Reply Last reply Reply Quote 0
      • RussR
        Russ @Tiago Ivanov Lavinas
        last edited by Russ

        @Tiago-Ivanov-Lavinas, the agent is supposed to copy the default configuration files including home_assistant_config.json to your data folder: C:\Users\(your user)\.TRIGGERcmdData

        You could write the file yourself. These are the default contents.

        {
            "HA_URL": "ws://homeassistant.local:8123/api/websocket",
            "HA_TOKEN": "Put your home assistant token here",
            "HA_ENABLED": false
        }
        

        I just installed the same version of the agent on my Windows 11 computer that didn't have the agent before, and it worked for me, so I suspect your antivirus software might have blocked the agent from writing the file. I'm not sure.

        Russell VanderMey

        Tiago Ivanov LavinasT 2 Replies Last reply Reply Quote 0
        • Tiago Ivanov LavinasT
          Tiago Ivanov Lavinas @Russ
          last edited by

          @Russ Yes, I created that file and it worked. Thank you.

          1 Reply Last reply Reply Quote 0
          • Tiago Ivanov LavinasT
            Tiago Ivanov Lavinas @Russ
            last edited by

            @Russ I have another problem. When I try to create my command, it doesn't update on the website or in the "commands.json" file. It only appears on the website when I edit the file itself. The same thing happens when I delete the command in the application but it doesn't delete it in the "commands.json" file or on the website.
            Another problem I'm facing is when I click on "Search for Examples", a window opens saying "Loading examples" and it doesn't load.

            Tiago Ivanov LavinasT 1 Reply Last reply Reply Quote 0
            • Tiago Ivanov LavinasT
              Tiago Ivanov Lavinas @Tiago Ivanov Lavinas
              last edited by

              @Tiago-Ivanov-Lavinas Also, when I turn on my computer, it asks me to enter the token again, meaning I have to delete my computer on the website and create another one to enter the application.

              RussR 1 Reply Last reply Reply Quote 0
              • RussR
                Russ @Tiago Ivanov Lavinas
                last edited by

                @Tiago-Ivanov-Lavinas, this is strange behavior. It seems like the TRIGGERcmd Agent application doesn't have read/write access to your data folder (c:\Users\(your user)\.TRIGGERcmdData). You could check the permissions on that folder, and give Everyone full control. If it's not a file permissions problem, maybe your antivirus software is blocking access to those files.

                What antivirus software are you using? I have heard of problems with Avast blocking the agent.

                Russell VanderMey

                Tiago Ivanov LavinasT 1 Reply Last reply Reply Quote 0
                • Tiago Ivanov LavinasT
                  Tiago Ivanov Lavinas @Russ
                  last edited by

                  @Russ The antivirus I use is Windows' own.

                  RussR 1 Reply Last reply Reply Quote 0
                  • RussR
                    Russ @Tiago Ivanov Lavinas
                    last edited by Russ

                    @Tiago-Ivanov-Lavinas, if it's the windows built-in, that's not the problem. You could try renaming the .TRIGGERcmdData folder and re-running the agent. The agent should recreate the folder, and populate it with the default files, like the agent was supposed to when you installed it originally. Sorry about this. I've never seen this issue before and I don't know how to reproduce it.

                    Russell VanderMey

                    Tiago Ivanov LavinasT 1 Reply Last reply Reply Quote 0
                    • Tiago Ivanov LavinasT
                      Tiago Ivanov Lavinas @Russ
                      last edited by Tiago Ivanov Lavinas

                      @Russ I managed to solve hahahahahha. I just rename the folder and it worked! Thank you very much.

                      RussR 1 Reply Last reply Reply Quote 0
                      • RussR
                        Russ @Tiago Ivanov Lavinas
                        last edited by

                        @Tiago-Ivanov-Lavinas, great. Not sure what happened the first time, but renaming that folder is like a fresh agent install.

                        Russell VanderMey

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post