Urgent! Packaging and cooking error

Hello, I’m having issues packaging my game. I’ve tried it both for development and shipment, and I coded the entire game with blueprints. In my log I get this each time.

MainFrameActions: Cooking (Windows): DynamicCompilation.CompileAssembly: Messages while compiling C:\Users\Christian\AppData\Local\Temp\UAT\E+Program+Files+(x86)+Epic+Games+4.11\Rules\UATRules487720724.dll:
MainFrameActions: Cooking (Windows): DynamicCompilation.CompileAssembly: ERROR: e:\Documents\Unreal Projects\MyProject2\Intermediate\Source\Table Tennis VR.Target.cs(6,20) : error CS1514: { expected
MainFrameActions: Cooking (Windows): DynamicCompilation.CompileAssembly: ERROR: e:\Documents\Unreal Projects\MyProject2\Intermediate\Source\Table Tennis VR.Target.cs(6,36) : error CS1002: ; expected
MainFrameActions: Cooking (Windows): DynamicCompilation.CompileAssembly: ERROR: e:\Documents\Unreal Projects\MyProject2\Intermediate\Source\Table Tennis VR.Target.cs(7,1) : error CS1519: Invalid token '{' in class, struct, or interface member declaration
MainFrameActions: Cooking (Windows): DynamicCompilation.CompileAssembly: ERROR: e:\Documents\Unreal Projects\MyProject2\Intermediate\Source\Table Tennis VR.Target.cs(8,25) : error CS1002: ; expected
MainFrameActions: Cooking (Windows): Program.Main: ERROR: AutomationTool terminated with exception: ERROR: UnrealBuildTool encountered an error while compiling source files
MainFrameActions: Cooking (Windows): Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)

This is the entire log I get when I attempt to package:

LogPlatformFile: Not using cached read wrapper
LogInit:Display: RandInit(-81342385) SRandInit(-81342384).
LogTaskGraph: Started task graph with 4 named threads and 7 total threads.
LogStats: Stats thread started at 0.066144
OCULUS: Info: [CAPI] LibOVR module is located at E:\Oculus\Support\oculus-runtime\LibOVRRT64_1.dll
OCULUS: Debug: Connected to the server running version (prod = 1).1.4.0(build = 224996) feature version = 0. Client runs version (prod = 1).1.4.0(build = 224996) feature version = 0
LogInit: Version: 4.11.2-2946394+++UE4+Release-4.11
LogInit: API Version: 2927265
LogInit: Compiled (64-bit): Apr 18 2016 02:18:46
LogInit: Compiled with Visual C++: 19.00.23026.00
LogInit: Build Configuration: Development
LogInit: Branch Name: ++UE4+Release-4.11
LogInit: Command line:  
LogInit: Base directory: E:/Program Files (x86)/Epic Games/4.11/Engine/Binaries/Win64/
LogInit: Installed Engine Build: 1
LogInit: Using libcurl 7.41.0
LogInit:  - built for x86_64-pc-win32
LogInit:  - supports SSL with WinSSL
LogInit:  - other features:
LogInit:      CURL_VERSION_SSL
LogInit:      CURL_VERSION_IPV6
LogInit:      CURL_VERSION_ASYNCHDNS
LogInit:      CURL_VERSION_LARGEFILE
LogInit:      CURL_VERSION_IDN
LogInit:  CurlRequestOptions (configurable via config and command line):
LogInit:  - bVerifyPeer = true  - Libcurl will verify peer certificate
LogInit:  - bUseHttpProxy = false  - Libcurl will NOT use HTTP proxy
LogInit:  - bDontReuseConnections = false  - Libcurl will reuse connections
LogInit:  - CertBundlePath = nullptr  - Libcurl will use whatever was configured at build time.
LogInit: Presizing for max 16777216 objects, including 0 objects not considered by GC, pre-allocating 0 bytes for permanent pool.
LogInit: Object subsystem initialized
LogInit: Selected Device Profile: [Windows]
LogInit: Applying CVar settings loaded from the selected device profile: [Windows]
LogInit: Computer: BLUEENTROPY
LogInit: User: Christian
LogInit: CPU Page size=65536, Cores=4
LogInit: High frequency timer resolution =3.417982 MHz
LogMemory: Memory total: Physical=15.9GB (16GB approx)
LogMemory: Platform Memory Stats for Windows
LogMemory: Process Physical Memory: 317.56 MB used, 317.56 MB peak
LogMemory: Process Virtual Memory: 318.15 MB used, 318.15 MB peak
LogMemory: Physical Memory: 4733.69 MB used, 16269.87 MB total
LogMemory: Virtual Memory: 682.10 MB used, 134217728.00 MB total
LogTextLocalizationManager: No specific translations for ('en-US') exist, so ('en') translations will be used.
LogD3D11RHI: D3D11 adapters:
LogD3D11RHI:    0. 'NVIDIA GeForce GTX 970' (Feature Level 11_0)
LogD3D11RHI:       4007MB of dedicated video memory, 0MB of dedicated system memory, and 8134MB of shared system memory, 1 output[s]
LogD3D11RHI:    1. 'Intel(R) HD Graphics 4600' (Feature Level 11_0)
LogD3D11RHI:       112MB of dedicated video memory, 0MB of dedicated system memory, and 8134MB of shared system memory, 1 output[s]
LogD3D11RHI:    2. 'Microsoft Basic Render Driver' (Feature Level 11_0)
LogD3D11RHI:       0MB of dedicated video memory, 0MB of dedicated system memory, and 8134MB of shared system memory, 0 output[s]
LogD3D11RHI: Chosen D3D11 Adapter: 0
LogD3D11RHI: Creating new Direct3DDevice
LogD3D11RHI:     Adapter Name: NVIDIA GeForce GTX 970
LogD3D11RHI:   Driver Version: 10.18.13.5906 (internal 10.18.13.5906)
LogD3D11RHI:      Driver Date: 11-24-2015
LogRHI: Texture pool is 1361 MB (70% of 1945 MB)
LogD3D11RHI: Async texture creation enabled
LogShaderCompilers: Guid format shader working directory is -4 characters bigger than the processId version (../../../../../../Documents/Unreal Projects/MyProject2/Intermediate/Shaders/WorkingDirectory/452/).
LogShaderCompilers: Cleaned the shader compiler working directory 'C:/Users/CHRIST~1/AppData/Local/Temp/UnrealShaderWorkingDir/7B24E1404B4FFC42944C28A96B85B6EC/'.
LogShaderCompilers:Display: Using Local Shader Compiler.
LogTemp:Display: Loaded TP AllDesktopTargetPlatform
LogTemp:Display: Loaded TP WindowsClientTargetPlatform
LogTemp:Display: Loaded TP WindowsNoEditorTargetPlatform
LogTemp:Display: Loaded TP WindowsServerTargetPlatform
LogTemp:Display: Loaded TP WindowsTargetPlatform
LogTemp:Display: Loaded TP AndroidTargetPlatform
LogTemp:Display: Loaded TP Android_ASTCTargetPlatform
LogTemp:Display: Loaded TP Android_ATCTargetPlatform
LogTemp:Display: Loaded TP Android_DXTTargetPlatform
LogTemp:Display: Loaded TP Android_ETC1TargetPlatform
LogTemp:Display: Loaded TP Android_ETC2TargetPlatform
LogTemp:Display: Loaded TP Android_MultiTargetPlatform
LogTemp:Display: Loaded TP Android_PVRTCTargetPlatform
LogTemp:Display: Loaded TP HTML5TargetPlatform
LogTemp:Display: Loaded TP IOSTargetPlatform
LogTemp:Display: Loaded TP TVOSTargetPlatform
LogTemp:Display: Loaded TP LinuxNoEditorTargetPlatform
LogTemp:Display: Loaded TP LinuxServerTargetPlatform
LogTemp:Display: Loaded TP LinuxTargetPlatform
LogTargetPlatformManager:Display: Building Assets For Windows
LogDerivedDataCache:Display: Max Cache Size: 512 MB
LogDerivedDataCache: Loaded boot cache 0.18s 50MB C:/Users/Christian/AppData/Local/UnrealEngine/4.11/DerivedDataCache/Boot.ddc.
LogDerivedDataCache:Display: Loaded Boot cache: C:/Users/Christian/AppData/Local/UnrealEngine/4.11/DerivedDataCache/Boot.ddc
LogDerivedDataCache: FDerivedDataBackendGraph:  Pak pak cache file ../../../../../../Documents/Unreal Projects/MyProject2/DerivedDataCache/DDC.ddp not found, will not use a pak cache.
LogDerivedDataCache: Unable to find inner node Pak for hierarchical cache Hierarchy.
LogDerivedDataCache: FDerivedDataBackendGraph:  CompressedPak pak cache file ../../../../../../Documents/Unreal Projects/MyProject2/DerivedDataCache/Compressed.ddp not found, will not use a pak cache.
LogDerivedDataCache: Unable to find inner node CompressedPak for hierarchical cache Hierarchy.
LogDerivedDataCache:Display: Pak cache opened for reading ../../../Engine/DerivedDataCache/Compressed.ddp.
LogDerivedDataCache: Using Local data cache path C:/Users/Christian/AppData/Local/UnrealEngine/Common/DerivedDataCache: Writable
LogInit: Selected Device Profile: [Windows]
LogContentStreaming: Texture pool size is 0.00 MB
LogMaterial: Uniform references updated for custom material expression Custom.
LogMeshUtilities: No automatic mesh reduction module available
LogMeshUtilities: No automatic mesh merging module available
LogMeshUtilities: No distributed automatic mesh merging module available
LogUObjectArray: 27679 objects as part of root set at end of initial load.
LogUObjectAllocator: 5591592 out of 0 bytes used by permanent object pool.
LogUObjectArray: CloseDisregardForGC: 0/0 objects in disregard for GC pool
LogInit: WinSock: version 1.1 (2.2), MaxSocks=32767, MaxUdp=65467
LogSlate: SlateFontCache - WITH_FREETYPE: 1, WITH_HARFBUZZ: 1
LogSlate: SlateFontCache - WITH_FREETYPE: 1, WITH_HARFBUZZ: 1
LogStreaming:Warning: Failed to read file '../../../Engine/Content/Editor/Slate/Common/Selection_16x.png' error.
LogSlate: Could not find file for Slate resource: ../../../Engine/Content/Editor/Slate/Common/Selection_16x.png
LogStreaming:Warning: Failed to read file '../../../Engine/Content/Editor/Slate/Common/Selection_16x.png' error.
LogSlate: Could not find file for Slate resource: ../../../Engine/Content/Editor/Slate/Common/Selection_16x.png
LogStreaming:Warning: Failed to read file '../../../Engine/Content/Editor/Slate/Common/Selection_16x.png' error.
LogSlate: Could not find file for Slate resource: ../../../Engine/Content/Editor/Slate/Common/Selection_16x.png
LogSubstanceCoreModule: Substance CPU Engine Loaded, Max Texture Size 2048
LogUdpMessaging: Initializing bridge on interface 0.0.0.0:0 to multicast group 230.0.0.1:6666.
LogAssetRegistry: FAssetRegistry took 0.0226 seconds to start up
SourceControl: Info Source control is disabled
SourceControl: Info Source control is disabled
SourceControl: Info Source control is disabled
SourceControl: Info Source control is disabled
LogConsoleManager:Warning: Console object named 'vr.EnableMotionControllerLateUpdate' already exists but is being registered again, but we weren't expected it to be! (FConsoleManager::AddConsoleObject)
LogEngine: Initializing Engine...
LogHMD: SteamVR initialized.  Driver: lighthouse  Display: LHR-D30FAF06
LogAIModule: Creating AISystem for world NewWorld
LogInit: XAudio2 using 'Speakers (3- USB Audio Device)' : 2 channels at 44.1 kHz using 16 bits per sample (channel mask 0x3)
LogInit: FAudioDevice initialized.
LogDerivedDataCache: Saved boot cache 0.03s 50MB C:/Users/Christian/AppData/Local/UnrealEngine/4.11/DerivedDataCache/Boot.ddc.
LogInit: Texture streaming: Enabled
LogInit: Transaction tracking system initialized
BlueprintLog: New page: Editor Load
LocalizationService: Info Localization service is disabled
LogLinker:Warning: Can't find file '/Game/FirstPersonBP/FirstPersonOverview'
LogLinker:Warning: Can't find file '/Game/FirstPersonBP/FirstPersonOverview'
LogUObjectGlobals:Warning: Failed to find object 'Class /Game/FirstPersonBP/FirstPersonOverview.FirstPersonOverview_C'
LogFileCache: Scanning file cache for directory 'E:/Documents/Unreal Projects/MyProject2/Content/' took 0.07s
LogCook:Display: Max memory allowance for cook 8192mb
LogCook:Display: Mobile HDR setting 1
LogCook:Display: Done creating registry. It took  0.00s.
SourceControl: Info Source control is disabled
Cmd: MAP LOAD FILE="../../../../../../Documents/Unreal Projects/MyProject2/Content/Vive/pong_room.umap" TEMPLATE=0 SHOWPROGRESS=1 FEATURELEVEL=3
LightingResults: New page: Lighting Build
MapCheck: New page: Map Check
LightingResults: New page: Lighting Build
LogMaterial: Uniform references updated for custom material expression TemporalAA SampleID.
LogMaterial: Uniform references updated for custom material expression Custom.
LogAIModule: Creating AISystem for world pong_room
LogPrimitiveComponent: Zero scaling not supported (/Game/Vive/pong_room.pong_room:PersistentLevel.PlayerStart_2.CollisionCapsule)
LogMaterial:Warning: Material /Game/Environment/fbx/fbx/Textures/K_BuildingsA_08_Mat.K_BuildingsA_08_Mat needed to have new flag set bUsedWithStaticLighting !
LogMaterial: Missing cached shader map for material K_BuildingsA_08_Mat, compiling. 
MapCheck:Warning: Warning K_BuildingsA_08_Mat Material /Game/Environment/fbx/fbx/Textures/K_BuildingsA_08_Mat.K_BuildingsA_08_Mat was missing the usage flag bUsedWithStaticLighting. If the material asset is not re-saved, it may not render correctly when run outside the editor. Fix
LogMaterial: 0.00 seconds spent updating 1 materials, 1 interfaces, 0 instances, 0 with static permutations.
LogPhysics:Warning: PHYSX: ..\..\PhysX\src\NpMaterial.cpp (124) 4 : NpMaterial::setRestitution: Invalid value 1.250000 was clamped to [0,1]!
LogEditorServer: Finished looking for orphan Actors (0.000 secs)
Cmd: MAP CHECKDEP NOCLEARLOG
MapCheck: Info Map check complete: 0 Error(s), 1 Warning(s), took 78.862ms to complete.
LogFileHelpers: Loading map 'pong_room' took 13.545
LogCollectionManager: Loaded 0 collections in 0.001489 seconds
LogFileCache: Scanning file cache for directory 'E:/Documents/Unreal Projects/MyProject2/Saved/Collections/' took 0.01s
LogFileCache: Scanning file cache for directory 'E:/Documents/Unreal Projects/MyProject2/Content/Developers/Christian/Collections/' took 0.01s
LogFileCache: Scanning file cache for directory 'E:/Documents/Unreal Projects/MyProject2/Content/Collections/' took 0.01s
LogCollectionManager: Rebuilt the GUID cache for 0 collections in 0.000002 seconds
LogContentBrowser: Native class hierarchy populated in 0.0071 seconds. Added 1996 classes and 355 folders.
LogStats: UGameplayTagsManager::ConstructGameplayTagTree: Construct from data asset -  0.000 s
LogStats: UGameplayTagsManager::ConstructGameplayTagTree: GameplayTagTreeChangedEvent.Broadcast -  0.000 s
LogContentBrowser: Native class hierarchy updated for 'GameplayTags' in 0.0004 seconds. Added 12 classes and 0 folders.
LogContentBrowser: Native class hierarchy updated for 'WidgetCarousel' in 0.0004 seconds. Added 0 classes and 0 folders.
LogContentBrowser: Native class hierarchy updated for 'SuperSearch' in 0.0003 seconds. Added 1 classes and 2 folders.
LogContentBrowser: Native class hierarchy updated for 'AddContentDialog' in 0.0003 seconds. Added 0 classes and 0 folders.
LogContentBrowser: Native class hierarchy updated for 'SceneOutliner' in 0.0003 seconds. Added 1 classes and 2 folders.
LogCrashTracker: Crashtracker disabled due to settings.
LogUObjectGlobals:Warning: Failed to find object 'Class None.'
LogContentBrowser: Native class hierarchy updated for 'HierarchicalLODOutliner' in 0.0005 seconds. Added 1 classes and 2 folders.
LogLoad: Full Startup: 75.63 seconds (BP compile: 1.28 seconds)
LogExternalProfiler: Found external profiler: VSPerf
LogExternalProfiler: Using external profiler: VSPerf
LogOcInput: OculusInput pre-init called
LogOcInput: OculusInput is initialized. Init status 0. Runtime version: 1.4.0
LogContentStreaming: Texture pool size now 1000 MB
LogRenderer: Reallocating scene render targets to support 908x948 (Frame:2).
Cmd: UpdateLandscapeEditorData -warnings
LogAssetRegistry: Asset discovery search completed in 40.9364 seconds
LogCollectionManager: Rebuilt the object cache for 0 collections in 0.000001 seconds (found 0 objects)
LogCollectionManager: Fixed up redirectors for 0 collections in 0.009778 seconds (updated 0 objects)
MainFrameActions: Cooking (Windows): Running AutomationTool...
MainFrameActions: Cooking (Windows): Program.Main: 2016-06-16T03:10:33.2098712Z: Running on WindowsHostPlatform as a 64-bit process.
MainFrameActions: Cooking (Windows): Automation.ParseCommandLine: Parsing command line: BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=E:/Documents/Unreal Projects/MyProject2/Table Tennis VR.uproject -cook -ue4exe=UE4Editor-Cmd.exe -targetplatform=Win64
MainFrameActions: Cooking (Windows): Automation.Process: Setting up command environment.
MainFrameActions: Cooking (Windows): Automation.Process: Compiling scripts.
MainFrameActions: Cooking (Windows): BuildCookRun.SetupParams: Setting up ProjectParams for E:\Documents\Unreal Projects\MyProject2\Table Tennis VR.uproject
MainFrameActions: Cooking (Windows): DynamicCompilation.CompileAssembly: Messages while compiling C:\Users\Christian\AppData\Local\Temp\UAT\E+Program+Files+(x86)+Epic+Games+4.11\Rules\UATRules487720724.dll:
MainFrameActions: Cooking (Windows): DynamicCompilation.CompileAssembly: ERROR: e:\Documents\Unreal Projects\MyProject2\Intermediate\Source\Table Tennis VR.Target.cs(6,20) : error CS1514: { expected
MainFrameActions: Cooking (Windows): DynamicCompilation.CompileAssembly: ERROR: e:\Documents\Unreal Projects\MyProject2\Intermediate\Source\Table Tennis VR.Target.cs(6,36) : error CS1002: ; expected
MainFrameActions: Cooking (Windows): DynamicCompilation.CompileAssembly: ERROR: e:\Documents\Unreal Projects\MyProject2\Intermediate\Source\Table Tennis VR.Target.cs(7,1) : error CS1519: Invalid token '{' in class, struct, or interface member declaration
MainFrameActions: Cooking (Windows): DynamicCompilation.CompileAssembly: ERROR: e:\Documents\Unreal Projects\MyProject2\Intermediate\Source\Table Tennis VR.Target.cs(8,25) : error CS1002: ; expected
MainFrameActions: Cooking (Windows): Program.Main: ERROR: AutomationTool terminated with exception: ERROR: UnrealBuildTool encountered an error while compiling source files
MainFrameActions: Cooking (Windows): Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)
MainFrameActions: Cooking (Windows): Domain_ProcessExit
MainFrameActions: Cooking (Windows): copying UAT log files...
MainFrameActions: Cooking (Windows): BUILD FAILED
MainFrameActions: Packaging (Windows (64-bit)): Running AutomationTool...
MainFrameActions: Packaging (Windows (64-bit)): Program.Main: 2016-06-16T03:14:18.4666253Z: Running on WindowsHostPlatform as a 64-bit process.
MainFrameActions: Packaging (Windows (64-bit)): Automation.ParseCommandLine: Parsing command line: -ScriptsForProject=E:/Documents/Unreal Projects/MyProject2/Table Tennis VR.uproject BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=E:/Documents/Unreal Projects/MyProject2/Table Tennis VR.uproject -cook -stage -archive -archivedirectory=E:/De
sktop/Table Tennis VR Alpha -package -clientconfig=Development -ue4exe=UE4Editor-Cmd.exe -prereqs -nodebuginfo -targetplatform=Win64 -build -CrashReporter -utf8output
MainFrameActions: Packaging (Windows (64-bit)): Automation.Process: Setting up command environment.
MainFrameActions: Packaging (Windows (64-bit)): Automation.Process: Compiling scripts.
MainFrameActions: Packaging (Windows (64-bit)): BuildCookRun.SetupParams: Setting up ProjectParams for E:\Documents\Unreal Projects\MyProject2\Table Tennis VR.uproject
MainFrameActions: Packaging (Windows (64-bit)): DynamicCompilation.CompileAssembly: Messages while compiling C:\Users\Christian\AppData\Local\Temp\UAT\E+Program+Files+(x86)+Epic+Games+4.11\Rules\UATRules487720724.dll:
MainFrameActions: Packaging (Windows (64-bit)): DynamicCompilation.CompileAssembly: ERROR: e:\Documents\Unreal Projects\MyProject2\Intermediate\Source\Table Tennis VR.Target.cs(6,20) : error CS1514: { expected
MainFrameActions: Packaging (Windows (64-bit)): DynamicCompilation.CompileAssembly: ERROR: e:\Documents\Unreal Projects\MyProject2\Intermediate\Source\Table Tennis VR.Target.cs(6,36) : error CS1002: ; expected
MainFrameActions: Packaging (Windows (64-bit)): DynamicCompilation.CompileAssembly: ERROR: e:\Documents\Unreal Projects\MyProject2\Intermediate\Source\Table Tennis VR.Target.cs(7,1) : error CS1519: Invalid token '{' in class, struct, or interface member declaration
MainFrameActions: Packaging (Windows (64-bit)): DynamicCompilation.CompileAssembly: ERROR: e:\Documents\Unreal Projects\MyProject2\Intermediate\Source\Table Tennis VR.Target.cs(8,25) : error CS1002: ; expected
MainFrameActions: Packaging (Windows (64-bit)): Program.Main: ERROR: AutomationTool terminated with exception: ERROR: UnrealBuildTool encountered an error while compiling source files
MainFrameActions: Packaging (Windows (64-bit)): Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)
MainFrameActions: Packaging (Windows (64-bit)): Domain_ProcessExit
MainFrameActions: Packaging (Windows (64-bit)): copying UAT log files...
MainFrameActions: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults:Error: Error Unknown Error

Hello christianled59,

It seems that the issue may be due to the filename of one of your code files: Table Tennis VR.Target.cs

In UE4, any files having spaces in them, or other special characters, usually causes issues. Due to how the code is generated, this may have also made the classes in Table Tennis VR.Target.cs have spaces in them which would also cause problems. Even if the spaces aren’t the problem, it seems like the issue is related to what is contained in that file. If removing the spaces doesn’t fix the issue and you get the same errors in your logs, could you upload that source file?

Thank you so much!
I have no idea how that file got named with spaces.

Thank you a lot I had no idea that renaming the files to be easier to look at would break the code coming from the packaging tool