Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension throws error when starting Visual Studio #43

Closed
carrved opened this issue Oct 12, 2023 · 17 comments
Closed

Extension throws error when starting Visual Studio #43

carrved opened this issue Oct 12, 2023 · 17 comments
Labels
bug Something isn't working

Comments

@carrved
Copy link

carrved commented Oct 12, 2023

Extension fails to load when starting Visual Studio.

Here's the ActivityLog:
ActivityLog.xml.txt

@carrved
Copy link
Author

carrved commented Oct 12, 2023

Also throws this error when starting Visual Studio:

image

@Zagrthos
Copy link

Zagrthos commented Oct 12, 2023

Same error here using VS 17.7.5
Log output is this:

<entry> <record>1610</record> <time>2023/10/12 20:16:26.378</time> <type>Error</type> <source>VisualStudio</source> <description>SetSite failed for package [VisualStudioDiscordRPCPackage]Source: &apos;VisualStudioDiscordRPC.Dev17&apos; Description: Das Objekt des Typs &quot;VisualStudioDiscordRPC.Shared.Plugs.AssetPlugs.NoneAssetPlug&quot; kann nicht in Typ &quot;VisualStudioDiscordRPC.Shared.Plugs.TextPlugs.BaseTextPlug&quot; umgewandelt werden.&#x000D;&#x000A;System.InvalidCastException: Das Objekt des Typs &quot;VisualStudioDiscordRPC.Shared.Plugs.AssetPlugs.NoneAssetPlug&quot; kann nicht in Typ &quot;VisualStudioDiscordRPC.Shared.Plugs.TextPlugs.BaseTextPlug&quot; umgewandelt werden.&#x000D;&#x000A; at VisualStudioDiscordRPC.Shared.Services.PlugService.GetPlugById[TPlug](String id)&#x000D;&#x000A; at VisualStudioDiscordRPC.Shared.PackageController.ApplySettings()&#x000D;&#x000A; at VisualStudioDiscordRPC.Shared.PackageController.Init()&#x000D;&#x000A; at VisualStudioDiscordRPC.Shared.VisualStudioDiscordRPCPackage.&lt;InitializeAsync&gt;d__2.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A; at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)&#x000D;&#x000A; at Microsoft.VisualStudio.Shell.AsyncPackage.&lt;&gt;c__DisplayClass21_0.&lt;&lt;Microsoft-VisualStudio-Shell-Interop-IAsyncLoadablePackageInitialize-Initialize&gt;b__1&gt;d.MoveNext()&#x000D;&#x000A;--- End of stack trace from previous location where exception was thrown ---&#x000D;&#x000A; at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()&#x000D;&#x000A; at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e)&#x000D;&#x000A; at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck)</description> <guid>{5CD3D640-3D33-45EA-8C5B-6DE981FF9900}</guid> <hr>0x80004002 - E_NOINTERFACE</hr> <errorinfo></errorinfo> </entry>

@Reavert Reavert added the bug Something isn't working label Oct 12, 2023
@Reavert
Copy link
Owner

Reavert commented Oct 12, 2023

Perhaps this is due to a change in the storage location of the settings.
Can you also attach a file that is located at %LocalAppData%/VisualStudioDiscordRPC/settings.json?
I would like to make sure that everything is fine with the settings.

@Zagrthos
Copy link

Zagrthos commented Oct 12, 2023

I attach mine too, thanks for the extension btw 🙂
settings.json

Edit:
Interesting, it says version 1.5.1 though I downloaded the newest from the extension store inside VS...

@Reavert
Copy link
Owner

Reavert commented Oct 12, 2023

@Zagrthos I found the reason of your error.
To fix that, replace:
"StatePlug": "NoneAssetPlug",
to:
"StatePlug": "NoneTextPlug",

@Reavert
Copy link
Owner

Reavert commented Oct 12, 2023

But it seems to me that @1nade has another problem.
I'm still figuring out your problem, but if this fix or upgrade to 1.6.1 helps you too, please let me know.

@Zagrthos
Copy link

Installing the new update solved it, thanks!

@Reavert
Copy link
Owner

Reavert commented Oct 15, 2023

@1nade Is your error still actual after the installing 1.6.1 extension patch?

@carrved
Copy link
Author

carrved commented Oct 18, 2023

yeah, same error and everything

@Reavert
Copy link
Owner

Reavert commented Oct 18, 2023

Attach, please, your settings file (%LocalAppData%/VisualStudioDiscordRPC/settings.json)

@Kaffu093
Copy link

I'm having the same problem, here is my settings.json:

{
  "RichPresenceEnabled": true,
  "Language": "English",
  "LargeIconPlug": "ExtensionIconPlug",
  "SmallIconPlug": "VisualStudioVersionIconPlug",
  "DetailsPlug": "FileNameTextPlug",
  "StatePlug": "SolutionNameTextPlug",
  "TimerPlug": "FileScopeTimerPlug",
  "FirstButtonPlug": "GitRepositoryButtonPlug",
  "SecondButtonPlug": "NoneTextPlug",
  "ApplicationID": "914622396630175855",
  "UpdateTimeout": 1000,
  "Version": "1.0.0",
  "UpdateNotifications": true,
  "TranslationsPath": "Translations/"
}

@Kaffu093
Copy link

So, the extension was updated recently and looks that the error was resolved, thank you!

@carrved
Copy link
Author

carrved commented Oct 19, 2023

Attach, please, your settings file (%LocalAppData%/VisualStudioDiscordRPC/settings.json)

here you go:
settings.json

@Reavert
Copy link
Owner

Reavert commented Oct 19, 2023

Strange. The file is filled with Null only.
Then I will add processing soon, in case the settings file gets corrupted.

@carrved
Copy link
Author

carrved commented Oct 19, 2023

i have vs 2022 enterprise, let me try to install it on community

@Reavert
Copy link
Owner

Reavert commented Oct 20, 2023

Is this the first time you installed an extension? Or did you have it installed before and you used it, and then updated and everything broke?

@carrved
Copy link
Author

carrved commented Oct 27, 2023

Is this the first time you installed an extension? Or did you have it installed before and you used it, and then updated and everything broke?

it fixed itself after i reinstalled windows, i guess it was just a bug with my pc 🤷 thank you for helping

@Reavert Reavert closed this as completed Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants