github / VisualStudio

GitHub Extension for Visual Studio
https://visualstudio.github.com
MIT License
2.38k stars 1.2k forks source link

Can‘t Login My Github Account #2465

Open QFJABC opened 4 years ago

QFJABC commented 4 years ago

Hello, I found that I could not log in when using this extension. There is no response to clicking the login button after entering the user name and password when opening the login dialog box. So I tried to log in with a browser, but I didn't respond after I clicked. Visual studio is the latest version 16.4.5, the extended version is 2.11.36.32419, and the system version is Windows 10 1909. I am Chinese, so my English is not very good, so language is translated, please forgive me. extension.log

jcansdale commented 4 years ago

Hello,

I wonder if this is being caused my a corrupted MEF cache. 🤔

Could you try installing the following extension: https://marketplace.visualstudio.com/items?itemName=MadsKristensen.ClearMEFComponentCache

Then go to Tools > Clean MEF Component Cache... and select Yes to continue. This will reset Visual Studio's component cache and might resolve the issue.

Please let me know if this works!

This issue appears to be the same as https://github.com/github/VisualStudio/issues/2450.

QFJABC commented 4 years ago

Sorry, that's didn't work. But thank you so much!

jcansdale commented 4 years ago

@QFJABC,

I'm sorry that didn't fix it.

I'm still thinking this might me a MEF issue.

Could you click on Show MEF Errors on the Tools menu and send me the output?

image

Hopefully there will be a clue in the logs!

QFJABC commented 4 years ago

Here are outputs, please have a look, Thank you so much! Outputs.zip

Outputs:
----- Catalog construction errors -----
Error #1
Microsoft.VisualStudio.Composition.PartDiscoveryException: 扫描类型"Microsoft.Cosmos.ScopeStudio.VsExtension.EditorExtension.ExpandColumnSmartTaggerProvider"时出错。 ---> System.TypeLoadException: 未能从程序集“Microsoft.VisualStudio.Language.Intellisense, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”中加载类型“Microsoft.VisualStudio.Language.Intellisense.SmartTag”。
   在 System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
   在 System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs)
   在 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
   在 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
   在 System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit)
   在 Microsoft.VisualStudio.Composition.AttributeServices.GetAttributes[T](ICustomAttributeProvider attributeProvider)
   在 Microsoft.VisualStudio.Composition.AttributedPartDiscoveryV1.GetExportMetadata(MemberInfo member)
   在 Microsoft.VisualStudio.Composition.AttributedPartDiscoveryV1.CreatePart(Type partType, Boolean typeExplicitlyRequested)
   在 Microsoft.VisualStudio.Composition.PartDiscovery.CombinedPartDiscovery.CreatePart(Type partType, Boolean typeExplicitlyRequested)
   在 Microsoft.VisualStudio.Composition.PartDiscovery.<>c__DisplayClass31_0.<CreateDiscoveryBlockChain>b__0(Type type)
jcansdale commented 4 years ago

I was wondering if you see the same error as here #2458?

QFJABC commented 4 years ago

No, here is the picture. Error

jcansdale commented 4 years ago

@QFJABC,

I see that you're using the latest version of Visual Studio and the GitHub extension. I'm going to update Visual Studio and make sure that it's working for me!

There could also be some other extension that is making happen. What other extensions do you have installed?

jcansdale commented 4 years ago

@QFJABC,

I've just tried Visual Studio 16.4.5 and the extension seems to be working for me. 😕

Parts of the GitHub extension are now part of Visual Studio 2019. The will still be available after you've uninstalled the extension.

Could you try the following:

  1. Uninstall the extension by doing the following form the Visual Studio command prompt:
    vsixinstaller /uninstall:c3d3dc68-c977-411f-b3e8-03b0dccf7dfc
  2. Open Visual Studio
  3. Click on Clone or check out code
  4. Click on the GitHub button
  5. See if you can sign on using the dialog

image

Please let me know if this works!

QFJABC commented 4 years ago

Click the GitHub button was no response when I after did that. Errors

jcansdale commented 4 years ago

@QFJABC ,

I'm surprised this isn't working!

I've created a project for running some tests. Could you try the following:

  1. Install the TestDriven.NET extension. You can find it here: https://marketplace.visualstudio.com/items?itemName=JamieCansdale.TestDrivenNet
  2. Clone the following repository: https://github.com/jcansdale/CheckGitHubVisualStudioMEF
  3. Open the solution and find this method: https://github.com/jcansdale/CheckGitHubVisualStudioMEF/blob/master/CheckGitHubVisualStudioMEF/CompositionServicesTest.cs#L13-L16
  4. Right-click inside the method and Test With > In-proc (VS SDK)

Please let me know what appears on the output pane. Do you see an exception or does it simply output GitHub.VisualStudio.CompositionServices?

image

Thanks!

QFJABC commented 4 years ago

It show me 'Couldn't find test targets.'

QFJABC commented 4 years ago

Errors

jcansdale commented 4 years ago

Thanks for trying this!

Could you make sure you're inside the Test method when you right-click?

QFJABC commented 4 years ago

Yes, I am sure.

jcansdale commented 4 years ago

Oh dear, it looks like a lot isn't working!

Could you try installing Visual Studio Preview and see if that works? https://visualstudio.microsoft.com/vs/preview/

QFJABC commented 4 years ago

Sorry, is there no other solution? It's not convenient for me to join the preview version, and I have this problem from the previous version. No matter the update is used, it's still the same.

jcansdale commented 4 years ago

Sorry, is there no other solution? It's not convenient for me to join the preview version, and I have this problem from the previous version. No matter the update is used, it's still the same.

Let's continue trying to find out what is failing exactly...

Could you try running the steps from here: https://github.com/github/VisualStudio/issues/2465#issuecomment-593706224

With DebugView running in the background: https://docs.microsoft.com/en-us/sysinternals/downloads/debugview

If you could send me the logs from there, it might show why TestDriven.NET is also failing.

QFJABC commented 4 years ago

Here are my logs. Error.LOG

QFJABC commented 4 years ago

Updated VisualStudio to 16.5.1 today and it still not working.

Splendoid commented 4 years ago

I am also having this problem :(

jcansdale commented 4 years ago

@Splendoid have you noticed any other extensions not working?

I'd be interested to know if you can run any methods using this: https://marketplace.visualstudio.com/items?itemName=JamieCansdale.TestDrivenNet

Simply create a void HelloWorld() method, right click inside it and Run Test(s). This is a much simpler extension than GitHub for Visual Studio and should work! If it doesn't, we'll know something is very broken.

jcansdale commented 4 years ago

Hi @QFJABC (and @Splendoid),

I think the issue you've been seeing might be this #2560. I've opened a PR that I hope will resolve the problem.

Could you try installing the artifact from this build: https://github.com/github/VisualStudio/pull/2562/checks?check_run_id=1309274757

You can find it here: https://github.com/github/VisualStudio/suites/1400504505/artifacts/23266202

After opening and installing the VSIX, can you let me know if it works any better? Any help confirming this fix would be much appreciated!