Phantomjs: [2.5] SyntheticEvent.augmentClass is not a function

Created on 7 Jul 2017  路  4Comments  路  Source: ariya/phantomjs

Using latest (2017-07-07) phantomjs 2.5.0-development (win-x64) downloaded from binary builds.

While using phantomjs through backstopjs, I get the following error, which was also already reported in #14506 and #14365, but no issue had been created yet it seems.

SyntheticEvent.augmentClass is not a function. (In 'SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface)', 'SyntheticEvent.augmentClass' is undefined)

This error seems to occur when opening a page which was bundled using webpack.

Bug Crash QWebkit

Most helpful comment

@olee beta 2 is coming this weekend and it will have the fix for it.

All 4 comments

Hi! Yes, this is a known problem with QtWebKitNg. It will be fixed in the upcoming 2.5 release.

Can you tell, when we can expect a fix in the beta builds?

@olee beta 2 is coming this weekend and it will have the fix for it.

The new build does not run at all any more.
With beta-1 I got this output:

Running CasperJS with:  [ 'C:\\dev\\nvm\\v8.1.3\\node_modules\\backstopjs\\capture\\genBitmaps.js',
  '--captureConfigFileName=C:\\Users\\Bjoern\\AppData\\Local\\Temp\\capture\\0d01aaca96fedca53d30ec29487fedf4b1e5930b.json' ]
CasperJS:  Debug is enabled!
CasperJS: CREATING NEW REFERENCE FILES
CasperJS:  [info] [phantom] Starting...
CasperJS:  [info] [phantom] Running suite: 18 steps
CasperJS:  [debug] [phantom] Successfully injected Casper client-side utilities
CasperJS:  [info] [phantom] Step anonymous 1/18: done in 37ms.
CasperJS: [info] [phantom] Step _step 2/19: done in 50ms.
CasperJS:  [debug] [phantom] opening url: https://c3-dev-client.azurewebsites.net/about?dev_user=56da821d-3626-425b-af2d-d53ded3fc472&dev_token=gkifKIvRJKiugKOLnbGVfTRJmIUGUb8btubzfubr6vrVrBTgnUBUzfKo6BKunUI&testing=1, HTTP GET
CasperJS:  [debug] [phantom] Navigation requested: url=https://c3-dev-client.azurewebsites.net/about?dev_user=56da821d-3626-425b-af2d-d53ded3fc472&dev_token=gkifKIvRJKiugKOLnbGVfTRJmIUGUb8btubzfubr6vrVrBTgnUBUzfKo6BKunUI&testing=1, type=Other, willNavigate=true, isMainFrame=true
CasperJS:  [debug] [phantom] url changed to "https://c3-dev-client.azurewebsites.net/about?dev_user=56da821d-3626-425b-af2d-d53ded3fc472&dev_token=gkifKIvRJKiugKOLnbGVfTRJmIUGUb8btubzfubr6vrVrBTgnUBUzfKo6BKunUI&testing=1"
CasperJS:  [debug] [phantom] Navigation requested: url=about:blank, type=Other, willNavigate=true, isMainFrame=false
CasperJS:  %c env: DEV
CasperJS:  SyntaxError: Parser error
CasperJS:  [debug] [phantom] Navigation requested: url=https://vars.hotjar.com/rcj-99d43ead6bdf30da8ed5ffcb4f17100c.html, type=Other, willNavigate=true, isMainFrame=false
CasperJS:  TypeError: SyntheticEvent.augmentClass is not a function. (In 'SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface)', 'SyntheticEvent.augmentClass' is undefined)
CasperJS:  [debug] [phantom] Navigation requested: url=about:blank, type=Other, willNavigate=true, isMainFrame=false
CasperJS:  [debug] [phantom] Successfully injected Casper client-side utilities
CasperJS:  [info] [phantom] Step anonymous 4/19 https://c3-dev-client.azurewebsites.net/about?dev_user=56da821d-3626-425b-af2d-d53ded3fc472&dev_token=gkifKIvRJKiugKOLnbGVfTRJmIUGUb8btubzfubr6vrVrBTgnUBUzfKo6BKunUI&testing=1 (HTTP 200)
CasperJS:  [info] [phantom] Step anonymous 4/19: done in 5490ms.
CasperJS:  [info] [phantom] Step _step 5/21 https://c3-dev-client.azurewebsites.net/about?dev_user=56da821d-3626-425b-af2d-d53ded3fc472&dev_token=gkifKIvRJKiugKOLnbGVfTRJmIUGUb8btubzfubr6vrVrBTgnUBUzfKo6BKunUI&testing=1 (HTTP 200)
CasperJS:  [info] [phantom] Step _step 5/21: done in 5510ms.
CasperJS:  [info] [phantom] waitFor() finished in 220ms.
CasperJS:  [info] [phantom] Step anonymous 6/22 https://c3-dev-client.azurewebsites.net/about?dev_user=56da821d-3626-425b-af2d-d53ded3fc472&dev_token=gkifKIvRJKiugKOLnbGVfTRJmIUGUb8btubzfubr6vrVrBTgnUBUzfKo6BKunUI&testing=1 (HTTP 200)
CasperJS:  Ready event received.
CasperJS: [info] [phantom] Step anonymous 6/22: done in 5750ms.
CasperJS:  [info] [phantom] Step _step 7/22 https://c3-dev-client.azurewebsites.net/about?dev_user=56da821d-3626-425b-af2d-d53ded3fc472&dev_token=gkifKIvRJKiugKOLnbGVfTRJmIUGUb8btubzfubr6vrVrBTgnUBUzfKo6BKunUI&testing=1 (HTTP 200)
CasperJS:  [info] [phantom] Step _step 7/22: done in 5770ms.
CasperJS:  [info] [phantom] wait() finished waiting for 1ms.
...

With this build PhantomJs runs, but page could not load because of SyntheticEvent.augmentClass is not a function. (In 'SyntheticEvent.augmentClass(SyntheticCompositionEvent, CompositionEventInterface)', 'SyntheticEvent.augmentClass' is undefined)

The new beta-2 build however crashes(?) with the following output:

Running CasperJS with:  [ 'C:\\dev\\nvm\\v8.1.3\\node_modules\\backstopjs\\capture\\genBitmaps.js',
  '--captureConfigFileName=C:\\Users\\Bjoern\\AppData\\Local\\Temp\\capture\\59d1a232c4beddbb332a2956ec18ffd414e1af6f.json' ]
CasperJS:  Debug is enabled!
CasperJS: CREATING NEW REFERENCE FILES
CasperJS:  [info] [phantom] Starting...
CasperJS:  [info] [phantom] Running suite: 18 steps
CasperJS:  [debug] [phantom] Successfully injected Casper client-side utilities
CasperJS:  [info] [phantom] Step anonymous 1/18: done in 1119ms.
CasperJS:  [info] [phantom] Step _step 2/19: done in 1131ms.
CasperJS:  [debug] [phantom] opening url: https://c3-dev-client.azurewebsites.net/about?dev_user=56da821d-3626-425b-af2d-d53ded3fc472&dev_token=gkifKIvRJKiugKOLnbGVfTRJmIUGUb8btubzfubr6vrVrBTgnUBUzfKo6BKunUI&testing=1, HTTP GET
CasperJS:  [debug] [phantom] Navigation requested: url=https://c3-dev-client.azurewebsites.net/about?dev_user=56da821d-3626-425b-af2d-d53ded3fc472&dev_token=gkifKIvRJKiugKOLnbGVfTRJmIUGUb8btubzfubr6vrVrBTgnUBUzfKo6BKunUI&testing=1, type=Other, willNavigate=true, isMainFrame=true
CasperJS:  [debug] [phantom] url changed to "https://c3-dev-client.azurewebsites.net/about?dev_user=56da821d-3626-425b-af2d-d53ded3fc472&dev_token=gkifKIvRJKiugKOLnbGVfTRJmIUGUb8btubzfubr6vrVrBTgnUBUzfKo6BKunUI&testing=1"
CasperJS:  [debug] [phantom] Navigation requested: url=about:blank, type=Other, willNavigate=true, isMainFrame=false
CasperJS:  %c env: DEV

Testing script failed with code: 3221225725

EDIT 1:
It seems loading our test page causes this, as replacing the test url with something like http://google.de works.
Maybe there are some problems with our loaded bundled Javascript or the iframes in our page or something like that?
I can maybe try to investigate this a little, but without some more detailed logging on where this crashes, I'm not sure what to do.

EDIT 2:
After testing a little am am sure now, that it crashes when loading our bundled Javascript - this did not happen with previous builds (probably, because they errored before even completely loading the script?). If you have any tip on what I should test next, please tell me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maboiteaspam picture maboiteaspam  路  3Comments

simplegroupware picture simplegroupware  路  5Comments

sinojelly picture sinojelly  路  3Comments

qaDream77 picture qaDream77  路  4Comments

yisibl picture yisibl  路  5Comments