figma-plugin
figma-plugin copied to clipboard
Improve error messages when connecting to a remote repository
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:
- Go to File > Plugins > Figma Tokens
- Click on Settings > GitHub > Add new Credentials
- Fill out credentials
- See error
Expected behavior It connects to Github or at least let's me know what is wrong with my credentials in greater detail.
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
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.
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.
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
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.
I have similar problem. I followed the instruction, still getting Error syncing with GitHub, check credentials
:/