Closed bootstraponline closed 4 years ago
Do we also want to print proposal to use flank auth login
?
Flank encountered a 403 error when running on project foo-bar. Please verify this credential is authorized for the project.
You can also login with different credentials with `flank auth login`
Caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "The caller does not have permission",
"reason" : "forbidden"
} ],
"message" : "The caller does not have permission",
"status" : "PERMISSION_DENIED"
}
I think we should encourage service accounts for CI. flank auth login is okay for local runs though.
I think we should encourage service accounts for CI. flank auth login is okay for local runs though.
Good point 👍
@bootstraponline
Flank encountered a 403 error when running on project foo-project. Please verify this credential is authorized for the project.
Consider authentication with Service Account https://github.com/Flank/flank#authenticate-with-a-service-account
or with Google account https://github.com/Flank/flank#authenticate-with-a-google-account
Caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "The caller does not have permission",
"reason" : "forbidden"
} ],
"message" : "The caller does not have permission",
"status" : "PERMISSION_DENIED"
}
EDIT
I think the second common mistake is wrong projectId
, we could enhance logs for that error as well
Flank was unable to find project foo-project. Please verify project id.
Caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found
{
"code" : 404,
"errors" : [ {
"domain" : "global",
"message" : "Project not found: aitest-b9214asdasd",
"reason" : "notFound"
} ],
"message" : "Project not found: aitest-b9214asdasd",
"status" : "NOT_FOUND"
}
That looks awesome!
Describe the bug
flank android run
andflank ios run
produce large error messages that aren't user friendly when the service account isn't authenticated correctly. Let's clean up the error messages to improve the user experience.To Reproduce
flank android run
Expected behavior
A clean error message, something like this:
Details (please complete the following information):
Yes
Additional context
Here's the current error message: