bswinnerton / launchbar-github

A LaunchBar action for GitHub
http://launchbar-github.com
MIT License
70 stars 7 forks source link

Error entering Github access token #70

Closed uparix closed 6 years ago

uparix commented 6 years ago

image

bswinnerton commented 6 years ago

Ut oh! Thanks for reporting this, @uparix. How did you go about adding the token? I just tried the process again from the README.md and it worked.

The rough steps looked something like this:

  1. Going to https://github.com/settings/tokens/new

  2. Selecting the repo and user scopes:

    screen shot 2017-07-16 at 1 41 25 pm
  3. Clicking the Copy Token button

    screen shot 2017-07-16 at 1 42 05 pm
  4. Going into the GitHub action and clicking "Settings"

    screen shot 2017-07-16 at 1 42 36 pm
  5. Chose "Set GitHub access token from clipboard"

    screen shot 2017-07-16 at 1 42 39 pm
  6. Which gave me this:

    screen shot 2017-07-16 at 1 42 41 pm

bswinnerton commented 6 years ago

My hunch would be that you didn't select the user scope when generating the token, which would make this similar to https://github.com/bswinnerton/launchbar-github/issues/37. Is that true @uparix?

I just tested this out and it looks like it works even if you don't select the user scope. @uparix, could you outline the steps you took and if the instructions above help?

uparix commented 6 years ago

Just tried it again as given in your instructions, but have the same result. Maybe the only difference is that I have two factor auth enabled. Not sure if that has an effect. I have selected user and repo scope, but it fails on line 38.

bswinnerton commented 6 years ago

Does it fail on step 4 or step 5?

uparix commented 6 years ago

Step 5

uparix commented 6 years ago

I verified that I have the access token in the clipboard

uparix commented 6 years ago

Now it worked. I created a new access token. But not sure if that was the issue. I guess you can close this issue.

bswinnerton commented 6 years ago

Hmph. That's bizarre, I'm not sure what exactly is causing this, but I'm relatively confident that the issue is happening right here.

I'll try to see if I can find a way to reproduce the issue. In the mean time, it'd be very helpful to see what the response is coming back from GitHub. You can do so by taking these steps:

  1. Opening up LaunchBar's Action Editor (I usually do this by invoking LaunchBar and typing "Action"

  2. Choosing the GitHub action on the left

  3. Enabling Debug Log

    screen shot 2017-07-16 at 3 38 04 pm
  4. Quit and reopen LaunchBar

  5. Repeating the steps to try and set the access token

  6. Open up the Console application (/Applications/Utilities/Console.app)

  7. Filter the requests by action=launchbar-github response=

From here, you should see the responses coming back from GitHub. As long as there is no sensitive information (like your token), it'd be great if you could post that here ❤️.

bswinnerton commented 6 years ago

Now it worked. I created a new access token. But not sure if that was the issue. I guess you can close this issue.

Ah, interesting. Were you reusing an older token, or one that was created just for LaunchBar?

I'm just curious for anyone else who may run into this problem.

bswinnerton commented 6 years ago

👋 @uparix,

I've created http://launchbar-github.com to hopefully assist with this sort of thing in the future. By clicking on "Install" on that page, it should go through the GitHub OAuth dance and automatically configure your OAuth token (as of version v0.2.6). No more having to go to https://github.com/settings/tokens/new and manually checking checkboxes.

I hope this helps people out in the future.

For now, I'm going to close out this issue since it sounds like you were able to resolve the problem. Thanks again for reporting it, and let me know if you have any feedback!