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

Error with Credentials when Recovering Un-pushed Changes on Separate Branches #2200

Open
keeganedwin opened this issue Aug 30, 2023 · 3 comments

Comments

@keeganedwin
Copy link
Collaborator

Describe the bug
This bug is NOT easily reproduced, but when multiple users are working on a shared repository using their individual Personal Access Tokens (PATs) as sync providers, an issue arises when one user (User X) makes changes on branch X but does not push them. If another user (User Y) opens the plugin and clicks “yes” to recover local changes, an error message stating “Error with Credentials” is displayed. This issue occurs consistently whenever one user attempts to recover local changes while the other is actively working. The error can only be resolved by adding their respective PATs.

Used-case:
The users in talk are having to constantly deal with this issue and have no other workaround other than to enter their PAT every time they get kicked out of the repository.

Extra details to the conditions:

  1. Crash or Restart Scenario: The plugin occasionally crashes or requires a restart, triggering the “Recover Local Changes” notification. However, when selecting “Yes” to recover the changes, a credentials error occurs. The only way to proceed is by entering credentials. At this point, the GitHub integration becomes disabled, resulting in the loss of all changes.

  2. Individual GitHub Accounts: Both users utilize their personal GitHub access keys and accounts while working on the same Figma files within the repository, but on different branches.

  3. Limited Workspace Credentials: After selecting “Enter credentials” and then canceling the process, applying the stored GitHub settings resolves the error. However, the credentials model attempts to open GitHub using the last user’s credentials who edited the document. Consequently, the recovered local changes are not retained, and it appears as if working on a new file.

To Reproduce
Steps to reproduce the behavior (not guaranteed):

  1. Two users should have access to one repo and work on one file
  2. Have User X make a change on the main branch, but not push to repo (whilst user Y is also active on the file with the plugin open)
  3. Have User Y then close the plugin/file, open it again and recover local changes
  4. See error

The same can be tried to reproduce the error by working in different branches and have User Y make change, then have User X force close the plugin/tab, open and recover local changes

Expected behavior
Allow users to recover local changes and not have to enter their PAT every time another user works in the same repo on the same file.

Screenshots or Screencasts
CleanShot 2023-08-29 at 18 56 37@2x

@cerupcat
Copy link

We're running into this same issue. Do you have any steps on how to fix or workaround it?

@Arcrammer
Copy link

Tokens Studio does not support GitHub Beta tokens, will need to use Classic. @cerupcat This might help your issue if you still have one.

@cerupcat
Copy link

cerupcat commented Sep 5, 2024

Tokens Studio does not support GitHub Beta tokens, will need to use Classic. @cerupcat This might help your issue if you still have one.

It's hard to recall the solution now. We got some help within the slack channel. I recall that it being something related to our git setup and potentially ignoring a file we shouldn't have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📤 Ready for dev
Development

No branches or pull requests

5 participants