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

Existing workflow - Failed to collect project info. Please contact our support team for help #174

Closed
sbulen opened this issue May 7, 2023 · 25 comments
Labels
bug Something isn't working

Comments

@sbulen
Copy link

sbulen commented May 7, 2023

Describe the bug
We have been using this github-action for over two years.

Our crowdin github actions started failing ~4 months ago with the following info. Didn't notice this until today:
image

We tried using a more recent version of the github-action, and are now getting different "No source found" errors:
image

To Reproduce
Steps to reproduce the behavior:

  1. Crowdin GitHub Action configuration
    https://github.com/SimpleMachines/SMF/blob/release-2.1/.github/workflows/crowdin_wf.yml

  2. crowdin.yml file content
    https://github.com/SimpleMachines/SMF/blob/release-2.1/.github/crowdin.yml

Expected behavior
We expected source strings to be copied to CrowdIn, as in the past, and any new strings to become available for translation. (We do not use the features where translations come back to github.)

@sbulen sbulen added the bug Something isn't working label May 7, 2023
@andrii-bodnar
Copy link
Member

Hi @sbulen,

Please make sure you're using the latest version of the Action. The easiest way to do it - is to specify the major version only crowdin/github-action@v1.

@andrii-bodnar
Copy link
Member

The crowdin.yml location causes the error. It's located inside the .github directory and as a result, CLI tries to find source files relative to this directory.

There are two ways to fix this:

  • moving the crowdin.yml configuration to the root of the repo.
  • updating the base_path option value: ../.

@sbulen
Copy link
Author

sbulen commented May 8, 2023

Thanks, I'll give it a try!

@sbulen
Copy link
Author

sbulen commented May 8, 2023

I am now getting this error. Again, this workflow was working until 4 months ago:
image

@sbulen
Copy link
Author

sbulen commented May 8, 2023

Were the tokens changed? Do we need to redo the token?

@sbulen
Copy link
Author

sbulen commented May 9, 2023

Update: We have two folders in CrowdIn for our project (SMF_2-1 & SMF_2-1_NEXT). The 2nd folder is used for upcoming release info, for versioning. Having it around allows translations for upcoming releases to proceed in parallel with updates to the current release.

The first folder works fine (SMF_2-1). The 2nd folder (SMF_2-1_NEXT) gets the error above. I can reproduce this behavior in my test environment as well.

So it's not a token/ownership issue, because the first one works OK now (same project ID, same secret token).

But for some reason I cannot update the second folder.

@andrii-bodnar
Copy link
Member

@sbulen could you please share your Crowdin project ID? It's better to share it by contacting our support team and mentioning this issue as a reference

@sbulen
Copy link
Author

sbulen commented May 9, 2023

I just sent an email to support@crowdin.com that referenced this ticket that provides the project ID.

Note that the workflow in question is this one:
https://github.com/SimpleMachines/SMF/blob/release-2.1/.github/workflows/crowdin_wf_next.yml

Note that it attempts to update the 2nd folder (SMF_2-1_NEXT).

I have reproduced the same issue on a 2nd (private) CrowdIn project and a 2nd (private) GitHub account. That one also produced an erroneous "You don't have permission ..." error like the one above when trying to update the 2nd folder. So the issue is reproducible.

Thanks for your support.

@andrii-bodnar
Copy link
Member

@sbulen thanks for the details. I checked from our side and it seems like your Crowdin personal access token doesn't have enough scope permissions for fetching all the needed information about the project.

Please try creating a token with the following scopes:

Знімок екрана 2023-05-10 о 14 48 42

@sbulen
Copy link
Author

sbulen commented May 10, 2023

Thank you for the quick response.

I attempted the above in my test environment, and it did not work.

As before, it works fine for the first folder (SMF_2-1), but not the second folder (SMF_2-1_NEXT).

I still get the "❌ You do not have permission to view/edit project with provided id." error. As both are in the same project, I am using the same project ID and token for both.

I repeated the test with a new token that had ALL permissions, and the results were the same.

The structure within CrowdIn looks like this:
image

@andrii-bodnar
Copy link
Member

@sbulen it's very strange. Could you please try Re-running the WF with the debug logging enabled?

@sbulen
Copy link
Author

sbulen commented May 11, 2023

This is the main part... If you want me to copy the whole thing let me know... (Not sure how safe it is to publish the whole thing...)

STARTING CROWDIN ACTION
UPLOAD SOURCES
✔️ Fetching project info
java.lang.RuntimeException: You do not have permission to view/edit project with provided id.
at com.crowdin.cli.client.CrowdinClientCore$1.(CrowdinClientCore.java:35)
at com.crowdin.cli.client.CrowdinClientCore.(CrowdinClientCore.java:28)
at com.crowdin.cli.client.Clients.getProjectClient(Clients.java:45)
at com.crowdin.cli.commands.picocli.ActCommandWithFiles.getClient(ActCommandWithFiles.java:30)
at com.crowdin.cli.commands.picocli.ActCommandWithFiles.getClient(ActCommandWithFiles.java:11)
at com.crowdin.cli.commands.picocli.GenericActCommand.run(GenericActCommand.java:37)
at picocli.CommandLine.executeUserObject(CommandLine.java:2026)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2453)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2415)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2417)
at picocli.CommandLine.execute(CommandLine.java:2170)
at com.crowdin.cli.commands.picocli.PicocliRunner.execute(PicocliRunner.java:39)
at com.crowdin.cli.Cli.main(Cli.java:16)
##[debug]Docker Action run completed with exit code 1
##[debug]Finishing: crowdin-action

@andrii-bodnar
Copy link
Member

@sbulen I just investigated the problem in more detail. It looks like there is an issue with the Authorization Token indeed, as I suspected before. Based on the failed "List Branches" API request details, I can say that the token "CROWDIN_API_TOKEN" has no permission to make these requests.

Please make sure you're using the right token in your workflow.

You can also see the failed requests in your Crowdin project > Tools > API > Calls History. In the log details, you will see the Token Name used for the current request.

@sbulen
Copy link
Author

sbulen commented May 16, 2023

Note we are using a personal access token within the CrowdIn UI, and selecting all permissions. I cannot specify branch/folder there. This has been working for us for a while.

Is it possible the personal access token & the api token are now different (since January 2023) & cannot be interchanged anymore?

Note I built a parallel test environment, and I am getting the same failure, even with a token with ALL permissions (pic below from test). This new environment fails the same way, so the problem can be reproduced:
GH: https://github.com/sbulen/ci_gh_test1
CI: https://crowdin.com/project/crowdin-github-test

image

This action has been running successfully in our production environment for ~2 years. It was implemented in ~3/2021, and ran ok every week thru 1/14/23. The 1/21/23 run was the first time it failed. (Pic below from the production runs.)

What changed between 1/14/23 and 1/21/23?

image

@andrii-bodnar
Copy link
Member

@sbulen, please make sure that the account under which the token is created has manager permissions for the project

@sbulen
Copy link
Author

sbulen commented May 17, 2023

Yes, confirmed the tokens were created by managers.

In my test environment, I am also the site owner.

Screenshot_20230517_064443_Firefox

@andrii-bodnar
Copy link
Member

@sbulen please try creating a token on the project owner's behalf for that environment where the action is failing

@sbulen
Copy link
Author

sbulen commented May 17, 2023

Ok, will do so in our production environment. That token was created by a manager 2 years ago.

But note that in my test environment, which has the same error, the token was already created by the owner, as shown in the screenshot above.

@andrii-bodnar
Copy link
Member

@sbulen the project ID you've already sent to our support team - is this your test environment?

@sbulen
Copy link
Author

sbulen commented May 17, 2023

No, that was production.

@sbulen
Copy link
Author

sbulen commented May 17, 2023

I wonder if project-specific "granular" access is needed now...

@sbulen
Copy link
Author

sbulen commented May 17, 2023

I just attempted creating a new token in test (as owner/manager) with granular access to the project in my test environment.

That failed similarly.

I sent a note to support with the project ID in test.

I don't want to do too much experimentation in production.

@sbulen
Copy link
Author

sbulen commented May 18, 2023

When I sent in the code for my test environment to support, they responded saying that my test run is failing because my free CrowdIn plan only supports one branch.

So... To be honest, I don't know if my production plan is failing for the same reason. (I'm a volunteer! Not too familiar with the account details/history...)

I asked them if this is the reason for my production run failing as well.

@andrii-bodnar andrii-bodnar closed this as not planned Won't fix, can't repro, duplicate, stale May 19, 2023
@sbulen
Copy link
Author

sbulen commented May 28, 2023

Closing the loop - yes, recreating the token worked!

Thanks,

@DimaYashchyshyn
Copy link

Nice to hear that all works fine now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants