confluentinc / vscode

Confluent for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=confluentinc.vscode-confluent
Apache License 2.0
13 stars 3 forks source link

"Report an issue" doesn't work within VSCode #295

Closed derek1ee closed 1 month ago

derek1ee commented 1 month ago

Code of Conduct

On what operating system are you seeing the problem?

macOS (Apple/arm64)

VS Code version

Version: 1.93.1 (Universal) Commit: 38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40 Date: 2024-09-11T17:20:05.685Z Electron: 30.4.0 ElectronBuildId: 10073054 Chromium: 124.0.6367.243 Node.js: 20.15.1 V8: 12.4.254.20-electron.0 OS: Darwin arm64 22.6.0

Version of Confluent extension

v0.16.3

To Reproduce

  1. Open the "Confluent" tab from left nav
  2. Under "Support", select "Report an issue"
  3. Fill in details, make sure all required fields are complete
  4. Click "Create on GitHub"

Current vs. Expected behavior

Expect: Able to create an issue on github

Actual: No response upon clicking the button

Relevant log output

No response

Which area(s) are affected? (Select all that apply)

Installation

Additional context

No response

jlrobins commented 1 month ago

Hi Derek,

The 'Report an issue' functionality makes use of common infrastructure internal to VS Code. When you hit the 'Preview on GithHub,' submit button on the the form, it hands off to your system's web browser with a URL to GitHub that prefills out GitHub's issue reporter form, for you to then refine and submit. Apologies that it did not work for you that time. Could the browser window perhaps have been obscured or perhaps blocked at the GitHub login flow? Could you perhaps try again and confirm? Thanks!

I just used it to create https://github.com/confluentinc/vscode/issues/297, and it worked as expected.

shouples commented 1 month ago

@derek1ee one more suggestion: when you have the Issue Reporter window open, try to open the dev tools panel (F12) before trying to submit an issue; there may be some silent network errors happening:

image
derek1ee commented 1 month ago

I was not able to open the dev tool panel?

Just tried this again, it looks like the issue only repros when "Confluent" extension is selected, if I change it to "C#" for example, a browser tab is successfully opened and an issue created.

Do we have some additional validation maybe that blocks issue creation from vsode?

shouples commented 1 month ago

I was not able to open the dev tool panel?

@derek1ee it looks like this may be controlled by a new Issue Reporter setting released in 1.93:

image

Try this:

F12 (or fn+F12, depending on keyboard settings) should now surface the dev tools panel.

Let me know if this helps at all!

edit: I've filed an issue in the VS Code repo so their developers are also tracking this behavior: https://github.com/microsoft/vscode/issues/229741

derek1ee commented 1 month ago

@shouples turning the experimental feature off allowed me to open F12 to see network traffic. Looks like the POST call failed 403 Forbidden:

{ "message": "Resource protected by organization SAML enforcement. You must grant your OAuth token access to this organization.", "documentation_url": "https://docs.github.com/articles/authenticating-to-a-github-organization-with-saml-single-sign-on/", "status": "403" }

shouples commented 1 month ago

@derek1ee that helps, thanks! Do you see any indicators in the Accounts section prompting for additional GitHub sign-in or anything?

image
derek1ee commented 1 month ago

@shouples Doesn't appear to be, see screenshot below. I will send you the network trace offline.

Screenshot 2024-09-27 at 9 48 01 AM
shouples commented 1 month ago

Thanks again for your patience on this one @derek1ee -- I'm going to go ahead and close this since it isn't specifically related to our extension.

For anyone else that encounters this behavior, this seems to be related to how VS Code handles SAML sessions when the user is part of a GitHub organization that requires SAML/SSO.

Within VS Code, a basic authentication with GitHub (like for settings sync) only requires the email scope, but other extensions (like GitHub Pull Requests) will require more, that may prompt users to reauthenticate and/or show users this kind of GitHub page from their default browser:

image

Once the user clicks "Authorize" for their given organization, the Issue Reporter functionality should work as expected and stop returning 403 errors.