Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening DEBUG window fires an error for parentWindow.karma object "Cannot read property 'error' of undefined" #147

Open
ayyash opened this issue Dec 12, 2016 · 5 comments

Comments

@ayyash
Copy link

ayyash commented Dec 12, 2016

Everytime I click on "DEBUG" mode to open a new window with the Jasmine results, no matter what the real error is I end up with
TypeError: Cannot read property 'error' of undefined

That fires on the following line in context.js

if (!parentWindow.karma[method]) {
    parentWindow.karma.error('Expected Karma method "' + method + '" to exist but it doesn\'t')
    return
  }
@DaveEmmerson
Copy link

It's the 'karma' property that's undefined. Looking at the original window, it has it, so for whatever reason either parentWindow isn't that window or the karma property isn't visible to the new window.

@DaveEmmerson
Copy link

window.parent === window in this case.

"If a window does not have a parent, its parent property is a reference to itself."

@maksimr
Copy link
Contributor

maksimr commented Aug 22, 2017

@ayyash could you provide gist which reproduces the problem

Thanks

@ayyash
Copy link
Author

ayyash commented Aug 23, 2017

Sorry that was a long time ago, I haven't done work on karma since then

@HolgerJeromin
Copy link

Riding a dead horse but perhaps this is helping someone:
I had this error with an pending('waiting for adjustment') inside an describe.
Moving inside it solved the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants