wallabyjs / atom-wallaby

Wallaby.js atom package starter
Other
57 stars 6 forks source link

Seeing TypeError: 'undefined' is not an object (evaluating 'a.$_$coverage[c][d]') often #10

Closed aaronjensen closed 9 years ago

aaronjensen commented 9 years ago

It seems to clear on a wallaby restart. It appears to trigger sometimes after a compilation error.

TypeError: 'undefined' is not an object (evaluating 'a.$_$coverage[c][d]')
59/Users/aaronjensen/.atom/packages/atom-wallaby/wallaby-atom/index.js:8 Wallaby Console: Runtime error: TypeError: 'undefined' is not an object (evaluating 'a.$_$coverage[c][d]')/Users/aaronjensen/.atom/packages/atom-wallaby/wallaby-atom/index.js:8 (anonymous function)
aaronjensen commented 9 years ago

scratch that, i'm seeing it all the time now on this one file I'm editing :cry:

ArtemGovorov commented 9 years ago

Most likely it's wallaby caching issue, happens after some file manipulations, but we can't catch it reliably yet. All you have to do to get rid of it is to clear wallaby cache. Please let me know if find a way to reproduce, I'm hunting it for quite some time now.

aaronjensen commented 9 years ago

Could you just catch exceptions in that area and clear it automatically?

ArtemGovorov commented 9 years ago

Thanks, this is a very good idea indeed until I find the reason. Will require wallaby.js restart still, but at least I'll be able to tell what's wring and make sure it works after the restart.

ArtemGovorov commented 9 years ago

Have added the automatic cache clearing when encountering the error in core v1.0.102.

aaronjensen commented 9 years ago

Nice! Could you automatically restart as well? If it manually requires a restart, why not automate it?

In general, the manual restarts are the thing that make people think I'm crazy when I say I like wallaby. I'm having to do it all the time, it gets out of sync with my tests more often than it stays in sync on my larger project :disappointed:

ArtemGovorov commented 9 years ago

Can do the automatic restart, though I'd rather try to to catch the issue behind it and fix it. Do you mean other people are also having issues requiring manual restarts? With the restarts you have to do - is that just because of this issue or there are some other reasons? Atom integration is only like 2 weeks old (in terms of the release date) and is still in beta, so some hiccups here and there are expected, but I'm surprised that manual restarts are required that often.

aaronjensen commented 9 years ago

Well, other people aren't jumping on the bandwagon and using wallaby. I've paired w/ people on my machine and we've had some not-so-great experiences due to the restarts. This I reported here was one that stopped us using wallaby entirely, there were some earlier on that you fixed (you've been very responsive, which is awesome!) but I still occasionally see tests reported as failing that aren't, but a restart always clears it up. I also see babel errors stick sometimes. I'll have a compiler error, it'll get reported, then I'll fix the code and it'll stick until I restart, even though tests start passing.

ArtemGovorov commented 9 years ago

Ah, ok, I thought there were some more reports/discussions from others that I may have missed. Really sorry to hear about your experience with the restarts and would love to fix as much as I can. I'll try my webpack + babel sample project more extensively, if you can reproduce any of the issues that you've mentioned, please do report them. We normally fix most of the bugs that we can reproduce (and push the fixes to production) within 24 hours.

ArtemGovorov commented 9 years ago

BTW, one alternative to a full restart is to use wallaby Run project tests command. It re-runs all tests without restarting the engine so works faster and should help in the same cases where restart does.

aaronjensen commented 9 years ago

Good to know re: Run project tests, i'll give it a shot.

I'll let you know if i can reproduce anything, it's hard to know what causes them.. I just code and it happens seemingly randomly.