figma-plugin icon indicating copy to clipboard operation
figma-plugin copied to clipboard

Improve error messages when connecting to a remote repository

Open pandabrand opened this issue 2 years ago • 3 comments

Describe the bug I am trying to github sync to manage my tokens, when add my credentials I get this error There was an error connecting. Check your credentials. I have tried this with two access tokens I have generated, one brand new and another that used to test the Design Tokens plugin. That one works in connecting with my github repo, but I can't in this plugin.

To Reproduce Steps to reproduce the behavior:

  1. Go to File > Plugins > Figma Tokens
  2. Click on Settings > GitHub > Add new Credentials
  3. Fill out credentials
  4. See error

Expected behavior It connects to Github or at least let's me know what is wrong with my credentials in greater detail.

pandabrand avatar Jun 10 '22 19:06 pandabrand

Is there a tokens file stored that you're setting as filePath? The plugin currently also gives the credentials error even when it was the file that couldnt be parsed. (Which we should fix). If you can link to that file here i could check what's wrong with that one

six7 avatar Jun 11 '22 09:06 six7

I was getting the error connecting message also when trying to connect the plugin to github for the first time. I fixed it by accessing the repo in my browser and manually creating the token file (empty) in the browser. After that the github sync started working from inside the plugin.

christechsmith avatar Jun 13 '22 16:06 christechsmith

I found this guidance to be very helpful. Maybe adding a tooltip that instructs the user to have a file created at the location designated in the credentials form would provide the missing piece of information. While I am not a developer, I have used GitHub for projects for a decade and was looking for all manner of errors with my tokens and permissions settings to solve this issue. I never thought it would be the actual file pathway/lack of pre-existing files causing the issue.

designhawg avatar Jun 30 '22 04:06 designhawg

I am having issues with credentials and guess what, no valuable feedback. This appears to be marked closed because for some people creating the file in the repo first fixes it. This does not solve the fact that there is 0 useful information provided. I have created the repo and my token and all I get is Error syncing with GitHub, check credentials

cheryl-c-tirerack avatar Jun 16 '23 20:06 cheryl-c-tirerack

Something that might also help is checking the api response in your browser console. I opened it in another tab and got the error "A project name is required in order to reference a Git repository by name". I added the project name to my organisation url and it worked.

hjabbing avatar Aug 28 '23 11:08 hjabbing

I have similar problem. I followed the instruction, still getting Error syncing with GitHub, check credentials :/

starblazingunicorn avatar Dec 28 '23 19:12 starblazingunicorn