Plugin Can't install Miqo'te Hempen Camise For All: Error type: System.InvalidOperationException

serenamyr

New member
Hi,

I have been unable to install Miqo'te Hempen Camise For All (Lithe+/Rue+/Libelly) with the following error:

Code:
Error type: System.InvalidOperationException
   Message: Handle is not initialized.
   HResult: 0x80131509
   at Windows.Win32.PInvoke.RmRegisterResources(UInt32 dwSessionHandle, ReadOnlySpan`1 rgsFileNames, ReadOnlySpan`1 rgApplications, ReadOnlySpan`1 rgsServiceNames) in /_/obj/x64/Release/net9.0-windows/Microsoft.Windows.CsWin32/Microsoft.Windows.CsWin32.SourceGenerator/Windows.Win32.PInvoke.rstrtmgr.dll.g.cs:line 109
   at Windows.Win32.PInvoke.RmRegisterResources(UInt32 dwSessionHandle, ReadOnlySpan`1 rgsFileNames, ReadOnlySpan`1 rgApplications, ReadOnlySpan`1 rgsServiceNames) in /_/obj/x64/Release/net9.0-windows/Microsoft.Windows.CsWin32/Microsoft.Windows.CsWin32.SourceGenerator/Windows.Win32.PInvoke.rstrtmgr.dll.g.cs:line 74
   at Heliosphere.Util.RestartManager.GetLockingProcesses(String path) in /_/Util/RestartManager.cs:line 26
   at Heliosphere.Util.FileHelper.Wrap[T](String path, Func`2 action) in /_/Util/FileHelper.cs:line 80
   at Heliosphere.Util.FileHelper.Create(String path, Boolean createParents) in /_/Util/FileHelper.cs:line 45
   at Heliosphere.DownloadTask.<>c__DisplayClass151_0.<<DownloadFile>b__0>d.MoveNext() in /_/DownloadTask.cs:line 1083
--- End of stack trace from previous location ---
   at Polly.ResiliencePipeline.<>c.<<ExecuteAsync>b__3_0>d.MoveNext()
--- End of stack trace from previous location ---
   at Polly.ResiliencePipeline.ExecuteAsync(Func`2 callback, CancellationToken cancellationToken)
   at Heliosphere.DownloadTask.DownloadFile(Uri baseUri, String filesPath, String[] outputPaths, String hash) in /_/DownloadTask.cs:line 1077
   at Heliosphere.DownloadTask.<>c__DisplayClass141_0.<<DownloadNormalFiles>b__0>d.MoveNext() in /_/DownloadTask.cs:line 558
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__53`1.<<ForEachAsync>b__53_0>d.MoveNext()
--- End of stack trace from previous location ---
   at Heliosphere.DownloadTask.DownloadFiles(IDownloadTask_GetVersion info) in /_/DownloadTask.cs:line 539
   at Heliosphere.DownloadTask.Run() in /_/DownloadTask.cs:line 176

The following mod: https://heliosphere.app/mod/2txe5vkspd76z0vedjwhf73vfw appears to have issues downloading and results in the above exception every time I attempt to download it via the plugin.
 
Solution
Okay, I'm gonna make a big write-up to explain this, but the short of it is that there was an issue on the backend that has since been fixed. The PMP should work now, and probably the plugin install will also work? Not sure about the latter, but I'm certain about the former.
Unfortunately, that is not the real error. I'll release an update to handle the issue, but the actual error is that the file is already in use by another process. You might be multiboxing or something else is accessing a file in that mod.
 
I also tried v1.0.0 and got a different error

Code:
Error type: System.IO.IOException
   Message: Failed to create hard link (0xB7): D:\FFXIV Penumbra\hs-Miqo'te Hempen Camise For All (Lithe+-Rue+-Libelly)-1.0.0-nhS\.hs-old\_default\_default\chara\equipment\e0001\texture\v01_c0801e0001_top_b_id.tex -> D:\FFXIV Penumbra\hs-Miqo'te Hempen Camise For All (Lithe+-Rue+-Libelly)-1.0.0-nhS\files\_default\_default\chara\equipment\e0001\texture\v01_c0801e0001_top_b_id.tex
   HResult: 0x800700B7
   at Heliosphere.Util.FileHelper.CreateHardLink(String source, String destination) in /_/Util/FileHelper.cs:line 125
   at Polly.ResiliencePipeline.<>c.<Execute>b__29_0(ResilienceContext _, Action state)
--- End of stack trace from previous location ---
   at Polly.ResiliencePipeline.Execute(Action callback)
   at Heliosphere.DownloadTask.<>c__DisplayClass149_0.<<DuplicateFile>g__DuplicateInner|0>d.MoveNext() in /_/DownloadTask.cs:line 995
--- End of stack trace from previous location ---
   at Heliosphere.DownloadTask.DuplicateFile(String filesDir, IEnumerable`1 outputPaths, String path) in /_/DownloadTask.cs:line 973
   at Heliosphere.DownloadTask.DownloadFile(Uri baseUri, String filesPath, String[] outputPaths, String hash) in /_/DownloadTask.cs:line 1097
   at Heliosphere.DownloadTask.<>c__DisplayClass141_0.<<DownloadNormalFiles>b__0>d.MoveNext() in /_/DownloadTask.cs:line 558
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__53`1.<<ForEachAsync>b__53_0>d.MoveNext()
--- End of stack trace from previous location ---
   at Heliosphere.DownloadTask.DownloadFiles(IDownloadTask_GetVersion info) in /_/DownloadTask.cs:line 539
   at Heliosphere.DownloadTask.Run() in /_/DownloadTask.cs:line 176

I'll try restarting and see if that helps. I don't; know how anything else could be using the file...
 
Your second error is because the file it's trying to create already exists. After your restart, I'd recommend deleting the folder at D:\FFXIV Penumbra\hs-Miqo'te Hempen Camise For All (Lithe+-Rue+-Libelly)-1.0.0-nhSp before trying again.
 
Code:
Error type: System.InvalidOperationException
   Message: Handle is not initialized.
   HResult: 0x80131509
   at Windows.Win32.PInvoke.RmRegisterResources(UInt32 dwSessionHandle, ReadOnlySpan`1 rgsFileNames, ReadOnlySpan`1 rgApplications, ReadOnlySpan`1 rgsServiceNames) in /_/obj/x64/Release/net9.0-windows/Microsoft.Windows.CsWin32/Microsoft.Windows.CsWin32.SourceGenerator/Windows.Win32.PInvoke.rstrtmgr.dll.g.cs:line 109
   at Windows.Win32.PInvoke.RmRegisterResources(UInt32 dwSessionHandle, ReadOnlySpan`1 rgsFileNames, ReadOnlySpan`1 rgApplications, ReadOnlySpan`1 rgsServiceNames) in /_/obj/x64/Release/net9.0-windows/Microsoft.Windows.CsWin32/Microsoft.Windows.CsWin32.SourceGenerator/Windows.Win32.PInvoke.rstrtmgr.dll.g.cs:line 74
   at Heliosphere.Util.RestartManager.GetLockingProcesses(String path) in /_/Util/RestartManager.cs:line 26
   at Heliosphere.Util.FileHelper.Wrap[T](String path, Func`2 action) in /_/Util/FileHelper.cs:line 80
   at Heliosphere.Util.FileHelper.Create(String path, Boolean createParents) in /_/Util/FileHelper.cs:line 45
   at Heliosphere.DownloadTask.<>c__DisplayClass151_0.<<DownloadFile>b__0>d.MoveNext() in /_/DownloadTask.cs:line 1083
--- End of stack trace from previous location ---
   at Polly.ResiliencePipeline.<>c.<<ExecuteAsync>b__3_0>d.MoveNext()
--- End of stack trace from previous location ---
   at Polly.ResiliencePipeline.ExecuteAsync(Func`2 callback, CancellationToken cancellationToken)
   at Heliosphere.DownloadTask.DownloadFile(Uri baseUri, String filesPath, String[] outputPaths, String hash) in /_/DownloadTask.cs:line 1077
   at Heliosphere.DownloadTask.<>c__DisplayClass141_0.<<DownloadNormalFiles>b__0>d.MoveNext() in /_/DownloadTask.cs:line 558
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__53`1.<<ForEachAsync>b__53_0>d.MoveNext()
--- End of stack trace from previous location ---
   at Heliosphere.DownloadTask.DownloadFiles(IDownloadTask_GetVersion info) in /_/DownloadTask.cs:line 539
   at Heliosphere.DownloadTask.Run() in /_/DownloadTask.cs:line 176

Code:
Error type: System.InvalidOperationException
   Message: Handle is not initialized.
   HResult: 0x80131509
   at Windows.Win32.PInvoke.RmRegisterResources(UInt32 dwSessionHandle, ReadOnlySpan`1 rgsFileNames, ReadOnlySpan`1 rgApplications, ReadOnlySpan`1 rgsServiceNames) in /_/obj/x64/Release/net9.0-windows/Microsoft.Windows.CsWin32/Microsoft.Windows.CsWin32.SourceGenerator/Windows.Win32.PInvoke.rstrtmgr.dll.g.cs:line 109
   at Windows.Win32.PInvoke.RmRegisterResources(UInt32 dwSessionHandle, ReadOnlySpan`1 rgsFileNames, ReadOnlySpan`1 rgApplications, ReadOnlySpan`1 rgsServiceNames) in /_/obj/x64/Release/net9.0-windows/Microsoft.Windows.CsWin32/Microsoft.Windows.CsWin32.SourceGenerator/Windows.Win32.PInvoke.rstrtmgr.dll.g.cs:line 74
   at Heliosphere.Util.RestartManager.GetLockingProcesses(String path) in /_/Util/RestartManager.cs:line 26
   at Heliosphere.Util.FileHelper.Wrap[T](String path, Func`2 action) in /_/Util/FileHelper.cs:line 80
   at Heliosphere.Util.FileHelper.Create(String path, Boolean createParents) in /_/Util/FileHelper.cs:line 45
   at Heliosphere.DownloadTask.<>c__DisplayClass151_0.<<DownloadFile>b__0>d.MoveNext() in /_/DownloadTask.cs:line 1083
--- End of stack trace from previous location ---
   at Polly.ResiliencePipeline.<>c.<<ExecuteAsync>b__3_0>d.MoveNext()
--- End of stack trace from previous location ---
   at Polly.ResiliencePipeline.ExecuteAsync(Func`2 callback, CancellationToken cancellationToken)
   at Heliosphere.DownloadTask.DownloadFile(Uri baseUri, String filesPath, String[] outputPaths, String hash) in /_/DownloadTask.cs:line 1077
   at Heliosphere.DownloadTask.<>c__DisplayClass141_0.<<DownloadNormalFiles>b__0>d.MoveNext() in /_/DownloadTask.cs:line 558
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__53`1.<<ForEachAsync>b__53_0>d.MoveNext()
--- End of stack trace from previous location ---
   at Heliosphere.DownloadTask.DownloadFiles(IDownloadTask_GetVersion info) in /_/DownloadTask.cs:line 539
   at Heliosphere.DownloadTask.Run() in /_/DownloadTask.cs:line 176

Deleting the file didn't seem to help either .. I'm not sure how else to figure out if somethings touching the file.. it really shouldn't be Hm.
 
Yes, the handle not initialised error hasn't changed. It doesn't provide any useful information, unfortunately. Version 4.4.4 of the plugin is releasing currently. It should be available in ~5-10 minutes, and it should hopefully be able to show the real error as well as potentially the process that's got the file open. It's possible it could be antivirus, as well.

It's unlikely that it's the plugin itself, as I haven't made any changes to install logic in a long time, but I will test installing the mod on my computer tomorrow to make sure.
 
Code:
Error type: Heliosphere.Exceptions.AlreadyInUseException
   Message: File 'D:\FFXIV Penumbra\hs-Miqo'te Hempen Camise For All (Lithe+-Rue+-Libelly)-1.0.1-nhS\files\_default\_default\chara\equipment\e0001\model\c0201e0001_top.mdl' is already in use by 
   HResult: 0x80131620
   at Heliosphere.Util.FileHelper.Wrap[T](String path, Func`2 action) in /_/Util/FileHelper.cs:line 81
   at Heliosphere.Util.FileHelper.Create(String path, Boolean createParents) in /_/Util/FileHelper.cs:line 45
   at Heliosphere.DownloadTask.<>c__DisplayClass151_0.<<DownloadFile>b__0>d.MoveNext() in /_/DownloadTask.cs:line 1083
--- End of stack trace from previous location ---
   at Polly.ResiliencePipeline.<>c.<<ExecuteAsync>b__3_0>d.MoveNext()
--- End of stack trace from previous location ---
   at Polly.ResiliencePipeline.ExecuteAsync(Func`2 callback, CancellationToken cancellationToken)
   at Heliosphere.DownloadTask.DownloadFile(Uri baseUri, String filesPath, String[] outputPaths, String hash) in /_/DownloadTask.cs:line 1077
   at Heliosphere.DownloadTask.<>c__DisplayClass141_0.<<DownloadNormalFiles>b__0>d.MoveNext() in /_/DownloadTask.cs:line 558
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__53`1.<<ForEachAsync>b__53_0>d.MoveNext()
--- End of stack trace from previous location ---
   at Heliosphere.DownloadTask.DownloadFiles(IDownloadTask_GetVersion info) in /_/DownloadTask.cs:line 539
   at Heliosphere.DownloadTask.Run() in /_/DownloadTask.cs:line 176

Error type: System.IO.IOException
   Message: The process cannot access the file 'D:\FFXIV Penumbra\hs-Miqo'te Hempen Camise For All (Lithe+-Rue+-Libelly)-1.0.1-nhS\files\_default\_default\chara\equipment\e0001\model\c0201e0001_top.mdl' because it is being used by another process.
   HResult: 0x80070020
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.File.Create(String path)
   at Heliosphere.Util.FileHelper.Wrap[T](String path, Func`2 action) in /_/Util/FileHelper.cs:line 78
 
Yeah, it couldn't tell which process, unfortunately. I'll check tomorrow, but this is likely not the fault of the Heliosphere plugin. I'd check anti-virus and add exceptions, but otherwise not sure.
 
Well it definitely complains about inability to access, but doesn't seem to list what process, and I do find it odd that I can delete the file manually afterwards. I only run Windows Defender, but I'll try to add an exception to the folder.
 
Ah, okay, I also get the same error. The log has a warning that would have been useful to know!
Code:
01:06:17.430 | WRN | [heliosphere-plugin] V:ybw1m0y2as02z8mv8vngrqdrag has the same output path linked to multiple hashes, will use slow duplication
This is a rare edge-case, so I'll have to look into it, but it's a plugin bug. Nothing you can do (besides download the PMP and import it manually) until I've sorted it. Thanks for the report!
 
Ah, I should have thought to check the logs :D Thanks for the help. I did try manually downloading the PMP but it somehow only downloaded the default options and didn't contain the files for all the sub options. I have successfully found a version on the creators kofi page which I've used for now. Thanks again!
 
As a small update, this mod appears to have been uploaded during a small window of time (I think it was a few days?) when there was a bug in processing TTMP files. That's why the PMP doesn't have all the files, and that's also why the warning appears.

I still need to fix the issue you've brought up here, but this mod will be broken even when I do.
 
Okay, I'm gonna make a big write-up to explain this, but the short of it is that there was an issue on the backend that has since been fixed. The PMP should work now, and probably the plugin install will also work? Not sure about the latter, but I'm certain about the former.
 
Solution
Back
Top