Loading animation working in preview, but not in published site

Hello, everybody.

I am creating a duplicate of apple.com site. I wanted to add a loading screen and I’ve found this nice lottie animation, and I’ve implemented it. I did the styling and interactions required to work as a loading screen and it works fine, but in preview mode only. When I publish the site the loading screen doesn’t go away.
I’ve tried different browsers, doesn’t work. I’ve tried JSON files, gif exports of the lottie animation, still the same. I feel like the “on load” interaction doesn’t work in published sites.
Looking forward for any help.


https://mihails-trendy-site-bff25c.webflow.io/
https://preview.webflow.com/preview/mihails-trendy-site-bff25c?utm_medium=preview_link&utm_source=designer&utm_content=mihails-trendy-site-bff25c&preview=10a1b57493450a4d81c98917c592fe22&workflow=preview

When you check your live page you see that there is an error TypeError: undefined is not an object (evaluating 'n.getInstance'). Fix it first and see if it helps. It should.

I’ve searched all over Google and I can’t seem to find the fix. Some people say the on load interaction is bugged. I still don’t know what to do.

hi @Mihail I do not know but what it looks like it is related to tram.js that is included in Webflow script. This lib wasn’t updated and maintained for 8 years and has opened issues from 2013 :astonished:

there were already noticed a few issues on forum related to this ancient lib like eg. this

Sorry I can’t do more and hope someone will come up with the solution.

Good luck

Thanks, man. I’ve contacted customer support, and they said that they will see what might be causing the problem.

Leaving this note here to help someone in the future who reads this.
The customer support fixed the problem.
I had a “mouse moving in viewport” interaction used for Spline scene (which I removed later), that was conflicting with the page load. When having too many interactions, these kind of conflicts can happen. Be mindful of that. Good luck.