5.4 Issues with Gameplay Ability System?

I recently returned to a project to find one of my abilities in my ability system no longer working for some reason, not sure why as non of the code relating to it was touched.

This is the error message I got

Assertion failed: (Spec.GetDuration() == UGameplayEffect::INSTANT_APPLICATION || Spec.GetPeriod() != UGameplayEffect::NO_PERIOD) [File:D:\build++UE5\Sync\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Private\AbilitySystemComponent.cpp] [Line: 1007]

UnrealEditor_GameplayAbilities
UnrealEditor_GameplayAbilities
UnrealEditor_NameOfGame!UCRInventoryCombatAbility::ReloadWeapon() [D:\UnrealProjects\NameOfGame\Source\NameOfGame\World\PlayerCharacter\Player\AbilitySystem\Abilities\CRInventoryCombatAbility.cpp:81]

The direct line of code that this is referring to is this:
void UCRInventoryCombatAbility::ReloadWeapon()
{
if(const UWeaponStaticData* WeaponStaticData = GetEquippedItemWeaponStaticData())
{
if(UInventoryComponent* Inventory = GetInventoryComponent())
{
if(WeaponStaticData->CurrentMagazineSize < WeaponStaticData->MaxMagazineSize && Inventory->GetInventoryTagCount(WeaponStaticData->AmmoTag) > 0)
{

			if (UAbilitySystemComponent* AbilityComponent = GetAbilitySystemComponentFromActorInfo())
			{
				
					FGameplayEffectContextHandle EffectContext = AbilityComponent->MakeEffectContext();
					FGameplayEffectSpecHandle OutSpec = AbilityComponent->MakeOutgoingSpec(UGE_Reload::StaticClass(), 1, EffectContext);
					if (OutSpec.IsValid())
					{
						FGameplayEffectSpec* Spec = OutSpec.Data.Get();
						//Spec->DynamicGrantedTags.AddTag(FGameplayTag::RequestGameplayTag(TEXT("State.Reloading")));
						Spec->SetDuration(WeaponStaticData->TimeToReloadFinish, true);
						ReloadEffectHandle = AbilityComponent->ApplyGameplayEffectSpecToSelf(*Spec);
					
					}

					// Start reload animation or logic here
			}

Now I have done a bit of research and I created my own game play effect class and set the duration policy to has duration but that still doesn’t seem to be working, am I missing something?

Based on the error… Is it possible that you are trying to SetDuration() on a Gameplay Effect with instant application?

the UGE_Reload::StaticClass() is a custom class with the duration being set correctly as shown below

DurationPolicy = EGameplayEffectDurationType::HasDuration;

DurationMagnitude = FScalableFloat(1.0f);

Ok… So your UGE_Reload::StaticClass() is a UGameplayEffect with a duration.
However the error you are getting is in UAbilitySystemComponent::ExecuteGameplayEffect() which means you are trying to execute something. Just above the exact line that is failing there is the following comment:

// Should only ever execute effects that are instant application or periodic application
// Effects with no period and that aren’t instant application should never be executed

Check your stack to see what exactly is calling ExecuteGameplayEffect() since in the snippet you’ve posted only ApplyGameplayEffectSpecToSelf(*Spec) can do it but only if Spec.Def->DurationPolicy == EGameplayEffectDurationType::Instant

This is the only error Im getting, there is nothing else that is popping up

Warning LogOutputDevice /Game/AWorld/Blueprints/AbilitySystem/Abilities/BP_GA_Reload.BP_GA_Reload_C.ExecuteUbergraph_BP_GA_Reload
Warning LogOutputDevice /Game/AWorld/Blueprints/AbilitySystem/Abilities/BP_GA_Reload.BP_GA_Reload_C.K2_ActivateAbility
Error LogWindows appError called: Assertion failed: (Spec.GetDuration() == UGameplayEffect::INSTANT_APPLICATION || Spec.GetPeriod() != UGameplayEffect::NO_PERIOD) [File:D:\build++UE5\Sync\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Private\AbilitySystemComponent.cpp] [Line: 1007]
Log LogWindows Windows GetLastError: The operation completed successfully. (0)

and for further clarification this is my reload gameplay effect code

Nevermind, I found a solution. My game was set to standalone and not client as it had been before.

Now in client mode it works just fine. (My game is multiplayer)

Any Idea why this is happening? if not then I will close the thread