VST3PluginFormat::searchPathsForPlugins kinda works, PluginDirectoryScanner::scanNextFile doesn't

Application type: Plugin Host
Platform: Windows
IDE: VS 2019
Juce version: 6.0.7

I am trying to scan directories for VST3 plugins, and getting nowhere with PluginDirectoryScanner. I’ve confirmed I have VST3 plugins in the default directory; some are nested within folders, some are not. Here is my code:

void Host::scan () {
	juce::KnownPluginList pluginList {};
	juce::AudioPluginFormatManager manager;
	juce::VST3PluginFormat vst3 {};
	scanner = &juce::PluginDirectoryScanner(pluginList, vst3, vst3.getDefaultLocationsToSearch(), true, juce::File(), true);
	int pluginIndex = 0;

	bool hasNextFile = true;

	auto scanResult = vst3.searchPathsForPlugins(vst3.getDefaultLocationsToSearch(), true, true);

	while (hasNextFile) {
		DBG("while (hasNextFile) pluginIndex: ");
		try {
			const juce::String nextPluginName = scanner->getNextPluginFileThatWillBeScanned();
			DBG("Scanning plugin...");
			juce::String pluginName;
			DBG("Scanned plugin: ");
			hasNextFile = scanner->scanNextFile(false, pluginName);
		} catch (std::exception& e) {
			DBG("Error scanning plugins: ");
		auto failed = scanner->getFailedFiles();

	DBG("Scanning complete.");

After this executes, scanResult has 1 string in it, with the correct path to one of my .vst3 files. It should have 2 based on the .vst3 files in the directory, and if it was truly recursing, there should be a total of 5 plugins.

pluginList on the other hand is completely empty. I’ve put in breakpoints, and in the above code, pluginName and nextPluginName are always empty, but the code loops the proper amount of times (5 times). If I add a new .vst3 file into the directory, the code loops 6 times.

So it seems to be seeing the files but not interpreting them as vsts? Feel like I’m losing my mind on this one, especially since VST3PluginFormat at least returns something. Any help is much much much appreciated!