Skip to content

Could not find a part of the path 'C:\Users\name\Appdata\Local\Temp\CdFileMgr\02a3e06-bc35-40.json'. #2342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
LadivItnas opened this issue Mar 4, 2018 · 18 comments
Labels
Windows Issues specific for Windows

Comments

@LadivItnas
Copy link

LadivItnas commented Mar 4, 2018

Background

CKAN Version:
1.24.0

KSP Version:
1.3.1.1819

Operating System:
Windows 10

Have you made any manual changes to your GameData folder (i.e., not via CKAN)?
No.

Problem

What steps did you take in CKAN?
Was installing mods: EVE, Scatterer, SVE, Science Full reward, Science alert

What did you expect to happen?
Mods being installed

What happened instead?

Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue, if you click Quit, the application will close immediately.
Could not find a part of the path 'C:\Users\name\Appdata\Local\Temp\CdFileMgr\02a3e06-bc35-40.json'.

Screenshots:
image
image
*Progress bar is stuck at 70%

CKAN error codes (if applicable):

************** Exception Text **************
System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\name\AppData\Local\Temp\CdFileMgr\02a3e0a6-bc35-40.json'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
   at ChinhDo.Transactions.WriteAllTextOperation.Execute()
   at ChinhDo.Transactions.TxFileManager.EnlistOperation(IRollbackableOperation operation)
   at CKAN.RegistryManager.Save(Boolean enforce_consistency)
   at CKAN.ModuleInstaller.InstallList(ICollection`1 modules, RelationshipResolverOptions options, IDownloader downloader)
   at CKAN.Main.InstallMods(Object sender, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
@HebaruSan HebaruSan added the Windows Issues specific for Windows label Mar 4, 2018
@HebaruSan
Copy link
Member

Interesting. Does this happen every time, or was it a one-off? Can you please check whether these folders exist?

  • C:\Users\name\Appdata
  • C:\Users\name\Appdata\Local
  • C:\Users\name\Appdata\Local\Temp

@LadivItnas
Copy link
Author

LadivItnas commented Mar 4, 2018

Yeah all of those folders exist sorry for the late reply

@HebaruSan
Copy link
Member

Thanks, what about C:\Users\name\Appdata\Local\Temp\CdFileMgr ?

Sorry, something went wrong.

@LadivItnas
Copy link
Author

Oh no it's not there

Sorry, something went wrong.

@LadivItnas
Copy link
Author

How do I get it back there?

Sorry, something went wrong.

@HebaruSan
Copy link
Member

That's quite strange! The Transactions library attempts to create that folder if it doesn't exist:

https://github.com/rsevil/Transactions/blob/8125415d5a74eb129d2d0311762362dfa2679193/src/ChinhDo.Transactions.FileManager/TxFileManager.cs#L16-L22

https://github.com/rsevil/Transactions/blob/8125415d5a74eb129d2d0311762362dfa2679193/src/ChinhDo.Transactions.FileManager/Utils/FileUtils.cs#L8-L20

As far as I know, there is nothing that would stop that call from succeeding, since you would always have access to your own Appdata\Local\Temp folder. Maybe one of those Windows Defender type things?

You could try creating the folder yourself in Windows Explorer:

  1. Open C:\Users\name\Appdata\Local\Temp
  2. Ctrl-shift-N to make a new directory
  3. Type CdFileMgr to set the name
  4. Press enter

@HebaruSan HebaruSan added the Support Issues that are support requests label Mar 4, 2018
@LadivItnas
Copy link
Author

Creating the folder seems to have fixed it (even if it's empty)
Thanks!

@pjf pjf removed the Support Issues that are support requests label Mar 4, 2018
@GargamelKSP
Copy link

Even after creating the folder previously, I added 2 new mods today, and it threw this error again. Manually adding the folder fixed it, again. Adding and removing previously cached/installed mods did not trigger this error.

@HebaruSan
Copy link
Member

Thanks, @GargamelKSP, that's a helpful clue. It means that something is deleting the folder, not just failing to create it.

Can you please check whether you have this "Storage Sense" thing turned on, and/or "Delete temporary files that my apps aren't using"? Maybe Windows 10 is deleting it in a scheduled background task:

@HebaruSan HebaruSan reopened this Mar 9, 2018
@GargamelKSP
Copy link

Nope, had to check, but it's turned off.

@GargamelKSP
Copy link

Downloading and installing new mods while CKAN is still open from a manual fix earlier, error is not thrown.

@GargamelKSP
Copy link

Closing Ckan, reopening it, and DL and installing new mods also did not throw an error this time. Previous (second) error was after a reboot.
If you need any other testing, ask.

@drewcocker
Copy link

Running CKAN in administrator mode fixes this for me.

@politas
Copy link
Member

politas commented Apr 27, 2018

Running CKAN in administrator mode fixes this for me.

Why would you do that? Do you not care about your PC becoming part of some bot army, using up all your CPU resources?

@linuxgurugamer
Copy link
Contributor

I haven't looked at the code that much, but:

It only checks to see if the folder is there when the TxFileManager is created. But this happens hours after it was created. I'm guessing that it creates it when you first go to the web, and relies on it being there for the duration of the session

@HebaruSan
Copy link
Member

Good call, so maybe we can work around this by changing how and when we create TxFileManager objects. A search turns up several that are private static readonly, which should possibly be shorter-lived and only created as needed...

@linuxgurugamer
Copy link
Contributor

I'll leave it in your hands

@linuxgurugamer
Copy link
Contributor

Suffice to say, I would really like to see this fixed. It's very annoying to have to close and reopen CKAN every few hours

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Windows Issues specific for Windows
Projects
None yet
Development

No branches or pull requests

7 participants