No internet connection
  1. Home
  2. General

Installation fails with git clone error

By Nick Pointon @pointonn
    2022-01-23 21:31:07.164Z

    I'm installing TinyPilot on a new RPi 4 running the latest updated version of Raspian OS Lite. The installation script is falling over on the command:

    /usr/bin/git clone --origin origin https://github.com/tiny-pilot/tinypilot.git /opt/tinypilot

    giving the following error:

    Cloning into '/opt/tinypilot'...
    error: RPC failed; curl 16 Error in the HTTP2 framing layer
    fatal: error reading section header 'shallow-info'

    I've tried running the command interactively and this is the error. When the command runs as part of the installer, I get the same error, like this:

    TASK [ansible-role-tinypilot : get TinyPilot repo] *****************************
    fatal: [localhost]: FAILED! => {"changed": false, "cmd": "/usr/bin/git clone --origin origin https://github.com/tiny-pilot/tinypilot.git /opt/tinypilot", "msg": "Cloning into '/opt/tinypilot'...\nerror: RPC failed; curl 16 Error in the HTTP2 framing layer\nfatal: error reading section header 'shallow-info'", "rc": 128, "stderr": "Cloning into '/opt/tinypilot'...\nerror: RPC failed; curl 16 Error in the HTTP2 framing layer\nfatal: error reading section header 'shallow-info'\n", "stderr_lines": ["Cloning into '/opt/tinypilot'...", "error: RPC failed; curl 16 Error in the HTTP2 framing layer", "fatal: error reading section header 'shallow-info'"], "stdout": "", "stdout_lines": []}

    RUNNING HANDLER [ansible-role-ustreamer : restart uStreamer] *******************

    PLAY RECAP *********************************************************************
    localhost : ok=60 changed=3 unreachable=0 failed=1 skipped=26 rescued=0 ignored=0

    I'd welcome any thoughts or suggestions. Thanks, Nick

    • 5 replies
    1. P
      Nick Pointon @pointonn
        2022-01-23 21:43:40.681Z

        I found a possible answer here, which suggested adding "--depth 20" to the command:

        https://stackoverflow.com/questions/65069443/git-cannot-clone-or-pull-repository-error-output

        and when I run the command manually it seems to work:

        # /usr/bin/git clone --depth 20 --origin origin https://github.com/tiny-pilot/tinypilot.git /opt/tinypilot
        Cloning into '/opt/tinypilot'...
        remote: Enumerating objects: 336, done.
        remote: Counting objects: 100% (336/336), done.
        remote: Compressing objects: 100% (281/281), done.
        remote: Total 336 (delta 99), reused 175 (delta 43), pack-reused 0
        Receiving objects: 100% (336/336), 3.58 MiB | 1.87 MiB/s, done.
        Resolving deltas: 100% (99/99), done.
        

        This has now resolved my problem - not sure why the installer failed with this error, but perhaps some incompatibility in the versions used. Something for Michael to think about.
        Nick

        1. In reply topointonn:

          I haven't seen this before. My guess is that it's s most likely a transient issue with your network or maybe even a brief Github outage. I've been able to clone the repo and install the past few days. Are you able to consistently reproduce the failure in the install script? Because I'm wondering if running it manually worked just by luck after a networking issue was resolved.

          1. P
            In reply topointonn:
            Nick Pointon @pointonn
              2022-01-25 09:39:28.936Z

              I did wonder if it might be a transient issue, so I ran the installer several times and each time I got the same error. I then ran the command by itself twice and got the same error each time. When I added the "--depth 20" parameter, it worked 1st time.
              So I've run it just now again and it failed again with the same error:

              # /usr/bin/git clone --origin origin https://github.com/tiny-pilot/tinypilot.git /tmp/tinypilot
              Cloning into '/tmp/tinypilot'...
              error: RPC failed; curl 16 Error in the HTTP2 framing layer
              fatal: error reading section header 'shallow-info'
              

              And when I added "--depth 20", it worked immediately:

              # /usr/bin/git clone --depth 20 --origin origin https://github.com/tiny-pilot/tinypilot.git /tmp/tinypilot
              Cloning into '/tmp/tinypilot'...
              remote: Enumerating objects: 336, done.
              remote: Counting objects: 100% (336/336), done.
              remote: Compressing objects: 100% (281/281), done.
              remote: Total 336 (delta 99), reused 175 (delta 43), pack-reused 0
              Receiving objects: 100% (336/336), 3.58 MiB | 2.14 MiB/s, done.
              Resolving deltas: 100% (99/99), done.
              

              I note also that when it fails, it fails slowly (takes 3-4 mins), but when it works it works immediately.

              I assume that it's some bug in git, though not sure why it would affect me and not you. I'm in the UK - could it be country-specific?

              1. It's probably not country-specific, but it could be something specific to your particular network. Is it possible there's a firewall on your path interfering with git requests? One of the users in the StackOverflow thread you linked mentioned that they saw this due to a firewall dropping their connections to git under certain circumstances.

                1. PNick Pointon @pointonn
                    2022-01-26 20:27:22.942Z

                    There's nothing very unusual about my set up at home. I have an ADSL router/firewall, which connects to the internet (copper, not fibre). Pretty standard for the UK. Another point is that I installed TinyPilot on an RPi Zero just 3-4 days earlier using the same network and it worked without hitch.
                    It's a curious bug. I hope this may help someone in future. Nick