Skip to content
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

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

Closed
LadivItnas opened this issue Mar 4, 2018 · 18 comments

Comments

@LadivItnas
Copy link

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 label Mar 4, 2018
@HebaruSan

This comment has been minimized.

Copy link
Member

commented Mar 4, 2018

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

This comment has been minimized.

Copy link
Author

commented Mar 4, 2018

Yeah all of those folders exist sorry for the late reply

@HebaruSan

This comment has been minimized.

Copy link
Member

commented Mar 4, 2018

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

@LadivItnas

This comment has been minimized.

Copy link
Author

commented Mar 4, 2018

Oh no it's not there

@LadivItnas

This comment has been minimized.

Copy link
Author

commented Mar 4, 2018

How do I get it back there?

@HebaruSan

This comment has been minimized.

Copy link
Member

commented Mar 4, 2018

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 label Mar 4, 2018
@LadivItnas

This comment has been minimized.

Copy link
Author

commented Mar 4, 2018

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

@LadivItnas LadivItnas closed this Mar 4, 2018
@pjf pjf removed the Support label Mar 4, 2018
@GargamelKSP

This comment has been minimized.

Copy link

commented Mar 9, 2018

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

This comment has been minimized.

Copy link
Member

commented Mar 9, 2018

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

This comment has been minimized.

Copy link

commented Mar 9, 2018

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

@GargamelKSP

This comment has been minimized.

Copy link

commented Mar 9, 2018

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

@GargamelKSP

This comment has been minimized.

Copy link

commented Mar 9, 2018

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

This comment has been minimized.

Copy link

commented Mar 16, 2018

Running CKAN in administrator mode fixes this for me.

@politas

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Contributor

commented Aug 7, 2018

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

This comment has been minimized.

Copy link
Member

commented Aug 7, 2018

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

This comment has been minimized.

Copy link
Contributor

commented Aug 7, 2018

I'll leave it in your hands

@linuxgurugamer

This comment has been minimized.

Copy link
Contributor

commented Aug 7, 2018

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
Projects
None yet
7 participants
You can’t perform that action at this time.