microsoft/vscode-ai-toolkit

GitHub API forbidden

timheuer opened this issue ยท 6 comments

Type: Bug

ebug: AgentRpc-pipe-#1 [0] 2024-05-22T09:36:40.3023734-07:00 AI rpc extension for type:GetInferenceModelsRequest
Debug: AgentRpc-pipe-#1 [0] 2024-05-22T09:36:40.514899-07:00 AI rpc elapsed:00:00:00.2125048 for type:GetInferenceModelsRequest
Error: AgentRpc-pipe-#1 [4673] 2024-05-22T09:36:40.5157971-07:00 Failed to handle request id:6 error: [Error loading JSON from GitHub: GitHub API request failed with status code Forbidden, at WorkspaceAutomation.Catalog.GitHubDownloaderExtensions.d__11.MoveNext() + 0x77d --- End of stack trace from previous location --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b at WorkspaceAutomation.WorkspaceWorkflowWizard.<LoadJsonContentAsync>d__61.MoveNext() + 0x12a
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b
at WorkspaceAutomation.Agent.RpcServerExtensions.RpcAgentExtension.d__15.MoveNext() + 0x124
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b
at WorkspaceAutomation.Agent.RpcServerExtensions.RpcAgentExtension.d__6.MoveNext() + 0x8c3
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b
at WorkspaceAutomation.Rpc.RpcServerBase.d__24.MoveNext() + 0x151
--- End of stack trace from previous location ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b
at WorkspaceAutomation.Rpc.RpcServer.<>c__DisplayClass13_2.<b__4>d.MoveNext() + 0xf3]
[2024-05-22T16:36:43.021Z] [INFO] telemetry event:model_catalog_open sent

Extension version: 0.3.1
VS Code version: Code - Insiders 1.90.0-insider (81c89c4d00663e1718871bab2f9bf2064a060b63, 2024-05-22T09:31:22.258Z)
OS version: Windows_NT x64 10.0.22621
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-11370H @ 3.30GHz (8 x 3302)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 31.84GB (6.74GB free)
Process Argv --crash-reporter-id 5f5d2ab1-465c-4ddc-809d-58d91db5dfb0
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
vsaa593:30376534
py29gd2263:31024238
vscaac:30438845
c4g48928:30535728
2i9eh265:30646982
962ge761:30841072
pythongtdpath:30726887
welcomedialog:30812478
pythonidxpt:30768918
pythonnoceb:30776497
asynctok:30898717
dsvsc013:30777762
dsvsc014:30777825
dsvsc015:30821418
pythontestfixt:30866404
pythonregdiag2:30926734
pythonmypyd1:30859725
pythoncet0:30859736
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30870582
dsvsc016:30879898
dsvsc017:30880771
dsvsc018:30880772
cppperfnew:30980852
pythonait:30973460
showvideot:31016890
chatpanelt:31014475
da93g388:31013173
a69g1124:31018687
dvdeprecation:31040973
pythonprt:31036556
dwnewjupyter:31046869
nb_pri_only:31052048
26j00206:31048877

@timheuer is your GitHub account in "Microsoft" org? If so, please signout and signin again GitHub account in VSC, and make sure to authorize to access "Microsoft" org.

Detailed steps:

  • Sign out GitHub account from VSC
  • Reload VSC and AI Toolkit will ask to sign in GitHub again
  • [Important] In browser's authorize page, make sure to authorize the app to access "Microsoft" org
    image

Reporting similar bug. Work around helped but, sharing to show I just had similar bug

Error: AgentRpc-pipe-#1 [4673]  2024-05-29T10:37:59.5957667-04:00 Failed to handle request id:0 error: [Error loading JSON from GitHub: GitHub API request failed with status code Forbidden,    at WorkspaceAutomation.Catalog.GitHubDownloaderExtensions.<LoadJsonFromGitHubAsync>d__1`1.MoveNext() + 0x77d
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b
   at WorkspaceAutomation.WorkspaceWorkflowWizard.<LoadJsonContentAsync>d__6`1.MoveNext() + 0x12a
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b
   at WorkspaceAutomation.Agent.RpcServerExtensions.RpcAgentExtension.<HandleGetInferenceModelsRequestAsync>d__15.MoveNext() + 0x124
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b
   at WorkspaceAutomation.Agent.RpcServerExtensions.RpcAgentExtension.<HandleRequestAsync>d__6.MoveNext() + 0x8c3
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b
   at WorkspaceAutomation.Rpc.RpcServerBase.<HandleRequestAsync>d__24.MoveNext() + 0x151
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b
   at WorkspaceAutomation.Rpc.RpcServer.<>c__DisplayClass13_2.<<ReceiveInternalAsync>b__4>d.MoveNext() + 0xf3]
Debug: OpenAIService.Onnx.OpenAIServiceOnnx [0]  2024-05-29T10:37:59.602163-04:00 GetModels
Debug: AgentRpc-pipe-#1 [0]  2024-05-29T10:37:59.7170489-04:00 AI rpc extension for type:GetInferenceModelsRequest
Debug: AgentRpc-pipe-#1 [0]  2024-05-29T10:37:59.87835-04:00 AI rpc elapsed:00:00:00.1613807 for type:GetInferenceModelsRequest
Error: AgentRpc-pipe-#1 [4673]  2024-05-29T10:37:59.8787866-04:00 Failed to handle request id:1 error: [Error loading JSON from GitHub: GitHub API request failed with status code Forbidden,    at WorkspaceAutomation.Catalog.GitHubDownloaderExtensions.<LoadJsonFromGitHubAsync>d__1`1.MoveNext() + 0x77d
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b
   at WorkspaceAutomation.WorkspaceWorkflowWizard.<LoadJsonContentAsync>d__6`1.MoveNext() + 0x12a
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b
   at WorkspaceAutomation.Agent.RpcServerExtensions.RpcAgentExtension.<HandleGetInferenceModelsRequestAsync>d__15.MoveNext() + 0x124
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b
   at WorkspaceAutomation.Agent.RpcServerExtensions.RpcAgentExtension.<HandleRequestAsync>d__6.MoveNext() + 0x8c3
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b
   at WorkspaceAutomation.Rpc.RpcServerBase.<HandleRequestAsync>d__24.MoveNext() + 0x151
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x20
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0xb2
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task, ConfigureAwaitOptions) + 0x4b
   at WorkspaceAutomation.Rpc.RpcServer.<>c__DisplayClass13_2.<<ReceiveInternalAsync>b__4>d.MoveNext() + 0xf3]
   

@swatDong same scenario here, your workaround fixed it, thanks!

Should we add this to the QA / FAQ?

Best

yes same issue please add this to FAQ

Thanks all for the suggestion. Added to FAQ

Pinned this issue. And we do have the proposal to remove the github account dependency.

A quicker way to do this in the current builds is when you are asked to sign into GitHub, e.g., when viewing the model catalog, just make sure you click on the Microsoft organization if you are a Microsoft Employee. No need to sign out and sign back into GH.

image