Summary
Having an issue where I get cook errors randomly.
Error goes as follows
LogValkyrieRequestManagerEditor: Detected cook failure, cook job id 711c6f30-00a1-4a14-85a8-7f6edd3167cd PlatformCook: Error: We hit an error while cooking this content PlatformCook: Error: errors.com.epicgames.content-service.cook_failure PlatformCook: Error: CookJobId:711c6f30-00a1-4a14-85a8-7f6edd3167cd PlatformCook: Error: An error occurred while communicating with the game servers (failed to cook module 60e2311d-406f-159c-f11e-26b456285c32 (artifact d326816d-728e-44f8-b910-cd5d123c5991:linux-server) (cookJobId 711c6f30-00a1-4a14-85a8-7f6edd3167cd) with error code errors.com.epicgames.cookplugin.assetvalidationerror).
It randomly happens when pushing changes or launching a fresh session.
I have a parametric event class that i use quite often in most projects that seems to be the culprit but not sure why as i’ve used this in dozens of projects before.
Not sure if this is relevant but verse code is spread-out throughout multiple folders.
VerseCode:
Core:
#Modules Here
Module_Events # Holds the module containing event class.
Game:
Definitions: #UI / Team Wrappers / Player Wrappers / Etc..
Managers: #Devices that manage systems / other devices / state
Devices #Stand alone devices
Systems #Objects to be used by devices / managers
Condensed version of it:
Events <public> := module:
mutable_value_handle<public>(value:type) := class<abstract>:
Get<public>()<transacts>:value
mutable_value<public>(value:type) := class<abstract>(mutable_value_handle(value)):
Set<public>(InValue:value)<transacts>:void
event_subscription_base<internal> := class<abstract><unique>(cancelable):
var CanInvoke : logic = true
Cancel<override>()<transacts>:void={set CanInvoke = false}
Invoke():void
event_subscription<internal>(payload:type) := class(event_subscription_base):
Payload:mutable_value_handle(payload)
Callback:type{_(:payload):void}
Invoke<override>():void =
if(CanInvoke?):
Args := Payload.Get()
Callback(Args)
event_base<public> := class:
var EventSubscriptions:[]event_subscription_base = array{}
custom_event<public>(payload:type) := class(event_base, signalable(payload), awaitable(payload), subscribable(payload)):
Payload<public>:mutable_value(payload)
InternalAwaitable<public> : event(payload) = event(payload){}
Signal<override>(InPayload:payload):void=
InternalAwaitable.Signal(InPayload)
Payload.Set(InPayload)
for(EventSubscription:EventSubscriptions):
EventSubscription.Invoke()
Await<override>()<suspends>:payload=
return InternalAwaitable.Await()
Subscribe<override>(Callback:type {_(:payload):void})<transacts>:cancelable =
NewEventSubscription := event_subscription(payload){Payload := Payload, Callback := Callback}
NewSubs := for(EventSub:EventSubscriptions, EventSub.CanInvoke?){EventSub} + array{NewEventSubscription}
set EventSubscriptions = NewSubs
return cancelable(NewEventSubscription)
Upon getting a cook err, If i change the name of the event class / compile / change it back / re compile.
The cook error goes away. This is consistent and works every time.
Please select what you are reporting on:
Verse
What Type of Bug are you experiencing?
Other
Steps to Reproduce
Not 100% sure but can provide project files in a state where cook err is happening.
From there you just launch session, get cook err, rename this event class / compile / name it back / re compile / launch session again.
Expected Result
For code that compiles to cook
Observed Result
Cook errors that persist until renaming class / recompilation
Platform(s)
Windows