codesandbox-client icon indicating copy to clipboard operation
codesandbox-client copied to clipboard

fetch-pack: invalid index-pack output - github error shown when installing NVM or various github repos using https

Open jkbits1 opened this issue 1 year ago β€’ 8 comments

πŸ› bug report

Preflight Checklist

  • [ X] I have read the Contributing Guidelines for this project.
  • [ X] I agree to follow the Code of Conduct that this project adheres to.
  • [ X] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Description of the problem

When using a Devbox for docker or nodejs (or any other type tested) and working in the terminal, I get this error (among other lines) fetch-pack: invalid index-pack output when installing nvm using the standard curl script (specified below) or performing git fetch or git clone on various github repos using https.

git clone or fetch on my own github repos using ssh works fine.

These actions worked a few days ago then worked sometimes. Now, they never work.

In an effort to resolve the issue, all my sandboxes have been deleted (it's not an issue for me to recreate my setup!). The current one specified in the link is my only Devbox and it is a new one with nothing else attempted on it before the specified problems.

Workaround attempts include using the terminal in the Codesandbox web editor on Edge and the terminal in VS Code Desktop. The behaviour is the same in all cases.

I have tried using various git config settings as suggested on StackOverflow and elsewhere with no difference in behaviour.

How has this issue affected you? What are you trying to accomplish?

I cannot install NVM or any github repos other than my own.

Currently, I am not able to use Devbox for any prototyping.

To Reproduce

This is a standard method to install nvm on the linux command line. It fails with the error specified above. curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash

git clone over https results in the same error.

Link to sandbox: my repo for prototyping

You are very welcome to make any tests or changes to my repo if it is helpful in diagnosing this error, up to and including deleting it. It contains nothing that is not stored elsewhere.

Your Environment

Software Name/Version
Π‘odesandbox 0.0.329
Browser Edge
Operating System Windows/Android

jkbits1 avatar Jun 21 '24 18:06 jkbits1

Hi @jkbits1. Can you update the privacy of the Devbox you linked to "Unlisted", so we can investigate further?

filipelima18 avatar Jun 27 '24 13:06 filipelima18

Hi @filipelima18 thanks for the response πŸ‘

The devbox is now unlisted. Let me know if I need to do anything else πŸ™‚

jkbits1 avatar Jun 27 '24 14:06 jkbits1

Thanks! I can reproduce the issue but can't figure out the cause, so I will ask our engineering team to investigate this further.

filipelima18 avatar Jun 28 '24 09:06 filipelima18

That's great, thank you

jkbits1 avatar Jun 28 '24 13:06 jkbits1

Hi @filipelima18, as requested (outside of this github issue thread), the attached screenshot shows the fetch-pack error for the two Linux terminal commands below.

NVM install (this is the standard method to install NVM) curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash

Git clone over HTTPS git clone https://github.com/jkbits1/purescript-cookbook.git

As mentioned above, if I setup an SSH connection (something done on a now deleted sandbox) it is possible to execute both of these commands without problems. For my own repo, the SSH version of git clone, i.e. git clone [email protected]:jkbits1/purescript-cookbook.git worked fine. As a test, I forked a copy of the relevant NVM repo and cloned it using SSH i.e. git clone [email protected]:jkbits1/nvm.git. That installed into a folder from which it was possible to install and run NVM successfully.

However, these workarounds only got me so far. With my repo, I run into other problems later on with a make command that fails due to the issues with git. Screenshot 2024-06-27 161033

jkbits1 avatar Jul 02 '24 18:07 jkbits1

Hi @jkbits1. Just writing to let you know that we are still investigating this issue. We will keep you posted when there's an update.

filipelima18 avatar Jul 18 '24 13:07 filipelima18

Hi @filipelima18 thanks for the update πŸ‘ It is a puzzle πŸ˜• As mentioned I tried some git config settings without any clear benefit or clarification including specifying a verbose setting for git.

As reports on similar errors (on other projects) suggest some form of bandwidth issue, that suggests there is some set of configuration settings to be found. But whether that is really true and, even so, if there is a clear path to find the relevant settings is unclear.

jkbits1 avatar Jul 18 '24 20:07 jkbits1

Hi @jkbits1. Thanks for being patient while we checked this. This seems to be working on the fork of the sandbox. It might have been an issue with an older version of Pitcher that got fixed on restart. Can you try restarting the VM and checking if it fixes the issue?

filipelima18 avatar Aug 23 '24 13:08 filipelima18

Hi @filipelima18 thank you for your recent update about a fix πŸ™‚After testing in the existing sandbox and creating a new one, I can confirm that both problems mentioned above (curl install method of nvm and git clone over https) are resolved. It is now possible for me to use codesandbox for prototyping again πŸ‘

You mention that the problems might have been due to an issue with a previous version of Pitcher, which I understand supports the terminals. If there are problems in the future, is there a way for me to restart/reset Pitcher for my sandboxes to see if this has any effect?

Thanks again to you and the codesandbox team πŸ‘

jkbits1 avatar Sep 04 '24 20:09 jkbits1

Hi @jkbits1. Thanks for confirming!

As for Pitcher updates, I don't believe there is a way to update/restart/reset Pitcher manually, but restarting the VM manually might be helpful in those instances. You can restart the VM by clicking the CodeSandbox icon at the top left of the editor -> Restart VM.

filipelima18 avatar Sep 10 '24 13:09 filipelima18

Hi @filipelima18 thanks for the info and suggestion.

My feeling is restarting the VM won't be enough with Pitcher. Prior to raising this issue I deleted and restarted multiple VMs without success. Maybe with the new Pitcher version that will be different, though.

Thanks again to you and the team πŸ‘

jkbits1 avatar Sep 10 '24 18:09 jkbits1