Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Bug: Remove From Dashboard button doesn’t work #986

Closed
diminutivesloop opened this issue May 8, 2021 · 11 comments · Fixed by #1220
Closed

Bug: Remove From Dashboard button doesn’t work #986

diminutivesloop opened this issue May 8, 2021 · 11 comments · Fixed by #1220

Comments

@diminutivesloop
Copy link

Describe the bug

Remove From Dashboard button doesn’t work.

To Reproduce

  1. Go to the individual details page for a repo.
  2. Click the "Remove From Dashboard” button and click “Confirm” in the dialog.
  3. The dashboard page still shows the repo and no action is triggered in the open-sauced-goals repo.

I inspected at the GraphQL queries sent by the browser, and while I couldn’t quite tell what they were doing I did notice one them received the following error response:

{
  "errors": [
    {
      "message": "Resource not accessible by integration",
      "path": [
        "gitHub"
      ],
      "extensions": {
        "service": "github",
        "upstream": {
          "data": {
            "updateIssue": null
          },
          "errors": [
            {
              "type": "FORBIDDEN",
              "path": [
                "updateIssue"
              ],
              "extensions": {
                "saml_failure": false
              },
              "locations": [
                {
                  "line": 2,
                  "column": 86
                }
              ],
              "message": "Resource not accessible by integration"
            }
          ]
        },
        "traceId": "8e5a7cb6-6698-41dc-b918-fb0b72d208fe"
      }
    }
  ]
}

Expected behavior

The repo should be removed from the list of repos on the dashboard.

Desktop

  • OS: Mac OS 11.3.1
  • Browser: Safari
  • Version: 14.1
@filiptronicek
Copy link
Sponsor Contributor

Thanks for reporting this issue, @diminutivesloop! This looks like a lack of permissions from the Onegraph instance. @bdougie, could you please look into the permissions of the Onegraph installation?

I should add that I was able to reproduce this in the same way that you did.

@bdougie bdougie self-assigned this May 19, 2021
@jason1985
Copy link
Contributor

I encountered the same problem and just noticed this issue.

image

After going to https://serve.onegraph.com/oauth/github/receive I received this error message:
"Could not find state for OAuth finish handler"

@filiptronicek
Copy link
Sponsor Contributor

@jason1985, I believe this issue you are experiencing is not related to this issue (or maybe I'm just not seeing the connection), it looks like you are talking about the step in which one would install the GitHub app. If you went to the redirect URL just by typing it into the address bar, you would get an error due to the lack of any POST parameters, which are needed for the callback redirect. But if you clicked Install & Authorize it should successfuly complete (if it doesn't, please feel free to open an issue here!)

@jason1985
Copy link
Contributor

I am experiencing the same issue of not being able to remove a repo.

image
I also received the same "Resource not accessible by integration" error message.
After googling I came across this https://stackoverflow.com/questions/60234886/resource-not-accessible-by-integration-when-trying-to-create-trigger (not sure if it's related)
So that's why I thought it might be related to the Install & Authorize part.
You're right I didn't even think about "error due to the lack of any POST parameters".
I'm still learning :)

@filiptronicek
Copy link
Sponsor Contributor

@jason1985 wow, what a funny coincidence, I just stumbled upon that Stack Overflow question for a completely different repo of mine! I think the Resource not accessible by integration is just an error message GitHub spits out for any authorization error regardless of the context (not sure about this though.)

Anyway, thanks for reproducing this, I hope we can fix this ASAP.

@bdougie
Copy link
Member

bdougie commented Sep 10, 2021

Just confirmed today that this is still a bug. I think there is a disconnect in permissions. That error message is because the remove button should not be a persisted query and instead be calling from the regular queries.

@mtfoley
Copy link
Contributor

mtfoley commented Sep 10, 2021

@bdougie i mispoke on discord - this is actually already a dynamic query, uses api.updateGoal():

const _handleRepoRemoval = () => {
api
.updateGoal(goalId, repoName, "CLOSED", note)
.then(() => {
setRemoved(true);
})
.catch(err => console.log(err));
};

function updateGoal(id, title, state, notes) {
return fetchOneGraph(operationsDoc, "UpdateGoal", {
id: id,
state: state,
title: title,
notes: notes,
});
}

@bdougie
Copy link
Member

bdougie commented Sep 10, 2021

Uh, even weirder that it is not triggering a deletion. I am sure it is something simple. I can take a closer look this weekend.

@mtfoley
Copy link
Contributor

mtfoley commented Sep 10, 2021

I think it does remove in the background. I tried removing the slaybot goal, and here's what i'm seeing.
Network call looks good.
image
No errors reported.
image
underlying issue closed
image

it's making it into state from somewhere else on page refresh... looks like it might be because it's still in data.json fetch.
image

@mtfoley
Copy link
Contributor

mtfoley commented Sep 10, 2021

Related to #832, IMO (state management issues)

@mtfoley mtfoley mentioned this issue Oct 12, 2021
15 tasks
0-vortex pushed a commit that referenced this issue Oct 12, 2021
github-actions bot pushed a commit that referenced this issue Oct 12, 2021
### [0.34.1](v0.34.0...v0.34.1) (2021-10-12)

### Bug Fixes

* no add response ([#1220](#1220)) ([102cae9](102cae9)), closes [#832](#832) [#986](#986)
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 0.34.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants