Barotrauma icon indicating copy to clipboard operation
Barotrauma copied to clipboard

Can't publish my mod to the workshop

Open illersaver opened this issue 2 years ago • 9 comments

Disclaimers

  • [X] I have searched the issue tracker to check if the issue has already been reported.
  • [x] My issue happened while using mods.

What happened?

I made small mod and try to publish it, but something went wrong and it show me this: unkno1wn I tried to upload another mod, but result was the same.

Reproduction steps

1.Make mod 2.Try to publish it

Bug prevalence

Happens every time I play

Version

0.18.12.0

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

Failed to create staging copy: Access to the path 'f849ff5cff42dcef4e8f5d7fd2a8cf8d1d277e' is denied.    at System.IO.FileSystem.RemoveDirectoryRecursive(String fullPath, WIN32_FIND_DATA& findData, Boolean topLevel)
   at System.IO.FileSystem.RemoveDirectory(String fullPath, Boolean recursive)
   at System.IO.Directory.Delete(String path, Boolean recursive)
   at Barotrauma.IO.Directory.Delete(String path, Boolean recursive) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Utils\SafeIO.cs:line 302
   at Barotrauma.Steam.SteamManager.Workshop.DeletePublishStagingCopy() in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Steam\Workshop.cs:line 159
   at Barotrauma.Steam.SteamManager.Workshop.CreatePublishStagingCopy(String modVersion, ContentPackage contentPackage) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Steam\Workshop.cs:line 176    at Barotrauma.Steam.MutableWorkshopMenu.PublishItem(GUITextBlock currentStepText, GUIMessageBox messageBox, String modVersion, Editor editor, ContentPackage localPackage)+MoveNext() in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Steam\WorkshopMenu\Mutable\PublishTab.cs:line 0
   at Barotrauma.Steam.MutableWorkshopMenu.MessageBoxCoroutine(Func`3 subcoroutine)+MoveNext() in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Steam\WorkshopMenu\Mutable\PublishTab.cs:line 389

illersaver avatar Jun 22 '22 17:06 illersaver

Same problem.

HomelessMage avatar Jun 26 '22 14:06 HomelessMage

Same issues

ArtiomLiakh avatar Jun 26 '22 17:06 ArtiomLiakh

same can't update mod

PuchaBro avatar Jun 26 '22 17:06 PuchaBro

Same

Logic530 avatar Jun 27 '22 04:06 Logic530

Thank you for the reports! Based on the error message, it would seem the game is somehow failing to delete some files/directories in the "staging directory" where it prepares the mod for publishing in the Steam Workshop. The staging directory is called "WorkshopStaging" and should be located in the game's installation folder. Could you try navigating to that directory manually and deleting it manually? It might also help give us some clues on what's causing this if you let us know if there is indeed a file/directory called "f849ff5cff42dcef4e8f5d7fd2a8cf8d1d277e" or anything else that seems unusual in the folder.

Thanks and sorry for the inconvenience!

Regalis11 avatar Jun 27 '22 14:06 Regalis11

Thank you for the reports! Based on the error message, it would seem the game is somehow failing to delete some files/directories in the "staging directory" where it prepares the mod for publishing in the Steam Workshop. The staging directory is called "WorkshopStaging" and should be located in the game's installation folder. Could you try navigating to that directory manually and deleting it manually? It might also help give us some clues on what's causing this if you let us know if there is indeed a file/directory called "f849ff5cff42dcef4e8f5d7fd2a8cf8d1d277e" or anything else that seems unusual in the folder.

Thanks and sorry for the inconvenience!

I did, and now it works.

illersaver avatar Jun 27 '22 14:06 illersaver

We'll keep the issue open, since we haven't found out what's causing it nor fixed it. As said, if anyone happens to run into this issue, it might help us a lot in diagnosing this if you could check the contents of the "WorkshopStaging" directory and check if there's anything unusual there.

Regalis11 avatar Jun 28 '22 07:06 Regalis11

I seem to have this problem too, but this time it doesn't fix it when I manually delete the WorkshopStaging file

sammybiggestfan avatar Aug 13 '22 11:08 sammybiggestfan

I just looked into my workshop staging folder, sorry to necro a thread but I just ran into the same issue, Barotrauma's workshop staging folder was not able to delete the .git folder from my source project directory, I have to manually remove the .git folder each time

Peliex avatar Oct 01 '22 20:10 Peliex

https://github.com/Regalis11/Barotrauma/issues/11997 Realized I had a duplicate of this, looks like the solution got buried under here. Seems like this shouldn't be a problem once the next update is released.

mason-arteles avatar May 19 '23 06:05 mason-arteles

Yes, make sure .git folder is out from your LocalMods mod folder, as the game fails, attempting to stage the mod. That's the main problem. Move the .git folder anytime you upload the mod to the Workshop.

HomelessMage avatar Sep 07 '23 11:09 HomelessMage