Closed Bug 1317289 Opened 9 years ago Closed 7 years ago

Scope error displayed after signing in under certain circumstances

Categories

(Taskcluster :: UI, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: garndt, Assigned: hashini.0913)

Details

(Keywords: good-first-bug)

After selecting an action on one of the tools sites when not logged in, such as clicking a worker type in the aws-provisioner UI, the user is presented with an error informing them of this. However, after logging in and being redirected back to the originating site, a scope error is displayed. Navigating away from where the user was at originally and going back resolves the issue.
I think the issue is that we don't automatically re-try operations, or hide error messages, on login. Probably hiding the error message is not a bad idea, and for cases where visibility is based on scopes (aws provisioner, secrets) retrying the GET call.
Keywords: good-first-bug
May I start working on this ?
Assignee: nobody → hashini.0913
One area where this happens is in the aws-provisioner view: STR: 1. Navigate to https://tools.taskcluster.net/aws-provisioner 2. Make sure you are not logged in 3. Click on a worker type (e.g., ami-test) 4. You will see an error. Click on "Additional details...". 5. Login Expected: The GET call for the worker type is retried. The error might still show if you don't have enough permissions but when you click on "Additional details..." your scopes should not be empty "[]" anymore. Actual: The GET call is not retried and the same error is shown: "You do not have sufficient scopes. This request requires you to have one of the following sets of scopes: [ [ "aws-provisioner:view-worker-type:ami-test" ], [ "aws-provisioner:manage-worker-type:ami-test" ] ] You only have the scopes: []"
The root cause for the bug is in the “componentWillReceiveProps” method in the “WorkerTypeView” component found in “src/views/AwsProvisioner/WorkerTypeView.js” This is the root cause for “loadWorkerType” GET call for the worker type is not executed when a user logs in or changes. Also note that the GET call is only executed if “provisionerId” or “workerType” type changes. Moreover there is no clearing of the error in “this.state”.
Awesome! Thanks for looking into the issue. The next step is to create a pull-request with the fix so we can review it. Let me know if you need help along the way :)
I have created a pull request. Link: https://github.com/taskcluster/taskcluster-tools/pull/454 I am not able to add you as a reviewer.
I put my findings for the, PR changes requested. Could you please have a look.
Thanks Hashini, awesome job!
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Component: Tools → UI and Tools
You need to log in before you can comment on or make changes to this bug.