GLTF Animation Export appears to be broken

When trying to export an animation to GLTF, the resulting file has incorrect mesh skinning.
Exporting character meshes seems to work fine, but animations are not working at all.

This is what exporting a character from the new “Mannequins Pack” with an idle animation looks like when loaded in Blender.

Digging through the GLTF export code, the problem seems to stem from a discrepancy between two different reference skeletons.

A USkeletalMesh has a field FReferenceSkeleton RefSkeleton

A USkeleton also has a field FReferenceSkeleton ReferenceSkeleton

A UAnimationAsset has a USkeleton Skeleton field.

It turns out that the SkeletalMesh->RefSkeleton can be different than the AnimAsset->Skeleton->ReferenceSkeleton. This discrepancy causes the exporter to assign animations bone indices in the animation sequence to be different from the inverse bind poses, which is calculated from SkeletalMesh->RefSkeleton.

Is there a workaround for this problem?

Thanks for reporting, I will pass your description to our dev.

Can you send us the unreal assets and the exported gltf?
And tell us which version of the engine you have been using?