Jeshibu / PlayniteExtensions

MIT License
30 stars 5 forks source link

Object Reference Not Set To An Instance of an Object #9

Closed CartCollector closed 2 years ago

CartCollector commented 2 years ago

Recently, my Legacy Games library titles are no longer being detected. I tried uninstalling and reinstalling the Legacy launch -and- your plugin, but I keep getting this error when I try to refresh my Legacy library in Playnite:

Failed to get Legacy Games games: Object reference not set to an instance of an object.

I've made sure to install at least one title.

CartCollector commented 2 years ago

playnite.log extensions.log

Jeshibu commented 2 years ago

It's choking on something in your %APPDATA%\legacy-games-launcher\app-state.json file. Could you send it after redacting your personal details? Sort of like this

What to redact:

CartCollector commented 2 years ago

redacted app-state.json.txt

Jeshibu commented 2 years ago

Thanks! This should be fixed in the latest release. Apparently there's a few bundles that have no games field at all, among them the Rubek (sign up) bonus game. You own another bundle that is also Rubek though, so this shouldn't cause issues with games missing from the import.

Let me know how you fare with it now.

CartCollector commented 2 years ago

It seems to work! It imported 4 titles, then seemed to pause for about a minute before quickly importing the rest.

Side note on a different quirk: while testing early, I

When reinstalling the Launcher and plugin, I still couldn't update my library -- but the titles that had been previously read were displayed in Playnite under the Legacy section. That is, deleting the games, launcher, plugin, and plugin data seemed to leave the titles (or phantom) entries in Playnite. Is this supposed to happen?

Jeshibu commented 2 years ago

Playnite never deletes games unless you tell it to, and library extensions normally don't delete games either. This is mostly to not have your games (that you spent some time on editing) deleted because, say, Steam had an outage and returned an empty games list.

CartCollector commented 2 years ago

Ah -- I assumed it was something like that. I wasn't seeing the entries after removing the plug-in, so I was confused... but I assume they are in the general Playnite "titles" database.

Jeshibu commented 2 years ago

Yeah if you remove a library plugin the games have a library plugin ID field that doesn't have a corresponding plugin, so it doesn't have a plugin to pull the library name from anymore. Anyway glad it's fixed now!