Installed 6.2 fresh tonight along with Twitch and other clients but Playnite never seems to be able to detect that Twitch is logged in when it does the handoff to the Twitch app and I return after auth.
I've created a diag package: 825b98df-07fb-4e01-9353-dba6f0423b51
A quick look at the playnite.log entries shows a bunch of entries complaining about the sqlite dll
2019-11-22 23:10:57.9306|ERROR:Failed to get Twitch auth token.System.DllNotFoundException: Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at SQLitePCL.SQLite3Provider.NativeMethods.sqlite3_open_v2(Byte[] filename, IntPtr& db, Int32 flags, Byte[] vfs)
at SQLitePCL.SQLite3Provider.SQLitePCL.ISQLite3Provider.sqlite3_open_v2(String filename, IntPtr& db, Int32 flags, String vfs)
at SQLite.SQLiteConnection..ctor(String databasePath, SQLiteOpenFlags openFlags, Boolean storeDateTimeAsTicks)
at Playnite.Common.Sqlite..ctor(String dbPath, SqliteOpenFlags openFlags)
at TwitchLibrary.TwitchLibrary.GetAuthToken()
Can you try reinstalling Playnite? Looks like some dll files were not installed properly.
Just tried it, and same result, i made a new diag package in case that helps but I expect the info is the same as last time: 5451542c-0b59-434a-bb95-993530f0de5e
I can see the sqlite3.dll in x64/x86 folders under %localappdata%\Playnite\, but there's none in the root, besides the PCL and net ones.
Using procmon I can see it's looking for it in the root, then checking windows folders, then walking everything in my %PATH%, failing to find it.
11:13:04.2148096 AM Playnite.DesktopApp.exe 19608 CreateFile C:\Users\Cian\AppData\Local\Playnite\sqlite3.DLL NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
11:13:04.2149227 AM Playnite.DesktopApp.exe 19608 CreateFile C:\Users\Cian\AppData\Local\Playnite\sqlite3.DLL NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
11:13:04.2150650 AM Playnite.DesktopApp.exe 19608 CreateFile C:\Windows\SysWOW64\sqlite3.DLL NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
11:13:04.2151556 AM Playnite.DesktopApp.exe 19608 CreateFile C:\Windows\System\sqlite3.DLL NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
11:13:04.2152364 AM Playnite.DesktopApp.exe 19608 CreateFile C:\Windows\sqlite3.DLL NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
11:13:04.2153157 AM Playnite.DesktopApp.exe 19608 CreateFile C:\Users\Cian\AppData\Local\Playnite\sqlite3.DLL NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
and so on...
I have no idea why is this happening, I can't reproduce it on any of my systems. sqlite3.dll is always loaded properly. If you manually move sqlite3.dll to Playnite's root folder, does it fix the issue for your?
Strangely, no. I tried that when I saw where it was looking for the DLL, with both the x86 and x64 binaries in case of some dll signature / arch mismatch.
I cloned the repo and once I eventually got the DesktopApp to build and run, I still saw the exact same issue, when you get here:
Playnite.Common.dll!Playnite.Common.Sqlite.Sqlite(string dbPath, Playnite.Common.SqliteOpenFlags openFlags) Line 32 C#
TwitchLibrary.dll!TwitchLibrary.TwitchLibrary.GetAuthToken() Line 88 C#
TwitchLibrary.dll!TwitchLibrary.TwitchLibrarySettings.IsUserLoggedIn.get() Line 40 C#
it breaks, failing to find sqlite3.dll.
I tried a few minor things to see if i could nudge nuget to "do the right thing" and restore and provide the missing DLL (since that seems to be either SQLite-net or SQLitePCL.raw's job) but still no success.
I did manage to get it working _once_, by upgrading both SQLite-net (from 1.1 to 1.6.292 - 1.1 is from Jan 2016) and SQLitePCL.raw (0.84 to 0.9 - 0.84 is from Nov 2015) to their latest versions from nuget - it successfully booted and authed with Twitch. But when i tried to re-create the steps again before posting this comment it fails now to find e_sqlite3.dll. 🤷🏻♂️
I did just now also try the Portable release of 6.2 and it has the same issue for me - portable shouldn't have any issue with DLL install, correct?
So I don't really know what's up here. If you're not getting a lot of other reports on it, this issue might not be actionable for you.
The only difference between portable and installed versions is where they store user data, everything else is the same.
You are the only who reported this so far and Twitch integration is there for almost a year now. It must be something weird with your system, but I have not idea what.
The reason we reference older sqlite-net is because new packages are built for netstandard 2 and this brings a lot of additional references from .NET Core and causing some issues in references everywhere, because we are still targeting Framework 4.6.2. I'll be updating everything to latest versions once we switch from Framework to Core in #1141
Sounds like the issue may be missing the MSVC 2015 C++ Redistributable (for x86 or x64, whichever applicable). The sqlite3.dll shipped requires it.
Edit, link: https://www.microsoft.com/en-us/download/details.aspx?id=48145
We already bundle 2015 VC++ redist files with Playnite because of CefSharp, separate installation shouldn't be needed (won't hurt to try installing it though).
Whoops, sorry. I misidentified it. It's using the MSVC __2012__ runtime. (msvcr110.dll, to be specific).
Wow @psychonic you hit it on the head it seems, thanks. I installed x86 of VC++ 2012 and it worked first time.
This is a pretty clean machine; I just built it from scratch a few weeks ago and it doesn't have a ton of games on it yet, so not a lot of VC++ redists installed. I assume some game would have required this particular redist install at some point and I'd luck into having the right dependency.
So it seems @JosefNemec we can consider my particular issue fixed - thanks for your patience and input. Is there something to fix in that Playnite doesn't install / require users to install it? It seems the majority must have this version pre-installed due to some other game / app requirement to not be seeing this issue?
I'll start bundling 2012 redists, that should prevent this from happening to anybody else.
Fixed in 6.4