[SOLVED] GLB animation load issue

I have an issue after importing GLB from Blender.
The model works fine, but I can’t load the animations, I have a blank screen in animation player and an error Failed to construct 'ImageData': The input data length is not a multiple of (4 * width).

I’ve tried to import the GLB file into a blank project, but I had the same error. Sometimes it says TypeError: Cannot read properties of null (reading 'device')

Here’s the project

In model viewer the animation works correctly

UPD: I’ve tried an another animated model, that’s the older one and was used for a Unity web project, there it worked fine, but I have the same issue with animation here

Scene link

Hi @Yan_Schafer and welcome!

Below a related topic. Unfortunately, it seems that the cause of this problem has not been found yet.

1 Like

I think the animation is still working and only the preview is failing. Have you already tried to use the animation?

Hey, @Albertos ! Thank you for response!

I’ve checked out the topic you’ve provided, as far as I can see, it’s a typical problem - the preview window doesn’t show the animation. I’ve tried to it on two browsers, using Chromium engine, so I try Firefox and other Chromium browsers later, thank you!

I’m not sure how to correctly import this animation. The problem is, there are two seperate models with, each of wich have their own root bone. I’ve tried to use “Animation (legacy)” component with root bones of each model, and choosing the anim glb file, but that doesn’t work - when I click on play anim button in component nothing happens. The same thing happens with “Play scene” button.

I forked your project and created a working setup. Does this also work for you? (I didn’t get an error message on my device).

https://playcanvas.com/project/1065418/overview/shark-fork

1 Like

I totally forgot about anim state graph, thank you! <3
The problem is solved.
Working demo

1 Like

I get the same error when I open this project and try to preview the animation. How can this be fixed? I can’t really use Play Canvas effectively with this bug.

I tried this demo but get the following error when I click the link:

The demo has probably changed and is no longer accurate as the issue was resolved.

There is no solution for this error yet.

Do you mean you can’t use PlayCanvas without the animation preview, even if the animation still works fine?

Problem is for us, we cannot reproduce the issue even on the same project. We are looking to add some extra checks but it’s difficult to know if it will help because we can’t reproduce the issue :frowning: