Opaque failure of GitHub import

I’m getting the following error when trying to import from GitHub:

We’re sorry, something went wrong! Please try again, or try refreshing the editor.

image

Trying again doesn’t work, nor does refreshing the editor.

From previous threads – eg Import from Github fails everytime - #4 by cori – I see that the git repo in Glitch can get in an inconsistent state and cause this. But how can I debug that or fix it?

I think my only idea would be to go to the console and blow the whole app away and then do another GitHub import. Is that a reasonable thing to do if I’m confident that the version on GitHub is the master copy?

Agreed. The error can happen for a number of reasons and it is never clear why.
Some common reasons why it may not work (this should be said in the error rather than just “We’re sorry, something went wrong! Please try again, or try refreshing the editor.”):

  • You don’t own the repo (youraccount/yourrepo VS yourgroup/yourrepo)
  • It just isn’t working (try later)

The fix at the moment is really just to use git on cli.

1 Like

Ah, thanks! But how exactly? I’m still sort of noobish with git…

I’m not super great with Git either, but this should work below.

git remote add origin https://github.com/Username/Repo.git
git push -u origin master

Then when you want to prepare files for the next time:

git add .
git commit

On the commit screen type your commit message and do CTRL + X and then ENTER. Then run

git push -u origin master

That should be it!

Is this all in the the Glitch console? Note that I just have a repo in GitHub and am trying to overwrite what’s in Glitch with what’s in GitHub, exactly as the built-in “Import from GitHub” feature does (when it works).

If you want to import from git I belive you can run

git clone https://github.com/Username/Repo.git

Just a heads up that this will override your current code.

I documented the problem in this thread. If you want to remediate the issue after your project has been made, you’ll need to add your repository as a remote then git reset --hard master.

In the case that your repository is private, you’ll likely be prompted for credentials on the command line. The default storage mechanism for Git credentials dumps it all in a plaintext file so be weary if your project is shared with another user.

Maybe someone can help inform a staff member?

1 Like

I’ve been noticing something else as well:

  1. When I make an export from my Glitch project to an existing GitHub repo (of which I’m the owner), the export fails. At least, in Glitch. But when I go to GitHub, I can see a new branch made, named glitch with all the changes that I had exported. This shows that the export did take place, and that the UI was misleading.

  2. For importing from a repo, the import simply fails, and once, my whole project got emptied with nothing but the README and the .env. But the last part might not be involved because the Glitch API was facing downtime.

@glitch_support, I’d appreciate it if you would take a look into this matter.

I’m almost positive that the UI always displays an error message as if the import/export failed regardless of whether or not it actually did. There might be a missing await somewhere in the client code.

Did your project have a README.md with something along the lines of the project loading, etc.?

I don’t understand…?

Do you remember what your README said? I can’t pull up exactly what I’m thinking of. Glitch is being slow right now.

We must feed the servers more electro-juice :battery:

No idea. Although one of my files said ‘This files has been cleared. Run refresh to refresh this project’ or somthing similar to that.

A small reason that this my happen is that there is a directory with the same name as a file…but I don’t think that’s the case.

There was an issue with GitHub imports that were think was resolved this morning. Let us know if you see this again.

1 Like

Ah, that would’ve been a wonderful explanation from my point of view, but, alas, it’s failing the same way today. This is road-staging.glitch.me if you want to take a look. Otherwise I can try git clone https://github.com/ORGNAME/REPONAME.git from the Glitch console.

UPDATE: It seems it is importing but showing that error anyway. Mysterious!

1 Like