Jump to content


'undefined' is not an object (evaluating '_defLookup[ns].sc')

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi guys,


I'm trying to figure this out, what's the matter with this, but I have no clue. It's been a few days now and I have to ask you guys to let me know what can I do.


I'm including GSAP as simple as possible, thorugh a script tag, both TweenMax.js and the ease-pack, in that order. Sometimes, it throws an error, as the first thing that appears in console and it says this: "TypeError: 'undefined' is not an object (evaluating '_defLookup[ns].sc')"


As for the environment, I'm running inside a webview in Qt.


I've tried in so many ways, but it doesn't seem to go away.

Any help is welcomed.



Link to comment
Share on other sites

Hi and welcome to the forums.


First if you load TweenMax.js it already comes with the ease pack, so no need to include it again.


Second; is your animation working as expected?. If it is working, that will led me to think that the problem could be elsewhere, where exactly? I have no idea, in fact I didn't even knew that Qt could work with JS, thought that it was C++ only. Now if the animation is not working it would help if you provide a simple fiddle or codepen with the isolated problem.




  • Like 1
Link to comment
Share on other sites

Hi Rodrigo,


Glad to be here :)


So, yeah, you can run basically anything in a WebView inside Qt.


As far as my animation, everything seems to be running ok. I'll try removing the ease pack, but I think I already did that, and everything went bad. The thing is that, 8 out of 10 execution, this error occurs. It's not ok, to release, nor to build an app, that basically has an error.


I'll try removing the ease pack tomorrow, and let you know how did it went.


Anyway, thanks for the quick reply.


Have a nice one,

Link to comment
Share on other sites

I've never heard of anything like this before - I'd love to see a simple example. If you look at the source, it seems virtually impossible to run into a situation like that:

this.sc = (_defLookup[ns]) ? _defLookup[ns].sc : []; 

See how it'll ONLY call _defLookup[ns].sc if _defLookup[ns] exists? If that's undefined, it wouldn't evaluate anyway - it'd use an empty array. Am I missing something? I wonder if it's some sort of bug in your WebView or Qt. 

Link to comment
Share on other sites

Oh, and what version of TweenMax are you using? Please make sure you've got the latest. 

Link to comment
Share on other sites

Hi Xnamex,


Regarding the animation you mention that it seems to be ok. if that's the case I'll presume that your animation is working as expected but, how about when the error shows in the console?.


You also mention that after you eliminated the line loading the ease pack things began to go wrong. Would you mind to elaborate a little bit more regarding that?.




Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.