Git Product home page Git Product logo

Comments (14)

lostintangent avatar lostintangent commented on June 14, 2024 1

Yep you solved it :D Just merged your PR and I'll ship that in a few minutes 👍

from gistpad.

lostintangent avatar lostintangent commented on June 14, 2024

Thanks for reporting this! This error indicates that the token isn’t valid for accessing the Gists API. Couple of follow up questions:

  1. Could you try appending “/gists” to the URL you’re trying to hit in Postman (or whichever HTTP you’re using) and see if that works?

  2. Could you verify that the token you generated included the gist scope?

Thanks!

from gistpad.

guyk-yahoo avatar guyk-yahoo commented on June 14, 2024

Thanks for reporting this! This error indicates that the token isn’t valid for accessing the Gists API. Couple of follow up questions:

  1. Could you try appending “/gists” to the URL you’re trying to hit in Postman (or whichever HTTP you’re using) and see if that works?
  2. Could you verify that the token you generated included the gist scope?

Thanks!

  1. Yeah https://git.myorg.com/api/v3/gists also works and returns the gists
  2. Double checked that -- indeed it includes gists.

Anywhere to look at debug logs?

from gistpad.

guyk-yahoo avatar guyk-yahoo commented on June 14, 2024

Maybe I'll add the following.
The Open Gists command (CMD+P) actually works:

image

But the side menus don't

from gistpad.

lostintangent avatar lostintangent commented on June 14, 2024

@guyk-yahoo Interesting! The command palette and tree views work off the same data store, so it would seem like the authentication is working, but maybe you have an issue with the tree? Did you try both the Gists view on the Explorer tab, as well as the entirely separate GistPad tab? Do neither work for you?

from gistpad.

GuyKh avatar GuyKh commented on June 14, 2024

@guyk-yahoo Interesting! The command palette and tree views work off the same data store, so it would seem like the authentication is working, but maybe you have an issue with the tree? Did you try both the Gists view on the Explorer tab, as well as the entirely separate GistPad tab? Do neither work for you?

@lostintangent
Yep.
Both doesn't work

(Sorry about the two profiles - this is my personal profile, and I was writing from my work Github profile)

from gistpad.

guyk-yahoo avatar guyk-yahoo commented on June 14, 2024

@lostintangent
I think I have found the problem when I tried to debug the issue manually.

In node_modules/github-base/lib/utils.js - when I'm trying to debug the extension - I'm getting this (HardCoded):
image

When I switch https://api.github.com in that compiled file to my url - everything works well.

I'm not sure about how settings are passed there, but I feel it's a good lead

--- Update ---
I feel the problem is here:
https://github.com/vsls-contrib/gistpad/blob/master/src/store/auth.ts#L11

When creating the GitHub object, you don't pass the GitHub API URL, I'm not sure according to the documentation if you even can, but this seems to fail the authentication.
I'm not sure the github-base package is extensive enough to support custom GitHub apis.

I'm using in a different project of mine this: @octokit/rest (https://github.com/octokit/rest.js/) docs:(https://octokit.github.io/rest.js/) - which I think is far more extensive.

from gistpad.

GuyKh avatar GuyKh commented on June 14, 2024

@lostintangent ummmm I think I solved it.
Checkout the PR ^^

from gistpad.

lostintangent avatar lostintangent commented on June 14, 2024

Just shipped the update with this fix. Thanks so much for your help here!

from gistpad.

guyk-yahoo avatar guyk-yahoo commented on June 14, 2024

@lostintangent - Hey.
In the Explorer everything seems to be right.
In the dedicated Gist tab - it's still empty :(

image

from gistpad.

lostintangent avatar lostintangent commented on June 14, 2024

Are you using VS Code Insiders or Stable?

from gistpad.

GuyKh avatar GuyKh commented on June 14, 2024

Stable

from gistpad.

lostintangent avatar lostintangent commented on June 14, 2024

Do me a favor and open the GistPad and then reload VS Code (running the “Reload Window” command). After doing that, does the tab get populated with data?

I think there might be a bug in VS Code, where if a tree view is contributed to two different tabs, then only the first one that’s loaded is rendered properly.

from gistpad.

guyk-yahoo avatar guyk-yahoo commented on June 14, 2024

@lostintangent
Yeah - I did exactly this - only one of the two will work.
Known bug?

from gistpad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.