stackblitz / core

Online IDE powered by Visual Studio Code ⚡️
https://stackblitz.com
MIT License
10.27k stars 898 forks source link

StackBlitz fails to create new GitHub repo for new project #959

Closed deckerbd closed 1 year ago

deckerbd commented 5 years ago

Initially when creating a new project, I was having issues with StackBlitz syncing new changes to its newly created GitHub repo. I removed StackBlitz as a Trusted OAuth App in GitHub (https://github.com/settings/applications -> Click ... next to StackBlitz -> Revoke), and now when I go to create a new repo for a new project, the GitHub authorization flat-out fails with a 401, even after reauthenticating myself with StackBlitz. See repro steps and video below.

Reproduction Steps:

Video: https://i.imgur.com/iUZryxz.mp4

Expected result: StackBlitz creates a GitHub repo with the project code Actual result: StackBlitz fails to create a repo, citing bad credentials.

Wrensummerset commented 4 years ago

I noticed when this happened a my browser blocked a pop up and I had to allow that. Then the process continued and I was a able to move forward

deckerbd commented 4 years ago

@Wrensummerset Tried it again just now, and didn't get any prompt (Chrome 79.0.3945.117 on macOS). I also tried manually specifying allowing popups to stackblitz.io, still no dice. :\ Still getting the same errors in my console as well.

Screen Shot 2020-01-10 at 7 43 40 PM

At this point there's still numerous open issues with the GitHub integration from the past year, which really sucks for my hopes of having this fixed. I'm hoping at some point these get fixed, but in the meantime I've opted to using Visual Studio Online.

kash-pram commented 4 years ago

+1

elpddev commented 4 years ago

I love stackblits and its awesome but this feature is important. For now, I have found codesandbox.io that has the github sync working. Hope stackblitz will fix this sometime.

Aviking88 commented 4 years ago

+1

EricSimons commented 4 years ago

Hey all- this issue sometimes is caused by chrome extensions that interfere with requests (i.e. adblockers). Can y'all try turning off all extensions and lmk if that resolves the issue? Would also appreciate links to the projects that are showing these errors so I can debug on our end

deckerbd commented 4 years ago

@EricSimons - Thanks for getting back to us!

I'm now able to login and accept the OAuth2 flow, with and without my Chrome extensions active.

However, when clicking "Connect Repo" and clicking "Create Repo & Push", a blank repository is created in GitHub, but no source code is ever pushed. I'm still able to edit files and click "Commit" at the top, but doing so still doesn't push any code to GitHub. I tried checking "make this repository private" and that had the same results: a blank private repository is created, but no commits make it over.

Some examples:

https://stackblitz.com/edit/react-sbcrj8

https://stackblitz.com/edit/angular-fm1w9t

https://stackblitz.com/edit/rxjs-zexqpz

Let me know if you need any more information for debugging (network traces, etc)

bzhao16834 commented 4 years ago

I'm having the same 401 issue and I've tried turning off all extensions in both chrome and edge to no avail. If I try to open old projects that were created in Stackblitz, it would get stuck on Initializing GIT Repository. Here is one of those project https://github.com/bzhao16834/github-8udwbr

despeekapool commented 4 years ago

For what it's worth, I've succeeded creating a new repo in Github from Stackblitz by doing the following steps :

I think the issue is that when you login and associate your Stackblitz and Github account, it does just ask permission for personal info. Once this is done, you can indeed login to Stackblitz with your Github credentials but for repo creation, it needs the repositories permissions. At least, it seems that's what I experienced.

Hope this will help

stevewhitmore commented 3 years ago

+1 Browser and extensions dont seem to matter. It always results in a 401 error

Capture

loreanvictor commented 3 years ago

Had the same issue. GitHub OAuth token did not have proper scope, so removed it and logged out of Stackblitz, logging back in using "Connect Repository" button (to ensure it asks for proper OAuth scopes this time). Still had an issue with Safari blocking pop ups (so had to manually allow popups stackblitz.com, no prompt was given), and then tried again, issue resolved.

akeshma commented 3 years ago

For what it's worth, I've succeeded creating a new repo in Github from Stackblitz by doing the following steps :

  • From your Github profile settings, revoke your Stackblitz Authorized OAuth App
  • Logout from both Stackblitz and Github
  • Disable all your adblockers
  • Login to Github
  • Go to Stackblitz, but do not login, create a new default project
  • From the newly created Stackblitz project, click the "Connect Repository" button
  • A popup should appear, asking you to allow Stackblitz to access both your Github personal info (email) AND your repositories.

I think the issue is that when you login and associate your Stackblitz and Github account, it does just ask permission for personal info. Once this is done, you can indeed login to Stackblitz with your Github credentials but for repo creation, it needs the repositories permissions. At least, it seems that's what I experienced.

Hope this will help

Works thanks

kc0tlh commented 1 year ago

This issue is now resolved in our new VS Code editor! Full writeup in Github issue https://github.com/stackblitz/core/issues/2473

maciejkrolpl commented 1 year ago

Hey all- this issue sometimes is caused by chrome extensions that interfere with requests (i.e. adblockers).

For me it was enough to disable uBlock origin on stackblitz domain