Can't build xwiki-platform 11.10.12

Hello,

I’m trying to build xwik-platform from tags/xwiki-platform-11.10.12

I tried

mvn clean install -Dtest=none -DfailIfNoTests=false -Pxwiki

mvn clean install

I have an error

I use last version of node 14.15 and last of phantomjs 2.1.1

XWiki Platform - Web Resources ..................... FAILURE [ 23.781 s]
[INFO] Reactor Summary for XWiki Platform - Web Resources 11.10.12:
[ERROR - 2020-12-17T12:52:59.894Z] Session [ca63c4b0-4066-11eb-939c-2dcf3c24bc6f] - page.onError - msg: Error: Script error for "tree", needed by: export-tree
http://requirejs.org/docs/errors.html#scripterror
phantomjs://platform/console++.js:263 in error
[ERROR] Failed to execute goal com.github.searls:jasmine-maven-plugin:2.1:test (default) on project xwiki-platform-web: The jasmine-maven-plugin encountered an exception:
[ERROR] System info: host: 'myhost.ch', ip: '192.168.1.13', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14', java.version: '1.8.0_172'
[ERROR] Driver info: org.openqa.selenium.phantomjs.PhantomJSDriver
[ERROR] Caused by: org.openqa.selenium.TimeoutException: Timed out after 10 seconds waiting for com.github.searls.jasmine.runner.SpecRunnerExecutor$1@769e025c

Any idea ? last version that I built was 10.11.9 and it worked.

Could that be Loading... ?

I think it could be related yes, I’m on mac.

If I try on 10.11.9 the xwiki-platform-web composent process well

What change in version 11 ?

[INFO] --- jasmine-maven-plugin:2.1:test (amd) @ xwiki-platform-web ---
[INFO] jetty-8.1.18.v20150929
[INFO] Started SelectChannelConnector@0.0.0.0:50353
[INFO] Executing Jasmine Specs
[INFO] Found phantomjs 2.1.1 at /usr/local/bin/phantomjs
Dec 21, 2020 10:38:50 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: executable: /usr/local/bin/phantomjs
Dec 21, 2020 10:38:50 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: port: 29228
Dec 21, 2020 10:38:50 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: arguments: [--webdriver=29228, --webdriver-logfile=/Users/messines/Dev/xwiki/xwiki-platform/phantomjsdriver.log]
Dec 21, 2020 10:38:50 AM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: environment: {}
[INFO  - 2020-12-21T09:38:51.757Z] GhostDriver - Main - running on port 29228
[INFO  - 2020-12-21T09:38:51.962Z] Session [55c90e50-4370-11eb-b5f1-d7baf841bb2b] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/538.1 (KHTML, like Gecko) PhantomJS/2.1.1 Safari/538.1","webSecurityEnabled":true}
[INFO  - 2020-12-21T09:38:51.962Z] Session [55c90e50-4370-11eb-b5f1-d7baf841bb2b] - page.customHeaders:  - {}
[INFO  - 2020-12-21T09:38:51.962Z] Session [55c90e50-4370-11eb-b5f1-d7baf841bb2b] - Session.negotiatedCapabilities - {"browserName":"phantomjs","version":"2.1.1","driverName":"ghostdriver","driverVersion":"1.2.0","platform":"mac-unknown-64bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
[INFO  - 2020-12-21T09:38:51.962Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 55c90e50-4370-11eb-b5f1-d7baf841bb2b
[INFO  - 2020-12-21T09:38:53.147Z] ShutdownReqHand - _handle - About to shutdown
[INFO]
-------------------------------------------------------
 J A S M I N E   S P E C S
-------------------------------------------------------
[INFO]
Events Bridge
  Dependencies
  Prototype -> jQuery
    document.fire
    $(element).fire
    event.stop
    event.preventDefault
    filter xwiki:* events
  jQuery -> Prototype
    $(document).trigger
    $(element).trigger
    event.stopPropagation
    event.stop
    filter xwiki:* events

Results: 11 specs, 0 failures, 0 pending

Note that Loading... specifically indicate that the problem occurs on Linux Debian Buster, so here your problem might be different. The stacktrace you pasted doesn’t show the same error either.

AFAIK @vmassol builds XWiki on Mac everyday without any issue, so I find it weird that you got that problem.

Many dependencies have been upgraded in 11.x cycle, and notably selenium so it could be that. Now a workaround for you could be to use a docker image to build XWiki if your standard setup doesn’t work: we are using the image xwiki/build:jessie for that. You can find information for using it on xwiki-docker-build/build at master · xwiki/xwiki-docker-build · GitHub. Pay attention to use the jessie tag else you’ll face XWIKI-17287 issue again.

Just did:

  • cd xwiki-platform-core/xwiki-platform-web
  • `git checkout xwiki-platform-11.10.12``
  • mvn clean install

And that worked fine.

I don’t understand this part. You don’t have to setup anything AFAIK. Everything is done by the build. If you’ve made changes to the xwiki build then maybe that’s why it’s not working… you should try without any changes.

Thanks

I’m just giving some more context about my config I don’t know if it’s usefull but my error seems to be related to phantomjs somehow. I’m alson on Mac Mojave 10.14

I executed the very same checkout and command than you in xwiki-platform-web and it’s still impossible to build for me

This is the complete error

[ERROR] Failed to execute goal com.github.searls:jasmine-maven-plugin:2.1:test (default) on project xwiki-platform-web: The jasmine-maven-plugin encountered an exception:
[ERROR] java.lang.RuntimeException: org.openqa.selenium.TimeoutException: Timed out after 10 seconds waiting for com.github.searls.jasmine.runner.SpecRunnerExecutor$1@3d225fe9
[ERROR] Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
[ERROR] System info: host: 'HBPPCO291944.epfl.ch', ip: '192.168.1.13', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14', java.version: '1.8.0_172'
[ERROR] Driver info: org.openqa.selenium.phantomjs.PhantomJSDriver
[ERROR] Capabilities [{applicationCacheEnabled=false, rotatable=false, handlesAlerts=false, databaseEnabled=false, version=2.1.1, platform=MAC, browserConnectionEnabled=false, proxy={proxyType=direct}, nativeEvents=true, acceptSslCerts=false, driverVersion=1.2.0, locationContextEnabled=false, webStorageEnabled=false, browserName=phantomjs, takesScreenshot=true, driverName=ghostdriver, javascriptEnabled=true, cssSelectorsEnabled=true}]
[ERROR] Session ID: 0070b960-50f1-11eb-bd25-c9a24859fd63
[ERROR] 	at com.github.searls.jasmine.runner.SpecRunnerExecutor.execute(SpecRunnerExecutor.java:53)
[ERROR] 	at com.github.searls.jasmine.mojo.TestMojo.executeSpecs(TestMojo.java:236)
[ERROR] 	at com.github.searls.jasmine.mojo.TestMojo.run(TestMojo.java:204)
[ERROR] 	at com.github.searls.jasmine.mojo.AbstractJasmineMojo.execute(AbstractJasmineMojo.java:385)
[ERROR] 	at com.github.searls.jasmine.mojo.TestMojo.execute(TestMojo.java:191)
[ERROR] 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
[ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR] 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
[ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR] 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
[ERROR] 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
[ERROR] 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR] 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
[ERROR] 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
[ERROR] 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
[ERROR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] 	at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
[ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
[ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
[ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
[ERROR] Caused by: org.openqa.selenium.TimeoutException: Timed out after 10 seconds waiting for com.github.searls.jasmine.runner.SpecRunnerExecutor$1@3d225fe9
[ERROR] Build info: version: '2.48.2', revision: '41bccdd10cf2c0560f637404c2d96164b67d9d67', time: '2015-10-09 13:08:06'
[ERROR] System info: host: 'HBPPCO291944.epfl.ch', ip: '192.168.1.13', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14', java.version: '1.8.0_172'
[ERROR] Driver info: org.openqa.selenium.phantomjs.PhantomJSDriver
[ERROR] Capabilities [{applicationCacheEnabled=false, rotatable=false, handlesAlerts=false, databaseEnabled=false, version=2.1.1, platform=MAC, browserConnectionEnabled=false, proxy={proxyType=direct}, nativeEvents=true, acceptSslCerts=false, driverVersion=1.2.0, locationContextEnabled=false, webStorageEnabled=false, browserName=phantomjs, takesScreenshot=true, driverName=ghostdriver, javascriptEnabled=true, cssSelectorsEnabled=true}]
[ERROR] Session ID: 0070b960-50f1-11eb-bd25-c9a24859fd63
[ERROR] 	at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:80)
[ERROR] 	at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:261)
[ERROR] 	at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:205)
[ERROR] 	at com.github.searls.jasmine.runner.SpecRunnerExecutor.waitForRunnerToFinish(SpecRunnerExecutor.java:91)
[ERROR] 	at com.github.searls.jasmine.runner.SpecRunnerExecutor.execute(SpecRunnerExecutor.java:43)
[ERROR] 	... 26 more

I I checkout to the version 10, it works perfectly. So I really think it comes from new version.

Btw the docker build is not really usefull for me, I’m doing local development, I need to build the whole xwiki platform.

So far this error is blocker for me :frowning:

The docker build is a local build :slight_smile: (the source dir is mapped in the container).

I don’t know, as I said normally the whole thing is controlled in the build so you don’t need to install anything and we should have the same versions.

Maybe you can just skip the tests for this module?