Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Still getting [github assistant] undefined error when trying to pull #142

Open
oscarmanriqueb opened this issue Mar 10, 2021 · 29 comments
Open

Comments

@oscarmanriqueb
Copy link

I have already set up login successfully to github and I even see the changes identified by the PULL, but when I click on the button to bring the changes down, I'm still getting this error. Already made sure that the GAS API is properly enabled. I removed and added the extension twice already, so I'm sure I'm using the latest version (5.0.0.2).

Already tried installing and uninstalling many times and also generated a new key on github; I'm able to see the repositories and the code changes, though, but the error happens whenever the pull is done.

@Adia-US
Copy link

Adia-US commented Apr 7, 2021

Same issue here. From everything I see from the other related issues this seems to only be affecting GSuite Users, but I'm not entirely sure. Either way this is a huge blocker for many of us. @leonhartX If there is anything we can do to provide more information or attempt to support you in getting this resolved, it will be greatly appreciated. I love this Extension but haven't been able to use it in months.

This is the error I receive from the console:

{
  "error": {
    "code": 401,
    "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
    "status": "UNAUTHENTICATED"
  }
}

@ainthateasy
Copy link

I am getting the same error. I've been using this extension happily for months (a couple small issues here and there) now it's suddenly stopped talking to Github.

It can see my repos but refuses to push/pull.

Same error:

{ "error": { "code": 401, "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", "status": "UNAUTHENTICATED" } }

I've tried uninstall/reinstall, new access token and removing the app's google auth. Nothing working so far....

@oscarmanriqueb
Copy link
Author

It seems the developer has not been able to take a look at the issues for the new version. Hopefully he'll retake on this. I really like the extension as it is really useful.

@leonhartX
Copy link
Owner

sorry guys, I can't manage to get some time to look at this now due to my work and family, wish I could get back in later August.

@Adia-US
Copy link

Adia-US commented Jul 28, 2021

@leonhartX No problem friend, we appreciate all of your effort and really love this extension that you've built. It's so very helpful for all of us and we appreciate your hard work. Please let us know if there is any way to go open source with this so that we can assist in troubleshooting and perhaps take some work off of your plate. Thanks again!

@andrewroberts
Copy link

andrewroberts commented Jul 28, 2021 via email

@andrewroberts
Copy link

I tried all the suggested solutions: could push, but not pull. I ended up just going back to the old IDE and installing v4.0.7.

@Hell-K
Copy link
Contributor

Hell-K commented Sep 9, 2021

Hello, so actually I'm using this at work (with GitLab and the new GAS IDE after my fixes in the pull request) and we're within a custom GSuite environment.
It's true that out of the box you'll get these errors but there's nothing that leonhartX can do about it since it's probably blocked by your organization.
The way to fix this would be to set up your own OAuth2 with your own KEY and CLIENT ID from within your organization's GCP.
Or at least, that's how it worked for me.

@Adia-US
Copy link

Adia-US commented Sep 9, 2021

Hi @Hell-K glad to hear this is working for you currently. Would you be willing to share a bit of instruction on the fix you mentioned? Maybe just some screenshots and directions to make it easier for us who aren't as familiar with that process off hand? It would be greatly appreciated.

@ghost
Copy link

ghost commented Nov 16, 2021

I tried all the suggested solutions: could push, but not pull. I ended up just going back to the old IDE and installing v4.0.7.

HI Andrew. Can you provide some guidance on how to install that old version? (I have no clue how to do something like that). Thanks in advance!

@andrewroberts
Copy link

andrewroberts commented Nov 17, 2021 via email

@ghost
Copy link

ghost commented Nov 17, 2021

Finally found the (or at least: "my") issue: my code that I wrote in local editor contained a bug that can't be saved by gas. So just check your code!!! (Or: develop in GAS and commit from GAS)

@andrewroberts
Copy link

Although my token was set to never expire, creating a new one got it working in the new UI.

@brownm09
Copy link

I received this error, too. However, I did not have Google Apps Script API enabled; once I fixed that here, I was able to pull without a problem. This is on Version 5.0.5.

Creating a new token (alone) did not fix my problem. (It is possible that the combination of fixing the token and enabling the API fixed the problem, but I tried the token first, so I will never know.)

@djpecot
Copy link

djpecot commented Sep 13, 2022

@brownm09 I also had to enable the Google Apps Script API AND create a new token. But I was also logged into a different user for the extension and the actual App Script, so not sure which one actually fixed it. Oops 😱

@Adia-US
Copy link

Adia-US commented Sep 13, 2022

I have recreated my token, ensured that the GAS API was enabled, but yet I'm still experiencing the same issue. Not sure what's going on.

@andreChmielewski
Copy link

I received this error, too. However, I did not have Google Apps Script API enabled; once I fixed that here, I was able to pull without a problem. This is on Version 5.0.5.

Creating a new token (alone) did not fix my problem. (It is possible that the combination of fixing the token and enabling the API fixed the problem, but I tried the token first, so I will never know.)

This worked for me. I engaged Google Apps Script API and I could pull!

@SupportPlan
Copy link

Wasn't working for me.

I disabled Google Apps Script API, deleted the Token, enabled Google Apps Script API, created a new Token and then added it.

Now it works.

@Adia-US
Copy link

Adia-US commented Oct 13, 2022

Still not working for me

@andreChmielewski
Copy link

Still not working for me

Are you getting the undefined error or is something else wrong?

@Adia-US
Copy link

Adia-US commented Oct 13, 2022

@andreChmielewski So basically what happens is that when I open the Apps Script editor, it still does that thing where it opens a new tab to sign into Google, and even though the Github Assistant tool tabs appear e.g. - "Repository", push/pull - nothing happens when I click on any of those.

I went through the entire process of disabling/enabling Apps Script API both in my personal Apps Script User Settings and for the project itself in GCP, deleted/recreated a GitHub PAT, reinstalled the extension, etc etc and it's still not working for me. Not sure if I'm doing something wrong or if I should revert to a previous version of the extension.

@andreChmielewski
Copy link

@Adia-US I think I had this problem once - I had installed everything but it didn't load any of my repositories. So I read somewhere that switching into the classic editor and then back into the new one would fix it. And it did!

Try switching to the classic editor and then back the new editor. Maybe refresh the browser then too.

@Adia-US
Copy link

Adia-US commented Oct 14, 2022

@andreChmielewski Ugh, thank you for the recommendation but unfortunately that still didn't work for me. I've attempted all of the recommendations/work-arounds in this thread so far to no avail, so I'm wondering if there is something specific blocking me on the Google Workspace/GCP Administration side.

@NoSubstitute
Copy link

This happened to me again today.
Made sure that the API was enabled. Flipped it Off and On again. Still didn't work.
Reloaded the Chrome window a few times. Still didn't work.
right clicked the extension and opened the options of GasHub to verify I was still logged in. Yes I was.

Tried pull again. Well, hello there! Now it works!

Didn't have to fix new token.

@solroi
Copy link

solroi commented Nov 3, 2022

@Adia-US I think I had this problem once - I had installed everything but it didn't load any of my repositories. So I read somewhere that switching into the classic editor and then back into the new one would fix it. And it did!

Try switching to the classic editor and then back the new editor. Maybe refresh the browser then too.

@andreChmielewski There is no option to switch to classic editor anymore. The legacy Apps Script IDE was deprecated in Q4 2022.

https://issuetracker.google.com/issues/254509556

@andrewroberts
Copy link

andrewroberts commented Nov 3, 2022 via email

@NoSubstitute
Copy link

As I commented in another thread, I also today learned that this undefined error occurs on Pull when the code in github is incompatible, and thereby can't be saved in the GAS IDE. Since the code can't be saved, it gives some error back to the extension, and it only responds with the undefined message.

Took me a while to find the : where there should be a ;

@Kycko
Copy link

Kycko commented Jun 14, 2023

Finally found the (or at least: "my") issue: my code that I wrote in local editor contained a bug that can't be saved by gas. So just check your code!!! (Or: develop in GAS and commit from GAS)

Yup, I've checked my new code and noticed for (smth, smth, smth) {} with commas (,), no dot-commas (;).
Just replaced commas and pulled my new code successfully.

@MAD0MARKETING
Copy link

I received this error, too. However, I did not have Google Apps Script API enabled; once I fixed that here, I was able to pull without a problem. This is on Version 5.0.5.

Creating a new token (alone) did not fix my problem. (It is possible that the combination of fixing the token and enabling the API fixed the problem, but I tried the token first, so I will never know.)

you saved me man

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests