Unable to connect to DVLS datasource on "Clean" machine(s)

Unable to connect to DVLS datasource on "Clean" machine(s)

avatar

Hi,

i am trying to connect to a dvls datasource with the remotedesktopmanager powershell module on a Clean windows 11 machine (just installed it) and want to connect to DVLS. The error is also appearing on server type os and a VM i work on.

I constantly getting an error :
DllNotFoundException - Unable to load DLL 'sqlite3secure' or one of its dependencies: the specified module could not be found. (0x8007007E)

One side note on the machines i am testing with is that RDM is NOT installed.
Because we are trying to automate some workflows i dont want to install (and maintain) the RDM client on our DevOps Agents.

server 2022.3.12.0
remotedesktopmanager module 2022.3.1.4

Thanks

All Comments (22)

avatar

Hi,

As no RDM is installed on your machine, the PowerShell module first creates a default SQLite data source.
Looking for sqlite3secure is normal. That dll is shipped with out module however and should be found.
I'll look at the 2022.3.1.4 version stored on PSGallery to make sure it's not corrupted somehow.

Regards

Jonathan Lafontaine

avatar

I tested this today and a couple of weeks ago. Then i had the same error. (FYI)

avatar

What is your PowerShell version?

Jonathan Lafontaine

avatar

both 7.3.2 And 5 having this issue

avatar

Windows 10/11 x64?

I don't have your error running on a fresh Windows 10 x64 environment so there must be something else causing this.

Jonathan Lafontaine

avatar

i am having this on a fresh installed windows 11 (lenovo machine and on a vm).
also on windows server 2022 (clean installed)

windows 10 i did not test

avatar

I'll test on Windows 11.

Jonathan Lafontaine

avatar

Thanks

avatar

Hmm, no problem on Windows 11 either.

If you execute Get-Module -ListAvailable, you should get the directory where the RDM module is installed.
If you go in the module's installation folder, is there a win-x64 folder and does it contain sqlite3secure.dll?

Jonathan Lafontaine

avatar

Hi,

sure. The file is there.
(quick lookup from home on powershell 5)
forum image

avatar

Just to make absolutely sure you are actually loading this module, could run the Get-RDMInstance command?

Jonathan Lafontaine

avatar

Yes sure:

forum image

get-rdminstance
DllNotFoundException - Unable to load DLL 'sqlite3secure': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

   at System.Data.SQLite.UnsafeNativeMethods.sqlite3_config_none_other(SQLiteConfigOpsEnum op)
   at System.Data.SQLite.UnsafeNativeMethods.Sqlite3_Config_None(SQLiteConfigOpsEnum op)
   at System.Data.SQLite.SQLite3.StaticIsInitialized()
   at System.Data.SQLite.SQLiteLog.Initialize()
   at System.Data.SQLite.SQLiteConnection..ctor(String connectionString, Boolean parseViaFramework)
   at Devolutions.RemoteDesktopManager.Business.DataSources.SQLiteConnectionDataSource.CreateDbConnection(String connectionString)
   at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseConnectionDataSource.CreateDbConnection(Boolean master, Nullable`1 connectTimeout)
   at Devolutions.RemoteDesktopManager.Business.DataSources.SqLiteUpdater.FetchDatabaseVersion()
   at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseUpdater.RefreshVersionNumber()
   at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseUpdater.get_DatabaseVersion()
   at Devolutions.RemoteDesktopManager.Business.DataSources.DatabaseUpdater.get_IsUpgradeRequired()
   at Devolutions.RemoteDesktopManager.Managers.DataSourceManager.IsDatabaseUpgradeRequired(BaseConnectionDataSource dataSource)
   at Devolutions.RemoteDesktopManager.Managers.DataSourceManager.UpgradeDatabase(BaseConnectionDataSource dataSource)
   at Devolutions.RemoteDesktopManager.Managers.ConnectionManager.LoadConnectionsFromDataSource(ConnectionEngine engine, Boolean hasChanged)
   at Devolutions.RemoteDesktopManager.Managers.ConnectionManager.LoadConnections(BaseConnectionDataSource dataSource)

ApplicationVersion OptionFilename
------------------ --------------
2022.3.1.4         C:\Users\WDAGUtilityAccount\AppData\Local\Devolutions\RemoteDesktopManager\RemoteDesktopManager.cfg



avatar

I might have been looking in the wrong direction.
Since the dll is where it's supposed to be, you might be missing a dependency.
sqlite3secure has only one, Microsoft Visual c++ 2015-2022 (version 14).

Do you have that installed for your architecture?

Jonathan Lafontaine

avatar

No, i only install that when needed.

But if its a dependency for a powershell module this should be included right?
i wil try to test it for you

avatar

If this turns out the be the problem, I will have to investigate if it's possible to list platform specific dependencies on PowerShellGallery.

Jonathan Lafontaine

avatar

Yes, that did the trick.
forum image

I can add the software to my devops agents for now.
But would it be possible to add this to the module? (or list the dependency somewhere?)

avatar
If this turns out the be the problem, I will have to investigate if it's possible to list platform specific dependencies on PowerShellGallery.


THanks, i just missed this reply before my reaction.

avatar

If there's not way to handle dependencies automatically, I'll check if I can detect if the package is installed and warn the user when needed.
I'll also write the dependency list in the package info but I have a feeling that might go unnoticed.

Jonathan Lafontaine

avatar

Sounds good to me. I think that a clear error message would be the best thing here (if its not possible to add before)

Thanks for the help :)

avatar

My pleasure!

Jonathan Lafontaine

avatar

@Jonathan Lafontaine still an issue two years later (using PS module version 2025.2.3). Installing latest Microsoft Visual C++ Redistributable (here), does work however, so something just needs to warn/prompt to install that dependency. Otherwise user's have to go dig through the forums like I just did to find the expected solution.

avatar

@hbas Thanks for the feedback.
I'll let the concerned team know this is still an issue.

Jonathan Lafontaine