x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Closed] Packaging Error : Couldn't update resource

Hi,

It's the first time I'm trying to package since moving my project from 4.5 to 4.7.1. I'm pretty sure this most be a minor error since my game compiles and the cooking process also seems to be working fine, but I can't seem to find what is the issue, and the error is not very telling (or at least, I don't know what it means!).

So basically, the packaging fails at the end of the process with the "Couldn't update resource" error. I have put the relevant stack here :

 [2015.04.07-14.08.11:501][259]MainFrameActions: Packaging (Windows (64-bit)): BuildCommand.Execute: ERROR: BUILD FAILED
 
 [2015.04.07-14.08.11:502][259]MainFrameActions: Packaging (Windows (64-bit)): Program.Main: ERROR: AutomationTool terminated with exception:
 
 [2015.04.07-14.08.11:502][259]MainFrameActions: Packaging (Windows (64-bit)): Program.Main: ERROR: Exception in Win.Automation: Couldn't update resource
 
 [2015.04.07-14.08.11:502][259]MainFrameActions: Packaging (Windows (64-bit)): Stacktrace:    à ModuleResourceUpdate.SetData(Int32 ResourceId, ResourceType Type, Byte[] Data) dans c:\Users\mdube\Perforce\prodperforce\Jotunn\EngineFrima\Engine\Source\Programs\AutomationTool\Win\WinPlatformResources.Automation.cs:ligne 254
 
 [2015.04.07-14.08.11:502][259]MainFrameActions: Packaging (Windows (64-bit)):    à ModuleResourceUpdate.SetIcons(Int32 ResourceId, GroupIconResource GroupIcon) dans c:\Users\mdube\Perforce\prodperforce\Jotunn\EngineFrima\Engine\Source\Programs\AutomationTool\Win\WinPlatformResources.Automation.cs:ligne 264
 
 [2015.04.07-14.08.11:502][259]MainFrameActions: Packaging (Windows (64-bit)):    à BaseWinPlatform.StageBootstrapExecutable(DeploymentContext SC, String TargetFile, String StagedRelativeTargetPath, String StagedArguments) dans c:\Users\mdube\Perforce\prodperforce\Jotunn\EngineFrima\Engine\Sour
 [2015.04.07-14.08.11:502][259]MainFrameActions: Packaging (Windows (64-bit)): ce\Programs\AutomationTool\Win\WinPlatform.Automation.cs:ligne 215
 
 [2015.04.07-14.08.11:502][259]MainFrameActions: Packaging (Windows (64-bit)):    à BaseWinPlatform.GetFilesToDeployOrStage(ProjectParams Params, DeploymentContext SC) dans c:\Users\mdube\Perforce\prodperforce\Jotunn\EngineFrima\Engine\Source\Programs\AutomationTool\Win\WinPlatform.Automation.cs:ligne 149
 
 [2015.04.07-14.08.11:502][259]MainFrameActions: Packaging (Windows (64-bit)):    à Win64Platform.GetFilesToDeployOrStage(ProjectParams Params, DeploymentContext SC) dans c:\Users\mdube\Perforce\prodperforce\Jotunn\EngineFrima\Engine\Source\Programs\AutomationTool\Win\WinPlatform.Automation.cs:ligne 352
 
 [2015.04.07-14.08.11:502][259]MainFrameActions: Packaging (Windows (64-bit)):    à Project.CreateStagingManifest(ProjectParams Params, DeploymentContext SC) dans c:\Users\mdube\Perforce\prodperforce\Jotunn\EngineFrima\Engine\Source\Programs\AutomationTool\Scripts\CopyBuildToStagingDirectory.Automation.cs:ligne 228
 
 [2015.04.07-14.08.11:502][259]MainFrameActions: Packaging (Windows (64-bit)):    à Project.CopyBuildToStagingDirectory(ProjectParams Params) dans c:\Users\mdube\Perforce\prodperforce\Jotunn\EngineFrima\Engine\Source\Programs\AutomationTool\Scripts\CopyBuildToStagingDirectory.Automation.cs:ligne 1325
 
 [2015.04.07-14.08.11:502][259]MainFrameActions: Packaging (Windows (64-bit)):    à BuildCookRun.DoBuildCookRun(ProjectParams Params) dans c:\Users\mdube\Perforce\prodperforce\Jotunn\EngineFrima\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:ligne 253
 
 [2015.04.07-14.08.11:502][259]MainFrameActions: Packaging (Windows (64-bit)):    à BuildCommand.Execute() dans c:\Users\mdube\Perforce\prodperforce\Jotunn\EngineFrima\Engine\Source\Programs\AutomationTool\BuildCommand.cs:ligne 37
 
 [2015.04.07-14.08.11:502][259]MainFrameActions: Packaging (Windows (64-bit)):    à AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands) dans c:\Users\mdube\Perforce\prodperforce\Jotunn\EngineFrima\Engine\Source\Programs\AutomationTool\Automation.cs:ligne 380
 
 [2015.04.07-14.08.11:502][259]MainFrameActions: Packaging (Windows (64-bit)):    à AutomationTool.Automation.Process(String[] CommandLine) dans c:\Users\mdube\Perforce\prodperforce\Jotunn\EngineFrima\Engine\Source\Programs\AutomationTool\Automation.cs:ligne 352
 
 [2015.04.07-14.08.11:502][259]MainFrameActions: Packaging (Windows (64-bit)):    à AutomationTool.Program.MainProc(Object Param) dans c:\Users\mdube\Perforce\prodperforce\Jotunn\EngineFrima\Engine\Source\Programs\AutomationTool\Program.cs:ligne 168
 
 [2015.04.07-14.08.11:502][259]MainFrameActions: Packaging (Windows (64-bit)):    à AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param) dans c:\Users\mdube\Perforce\prodperforce\Jotunn\EngineFrima\Engine\Source\Programs\AutomationTool\Utils.cs:ligne 705
 
 [2015.04.07-14.08.11:502][259]MainFrameActions: Packaging (Windows (64-bit)):    à AutomationTool.Program.Main() dans c:\Users\mdube\Perforce\prodperforce\Jotunn\EngineFrima\Engine\Source\Programs\AutomationTool\Program.cs:ligne 115
 
 [2015.04.07-14.08.11:502][259]MainFrameActions: Packaging (Windows (64-bit)): Program.Main: ERROR: Couldn't update resource

I would really appreciate some help on this one!

Thanks!

Mick

Product Version: Not Selected
Tags:
more ▼

asked Apr 07 '15 at 02:23 PM in Packaging & Deployment

avatar image

MickD777
2.1k 69 37 259

(comments are locked)
10|2000 characters needed characters left

The question has been closed Jul 01 '16 at 08:59 PM by Samantha Sutton for the following reason:

The question is answered, right answer was accepted


2 answers: sort voted first

I found out that for some reason, the .exe in MyGame\Intermediate\Staging was getting copied as Read-Only, even if the original file was not. This is a very strange behavior, and if someone can explain this one, that would be great. Anyways, i've implemented a fix that will work in all cases, mainly because I juste remove the Read-Only attribute on the copied file :

In WinPlatform.Automation.cs , the StageBootstrapExecutable function:

After the File.Copy :

 File.Copy(InputFile, IntermediateFile, true);
 
             //Added: After File.Copy, make sure it is not Read only...
             FileAttributes attributes = File.GetAttributes(IntermediateFile);
             if ((attributes & FileAttributes.ReadOnly) == FileAttributes.ReadOnly)
             {
                 attributes = attributes & ~FileAttributes.ReadOnly;
                 File.SetAttributes(IntermediateFile, attributes);
             }

So anyway, that was my issue...weird one...

more ▼

answered Apr 07 '15 at 06:15 PM

avatar image

MickD777
2.1k 69 37 259

avatar image mechanodroid Jun 05 '15 at 02:05 PM

thank you so much for this fix

avatar image VictorC Jul 30 '15 at 11:33 AM

I had the exact same issue with 4.8.2 - thank you very much for sharing that workaround.
As for the cause of this problem my first guess would be that it's related to having the entire engine folder under p4 source control (AFAIK epic is using a special setup internally where most binaries are specifically marked writeable...)

(comments are locked)
10|2000 characters needed characters left

Perhaps a better solution is to make the Engine/Binaries/Win64/BootstrapPackagedGame-Win64-Shipping.exe file writable (+w) in perforce.

The best solution is to follow EPIC's guidelines for using the typemap in Perforce with UE4 (available only to p4 admins):

https://docs.unrealengine.com/latest/INT/Engine/Basics/SourceControl/Perforce/index.html#p4typemap

more ▼

answered Nov 18 '15 at 05:18 PM

avatar image

LouDilbert
26 1 3

(comments are locked)
10|2000 characters needed characters left

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question