electron-userland / spectron

DEPRECATED: 🔎 Test Electron apps using ChromeDriver
http://electronjs.org/spectron
MIT License
1.68k stars 229 forks source link

window[requireName] is not a function #125

Open MarshallOfSound opened 7 years ago

MarshallOfSound commented 7 years ago

https://circleci.com/gh/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/1126?utm_campaign=build-failed&utm_medium=email&utm_source=notification

Recently (without any changes to either my Spectron tests or Spectron config) my Spectron tests have started failing on Linux with this error

Error: waitUntilWindowLoaded Promise was rejected with the following reason:
Error: unknown error: window[requireName] is not a function

I can't reproduce this locally on Windows or macOS so I'm wondering if there is something that has changed recently in Spectron that could have caused this regression.

kevinsawicki commented 7 years ago

Are you seeing this in 3.4.0? Can you reproduce it with 3.3.0?

waitUntilWindowLoaded was changed in https://github.com/electron/spectron/pull/118 since it previously was swallowing an internal exception every time and resolving itself with an Error instead of rejecting.

MarshallOfSound commented 7 years ago

@kevinsawicki It appears to be directly linked with https://github.com/electron/electron/issues/7359

Basically that error is thrown, then this window[requireName] fails, and then Spectron never terminates. I have to manually kill the process.