No internet connection
  1. Home
  2. General

Tinypilot Pro failed to update

By @cwtibbs
    2022-02-11 03:05:58.420Z

    Web GUI error "The update failed: Command '['sudo', '/opt/tinypilot-privileged/update']' returned non-zero exit status 2."

    SSH error "TASK [tinypilot.tinypilot-pro : get TinyPilot repo] ************************************************
    fatal: [localhost]: FAILED! => {"before": "7992226ec2fece09e3d6cbcdbcb96c8a51d4529c", "changed": false, "msg": "Local modifications exist in repository (force=no)."}

    PLAY RECAP *****************************************************************************************
    localhost : ok=78 changed=2 unreachable=0 failed=1 skipped=26 rescued=0 ignored=0"

    • 7 replies
    1. Thanks for reporting this!

      The installer is failing because it's detecting changes to TinyPilot's files, and it doesn't want to overwrite them.

      Have you modified the code? If so, you'll need to save your changes outside of /opt/tinypilot and restore the directory to its previous state.

      You can reset your changes by SSHing in and running this command:

      sudo su tinypilot bash -c "cd /opt/tinypilot && git checkout ."
      

      Note that the updater overwrites all of TinyPilot's files, so any changes you've made to source files will be overwritten when you perform the update again.

      1. C@cwtibbs
          2022-02-12 02:51:30.896Z

          That did the trick. Yes, I had made some changes to menu-bar.html to hide some of the menu when I was letting someone review a computer connected to the tinypilot via a VPN. Updated fine now. Thanks again Michael!

          1. In reply tomichael:
            S@sbj5446
              2022-02-22 17:30:18.719Z

              Having the same issue "The update failed: Command '['sudo', '/opt/tinypilot-privileged/update']' returned non-zero exit status 2." Tried the command : "sudo su tinypilot bash -c "cd /opt/tinypilot && git checkout ."" as well, but didn't do the trick. Using Chrome Version 98.0.4758.102 (Official Build) (64-bit). Log states: "TASK [tinypilot.tinypilot-pro : patch HID module] ******************************
              fatal: [localhost]: FAILED! => {"changed": false, "dest": "/lib/modules/5.10.17-v7l+/kernel/drivers/usb/gadget/function/usb_f_hid.ko", "elapsed": 0, "gid": 0, "group": "root", "mode": "0644", "msg": "Request failed", "owner": "root", "response": "HTTP Error 503: Backend is unhealthy", "size": 23088, "state": "file", "status_code": 503, "uid": 0, "url": "https://github.com/tiny-pilot/hid-backport/raw/master/bin/usb_f_hid.ko"}
              PLAY RECAP *********************************************************************
              localhost : ok=71 changed=3 unreachable=0 failed=1 skipped=21 rescued=0 ignored=0
              2022-02-22 17:08:59 main ERROR Update process terminated with failing exit code: Command '['sudo', '/opt/tinypilot-privileged/update']' returned non-zero exit status 2.
              2022-02-22 17:08:59 update.result_store INFO Writing result file to /home/tinypilot/logs/latest-update-result.json
              "

              Only change I have made is the passwrd. New install. Current version 2.3.0 trying to update to 2.3.2
              Any ideas?

              Thanks, SJ

              1. Thanks for reporting this!

                That looks like a transient issue with your device reaching a Github server. Can you try the command again?

                1. S@sbj5446
                    2022-02-22 20:28:20.241Z

                    Looks like that worked. Thank you!

                2. In reply tomichael:
                  SSwift Studies @SwiftStudies
                    2023-06-15 16:52:37.962Z

                    I'm having the same update issue... but when I ssh in and run the command I get this error. Changing to /opt/tinypilot there is no repo there...

                    sudo su tinypilot bash -c "cd /opt/tinypilot && git checkout ."
                    fatal: not a git repository (or any of the parent directories): .git
                    
                    1. David @david2023-06-15 18:39:23.241Z

                      Hi @SwiftStudies, sorry that you're running into this update issue.

                      This looks a lot like filesystem corruption on your SD card. One of the telltale signs is missing files / directories like you're experiencing. The solution here is to re-flash your SD card.

                      To extend the life of your SD card, you can try enabling the read-only filesystem once you're back up and running. It may be a good idea to use a new SD card if possible too.

                      Hope that helps! Please let me know if re-flashing works, and if you have any other questions.