ui5-community / wdi5

official UI5 end-to-end test framework for UI5 web-apps. wdi5 = Webdriver.IO + UI5 Test API
https://ui5-community.github.io/wdi5/
Apache License 2.0
102 stars 43 forks source link

Issue with build in Jenkins. Failed to load different resources. #629

Open george-georgiew opened 2 months ago

george-georgiew commented 2 months ago

Describe the bug A build in Jenkins CI/CD files to load sinon.js & autoWaiterAsync.js upon deployment. The local build passes without any problem, but the Jenkins build fails with errors as show below.

To Reproduce Steps to reproduce the behavior:

  1. Trigger a Jenkins build
  2. Observe build logs

Expected behavior The Jenkins build should complete successfully without any errors.

Logs/Console Output

14:47:11  [0-0]  [33m[wdi5] [0m skipped wdi5 injection!
14:47:15  [0-0] WDI5 LOG: after _doLogin
14:47:15  [0-0] WDI5 LOG: after toHaveUrl
14:47:17  [0-0] 2024-07-24T11:47:16.848Z ERROR webdriver: Request failed with status 500 due to javascript error: javascript error: failed to load 'sap/ui/thirdparty/sinon.js' from https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/thirdparty/sinon.js: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/thirdparty/sinon.js'.
14:47:17  [0-0] JavaScript stack:
14:47:17  [0-0] ModuleError: failed to load 'sap/ui/thirdparty/sinon.js' from https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/thirdparty/sinon.js: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/thirdparty/sinon.js'.
14:47:17  [0-0]     at we (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:6645)
14:47:17  [0-0]     at ge.failWith (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:4709)
14:47:17  [0-0]     at qe (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:13312)
14:47:17  [0-0]     at Oe (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:15314)
14:47:17  [0-0]     at Object.r [as require] (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:18696)
14:47:17  [0-0]     at eval (eval at executeAsyncScript (:472:26), <anonymous>:16:16)
14:47:17  [0-0]     at eval (eval at executeAsyncScript (:472:26), <anonymous>:51:8)
14:47:17  [0-0]     at eval (eval at executeAsyncScript (:472:26), <anonymous>:52:4)
14:47:17  [0-0]     at executeAsyncScript (<anonymous>:472:47)
14:47:17  [0-0]     at apply.$0 (<anonymous>:487:29)
14:47:17  [0-0] Caused by: Error: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/thirdparty/sinon.js'.
14:47:17  [0-0]     at je (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:9596)
14:47:17  [0-0]     at qe (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:13287)
14:47:17  [0-0]     at Oe (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:15314)
14:47:17  [0-0]     at Object.r [as require] (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:18696)
14:47:17  [0-0]     at eval (eval at executeAsyncScript (:472:26), <anonymous>:16:16)
14:47:17  [0-0]     at eval (eval at executeAsyncScript (:472:26), <anonymous>:51:8)
14:47:17  [0-0]     at eval (eval at executeAsyncScript (:472:26), <anonymous>:52:4)
14:47:17  [0-0]     at executeAsyncScript (<anonymous>:472:47)
14:47:17  [0-0]     at apply.$0 (<anonymous>:487:29)
14:47:17  [0-0]     at callFunction (<anonymous>:366:22)
14:47:17  [0-0]   (Session info: chrome=126.0.6478.114)
14:47:17  [0-0] javascript error in "Testing description "before all" hook: wrappedHook for "Testing description ""
14:47:17  javascript error: javascript error: failed to load 'sap/ui/thirdparty/sinon.js' from https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/thirdparty/sinon.js: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/thirdparty/sinon.js'.
14:47:17  JavaScript stack:
14:47:17  ModuleError: failed to load 'sap/ui/thirdparty/sinon.js' from https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/thirdparty/sinon.js: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/thirdparty/sinon.js'.
14:47:17      at we (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:6645)
14:47:17      at ge.failWith (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:4709)
14:47:17      at qe (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:13312)
14:47:17      at Oe (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:15314)
14:47:17      at Object.r [as require] (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:18696)
14:47:17      at eval (eval at executeAsyncScript (:472:26), <anonymous>:16:16)
14:47:17      at eval (eval at executeAsyncScript (:472:26), <anonymous>:51:8)
14:47:17      at eval (eval at executeAsyncScript (:472:26), <anonymous>:52:4)
14:47:17      at executeAsyncScript (<anonymous>:472:47)
14:47:17      at apply.$0 (<anonymous>:487:29)
14:47:17  Caused by: Error: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/thirdparty/sinon.js'.
14:47:17      at je (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:9596)
14:47:17      at qe (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:13287)
14:47:17      at Oe (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:15314)
14:47:17      at Object.r [as require] (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:18696)
14:47:17      at eval (eval at executeAsyncScript (:472:26), <anonymous>:16:16)
14:47:17      at eval (eval at executeAsyncScript (:472:26), <anonymous>:51:8)
14:47:17      at eval (eval at executeAsyncScript (:472:26), <anonymous>:52:4)
14:47:17      at executeAsyncScript (<anonymous>:472:47)
14:47:17      at apply.$0 (<anonymous>:487:29)
14:47:17      at callFunction (<anonymous>:366:22)
14:47:17    (Session info: chrome=126.0.6478.114)
14:47:17      at async clientSide_injectXHRPatch (/home/jenkins/… /node_modules/wdio-ui5-service/client-side-js/injectXHRPatch.cjs:2:12)
14:47:17  [0-0] FAILED in chrome - file:///app/synchronize-data/webapp/test/wdi5/specs/SynchronizationUoM.spec.js
14:47:17  [0-2]  [33m[wdi5] [0m skipped wdi5 injection! 
14:47:19  [0-2] WDI5 LOG: after _doLogin
14:47:19  [0-2] WDI5 LOG: after toHaveUrl
14:47:20  [0-2] 2024-07-24T11:47:19.888Z ERROR webdriver: Request failed with status 404 due to invalid session id: invalid session id
14:47:20  invalid session id: invalid session id
14:47:20  [0-2] FAILED in chrome – file path
14:47:20  [0-1]  [33m[wdi5] [0m skipped wdi5 injection!
14:47:22  [0-1] WDI5 LOG: after _doLogin
14:47:22  [0-1] WDI5 LOG: after toHaveUrl
14:47:23  [0-1] WDI5 LOG: after injectUI5
14:47:23  [0-1] WDI5 LOG: after 
14:47:41  [0-3]  [33m[wdi5] [0m skipped wdi5 injection!
14:47:43  [0-3] WDI5 LOG: after _doLogin
14:47:43  [0-3] WDI5 LOG: after toHaveUrl
14:47:45  [0-3] 2024-07-24T11:47:45.302Z ERROR webdriver: Request failed with status 500 due to javascript error: javascript error: failed to load 'sap/ui/test/autowaiter/_autoWaiterAsync.js' from https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/test/autowaiter/_autoWaiterAsync.js: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/test/autowaiter/_autoWaiterAsync.js'.
14:47:45  [0-3] JavaScript stack:
14:47:45  [0-3] ModuleError: failed to load 'sap/ui/test/autowaiter/_autoWaiterAsync.js' from https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/test/autowaiter/_autoWaiterAsync.js: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/test/autowaiter/_autoWaiterAsync.js'.
14:47:45  [0-3]     at we (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:6645)
14:47:45  [0-3]     at ge.failWith (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:4709)
14:47:45  [0-3]     at qe (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:13312)
14:47:45  [0-3]     at Oe (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:15314)
14:47:45  [0-3]     at Object.r [as require] (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:18696)
14:47:45  [0-3]     at eval (eval at executeAsyncScript (:472:26), <anonymous>:59:20)
14:47:45  [0-3]     at eval (eval at executeAsyncScript (:472:26), <anonymous>:424:8)
14:47:45  [0-3]     at eval (eval at executeAsyncScript (:472:26), <anonymous>:425:4)
14:47:45  [0-3]     at executeAsyncScript (<anonymous>:472:47)
14:47:45  [0-3]     at <anonymous>:487:29
14:47:45  [0-3] Caused by: Error: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/test/autowaiter/_autoWaiterAsync.js'.
14:47:45  [0-3]     at XMLHttpRequest.send (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/test/autowaiter/_XHRWaiter.js?eval:6:991)
14:47:45  [0-3]     at je (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:9596)
14:47:45  [0-3]     at qe (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:13287)
14:47:45  [0-3]     at Oe (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:15314)
14:47:45  [0-3]     at Object.r [as require] (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:18696)
14:47:45  [0-3]     at eval (eval at executeAsyncScript (:472:26), <anonymous>:59:20)
14:47:45  [0-3]     at eval (eval at executeAsyncScript (:472:26), <anonymous>:424:8)
14:47:45  [0-3]     at eval (eval at executeAsyncScript (:472:26), <anonymous>:425:4)
14:47:45  [0-3]     at executeAsyncScript (<anonymous>:472:47)
14:47:45  [0-3]     at <anonymous>:487:29
14:47:45  javascript error: javascript error: failed to load 'sap/ui/test/autowaiter/_autoWaiterAsync.js' from https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/test/autowaiter/_autoWaiterAsync.js: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/test/autowaiter/_autoWaiterAsync.js'.
14:47:45  JavaScript stack:
14:47:45  ModuleError: failed to load 'sap/ui/test/autowaiter/_autoWaiterAsync.js' from https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/test/autowaiter/_autoWaiterAsync.js: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/test/autowaiter/_autoWaiterAsync.js'.
14:47:45      at we (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:6645)
14:47:45      at ge.failWith (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:4709)
14:47:45      at qe (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:13312)
14:47:45      at Oe (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:15314)
14:47:45      at Object.r [as require] (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:18696)
14:47:45      at eval (eval at executeAsyncScript (:472:26), <anonymous>:59:20)
14:47:45      at eval (eval at executeAsyncScript (:472:26), <anonymous>:424:8)
14:47:45      at eval (eval at executeAsyncScript (:472:26), <anonymous>:425:4)
14:47:45      at executeAsyncScript (<anonymous>:472:47)
14:47:45      at <anonymous>:487:29
14:47:45  Caused by: Error: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/test/autowaiter/_autoWaiterAsync.js'.
14:47:45      at XMLHttpRequest.send (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ui/test/autowaiter/_XHRWaiter.js?eval:6:991)
14:47:45      at je (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:9596)
14:47:45      at qe (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:13287)
14:47:45      at Oe (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:15314)
14:47:45      at Object.r [as require] (https://sapui5.hana.ondemand.com/1.120.17/resources/sap/ushell/bootstrap/cdm.js:9:18696)
14:47:45      at eval (eval at executeAsyncScript (:472:26), <anonymous>:59:20)
14:47:45      at eval (eval at executeAsyncScript (:472:26), <anonymous>:424:8)
14:47:45      at eval (eval at executeAsyncScript (:472:26), <anonymous>:425:4)
14:47:45      at executeAsyncScript (<anonymous>:472:47)
14:47:45      at <anonymous>:487:29
14:47:45    (Session info: chrome=126.0.6478.114)
14:47:45      at async clientSide_injectUI5 (/home/jenkins/agent/workspace/ecipe-Formulation_epd-rf_PR-1917/node_modules/wdio-ui5-service/client-side-js/injectUI5.cjs:2:12)
14:47:46  [0-4]  [33m[wdi5] [0m skipped wdi5 injection!
14:47:48  [0-4] WDI5 LOG: after _doLogin
14:47:48  [0-4] WDI5 LOG: after toHaveUrl
14:47:48  [0-4] 2024-07-24T11:47:48.788Z ERROR webdriver: Request failed with status 404 due to invalid session id: invalid session id
14:47:48  invalid session id: invalid session id
14:47:48      at async clientSide_injectUI5 (/home/jenkins/agent/workspace/ecipe-Formulation_epd-rf_PR-1917/node_modules/wdio-ui5-service/client-side-js/injectUI5.cjs:2:12)
14:47:49  [0-5]  [33m[wdi5] [0m skipped wdi5 injection!
14:47:49  [0-8] RUNNING in chrome 

Runtime Env (please complete the following information):

github-actions[bot] commented 1 month ago

hey 👋 - silence for 30 days 🤐 ... anybody? 😀

roycepintosap commented 4 days ago

We are having the same issue in our internal instance running on saucelabs as well.

Siolto commented 4 days ago

@roycepintosap do you have the same error messages as George? In his log it seems that some files could not be loaded. So probably there is some configuration missing

roycepintosap commented 4 days ago

Yes, for us its the same sinon file which fails on the injectWDI5 step.

image
Siolto commented 4 days ago

Unexpected end of input usually means that there is something missing in the minified file. Probably something like } or ;.

@petermuessig: Do you have a clue why this is happening?