leonhartX / gas-github

sync gas code to github
https://chrome.google.com/webstore/detail/lfjcgcmkmjjlieihflfhjopckgpelofo
MIT License
3.5k stars 70 forks source link

TypeError: Cannot read property 'forEach' of undefined #127

Open Jlcasado opened 4 years ago

Jlcasado commented 4 years ago

After sucessfully logging into gitlab CE, I returned to the project in GA and I got the error: TypeError: Cannot read property 'forEach' of undefined

Where can I find more details to troubleshoot the error?

I made the changes suggested in #117 to use our own gitlab CE instance.

dimitri-vs commented 4 years ago

What kind of error are you getting in the console log?

Try logging in and logging out, fixed it for me.

andrewroberts commented 2 years ago

Although my token was set to never expire, creating a new one fixed this for me.

jmcmurry commented 2 years ago

[github assistant] TypeError: Cannot read properties of undefined (reading 'forEach')

I tried logging out and into Google to no avail. The error is also very persistent: once it's there better to give up trying.

Interestingly, this message will persist even if the code is changed (eg. in my case forEach syntax to the for (i = 0... style syntax.) I don't think it has anything to do with the code.

What fixed it for me was to uninstall the GitHub assistant chrome extension (chrome://extensions/) and to generate a new GitHub token (https://github.com/settings/keys), then reinstall the extension (https://chrome.google.com/webstore/detail/google-apps-script-github/lfjcgcmkmjjlieihflfhjopckgpelofo?hl=en) with that new token. That fix seems to last for a few weeks.

It is an annoying workaround, but to my knowledge, this extension is still this is the only game in town for this use case.

andrewroberts commented 2 years ago

I find that this error goes away after a few tries...

bergerjacob commented 5 months ago

If anyone has this problem again, it was a github token scope issue for me. You need to allow gist and repo access.