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

Fix 'Failed to send log. Error: Item with tempId "undefined" not found' error when run E2E typescript tests #22648

Closed
dmytro-ndp opened this issue Nov 1, 2023 · 1 comment
Assignees
Labels
area/qe kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P2 Has a minor but important impact to the usage or development of the system.

Comments

@dmytro-ndp
Copy link
Contributor

dmytro-ndp commented Nov 1, 2023

Is your task related to a problem? Please describe

https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/Testing/job/e2e/job/basic/job/typescript-tests/13898/consoleFull

14:23:46        ✔ Delete the workspace by UI
14:23:46            ▼     at /tmp/e2e/specs/MochaHooks.ts:39:12 - delete workspace name
14:23:46  
14:23:46              ‣ Context.deleteAllWorkspacesOnFinish - Property DELETE_WORKSPACE_ON_FAILED_TEST is true - trying to stop and delete all running workspace after test run with API.
14:23:46            ▼ TestWorkspaceUtil.stopAndDeleteAllRunningWorkspaces
14:23:46            ▼ ApiUrlResolver.obtainUserNamespace
14:23:46              ‣ ApiUrlResolver.obtainUserNamespace - USER_NAMESPACE.length = 0, calling kubernetes API
14:23:46              ‣ DriverHelper.getDriver
14:23:46  Failed to send log. Error: Item with tempId "undefined" not found
14:23:46      at RPClient.sendLogWithoutFile (/tmp/e2e/node_modules/@reportportal/client-javascript/lib/report-portal-client.js:686:9)
14:23:46      at RPClient.sendLog (/tmp/e2e/node_modules/@reportportal/client-javascript/lib/report-portal-client.js:666:17)
14:23:46      at ReportportalAgent.sendLog (/tmp/e2e/node_modules/@reportportal/agent-js-mocha/lib/mochaReporter.js:124:39)
14:23:46      at ReportportalAgent.sendTestItemLog (/tmp/e2e/node_modules/@reportportal/agent-js-mocha/lib/mochaReporter.js:116:10)
14:23:46      at process.emit (node:events:513:28)
14:23:46      at process.emit (node:domain:489:12)
14:23:46      at process.emit.sharedData.processEmitHook.installedValue [as emit] (/tmp/e2e/node_modules/@cspotcode/source-map-support/source-map-support.js:745:40)
14:23:46      at Function.addLog (/tmp/e2e/node_modules/@reportportal/client-javascript/lib/publicReportingAPI.js:45:13)
14:23:46      at Object.log (/tmp/e2e/node_modules/@reportportal/agent-js-mocha/lib/publicReportingAPI.js:23:30)
14:23:46      at Object.trace (/tmp/e2e/node_modules/@reportportal/agent-js-mocha/lib/publicReportingAPI.js:26:48)
14:23:46      at Function.trace (/tmp/e2e/utils/Logger.ts:108:10)
14:23:46      at Context.deleteAllWorkspacesOnFinish (/tmp/e2e/specs/MochaHooks.ts:134:13)
14:23:46      at callFn (/tmp/e2e/node_modules/mocha/lib/runnable.js:366:21)
14:23:46      at Hook.Runnable.run (/tmp/e2e/node_modules/mocha/lib/runnable.js:354:5)
14:23:46      at next (/tmp/e2e/node_modules/mocha/lib/runner.js:510:10)
14:23:46      at Immediate.<anonymous> (/tmp/e2e/node_modules/mocha/lib/runner.js:571:5)
14:23:46      at processImmediate (node:internal/timers:466:21)
14:23:46  Failed to send log. Error: Item with tempId "undefined" not found
14:23:46      at RPClient.sendLogWithoutFile (/tmp/e2e/node_modules/@reportportal/client-javascript/lib/report-portal-client.js:686:9)
14:23:46      at RPClient.sendLog (/tmp/e2e/node_modules/@reportportal/client-javascript/lib/report-portal-client.js:666:17)
14:23:46      at ReportportalAgent.sendLog (/tmp/e2e/node_modules/@reportportal/agent-js-mocha/lib/mochaReporter.js:124:39)
14:23:46      at ReportportalAgent.sendTestItemLog (/tmp/e2e/node_modules/@reportportal/agent-js-mocha/lib/mochaReporter.js:116:10)
14:23:46      at process.emit (node:events:513:28)
14:23:46      at process.emit (node:domain:489:12)
14:23:46      at process.emit.sharedData.processEmitHook.installedValue [as emit] (/tmp/e2e/node_modules/@cspotcode/source-map-support/source-map-support.js:745:40)
14:23:46      at Function.addLog (/tmp/e2e/node_modules/@reportportal/client-javascript/lib/publicReportingAPI.js:45:13)
14:23:46      at Object.log (/tmp/e2e/node_modules/@reportportal/agent-js-mocha/lib/publicReportingAPI.js:23:30)
14:23:46      at Object.trace (/tmp/e2e/node_modules/@reportportal/agent-js-mocha/lib/publicReportingAPI.js:26:48)
14:23:46      at Function.trace (/tmp/e2e/utils/Logger.ts:108:10)
14:23:46      at DriverHelper.getDriver (/tmp/e2e/utils/DriverHelper.ts:735:10)
14:23:46      at CheMultiuserAuthorizationHeaderHandler.get (/tmp/e2e/utils/request-handlers/headers/CheMultiuserAuthorizationHeaderHandler.ts:31:60)
14:23:46      at CheApiRequestHandler.get (/tmp/e2e/utils/request-handlers/CheApiRequestHandler.ts:97:82)
14:23:46      at ApiUrlResolver.obtainUserNamespace (/tmp/e2e/utils/workspace/ApiUrlResolver.ts:41:79)
14:23:46      at ApiUrlResolver.getWorkspacesApiUrl (/tmp/e2e/utils/workspace/ApiUrlResolver.ts:33:40)
14:23:46      at TestWorkspaceUtil.stopAndDeleteAllRunningWorkspaces (/tmp/e2e/utils/workspace/TestWorkspaceUtil.ts:156:98)
14:23:46      at Context.deleteAllWorkspacesOnFinish (/tmp/e2e/specs/MochaHooks.ts:138:30)
14:23:46      at callFn (/tmp/e2e/node_modules/mocha/lib/runnable.js:366:21)
14:23:46      at Hook.Runnable.run (/tmp/e2e/node_modules/mocha/lib/runnable.js:354:5)
14:23:46      at next (/tmp/e2e/node_modules/mocha/lib/runner.js:510:10)
14:23:46      at Immediate.<anonymous> (/tmp/e2e/node_modules/mocha/lib/runner.js:571:5)
14:23:46      at processImmediate (node:internal/timers:466:21)
14:23:46            ▼ ApiUrlResolver.obtainUserNamespace - kubeapi success: user-devspaces
14:23:46              ‣ DriverHelper.getDriver

Describe the solution you'd like

TODO

Describe alternatives you've considered

No response

Additional context

related PR: #22636

Error has thrown by code https://github.com/eclipse-che/che/blob/main/tests/e2e/utils/Logger.ts#L107-L109

		if (this.sendLogMessageIntoReportPortal()) {
			rpApi.trace(message);
		}

Workaround: set DELETE_ALL_WORKSPACES_ON_RUN_FINISH=false (-e DELETE_WORKSPACE_ON_FAILED_TEST=false), to avoid removal of all workspaces on failed test: https://github.com/eclipse-che/che/blob/main/tests/e2e/specs/MochaHooks.ts#L133

Another case: CheReporter.ts error

19:38:32    3) "after all" hook: stopTheDriver in "{root}":
19:38:32       NoSuchSessionError: Unable to find session with ID: 0c1e7902dcc65894356cac59199ebc5c
19:38:32  Build info: version: '4.18.1', revision: 'b1d3319b48'
19:38:32  System info: os.name: 'Linux', os.arch: 'amd64', os.version: '4.18.0-513.24.1.el8_9.x86_64', java.version: '11.0.21'
19:38:32  Driver info: driver.version: unknown
19:38:32        at Object.throwDecodedError (/tmp/e2e/node_modules/selenium-webdriver/lib/error.js:524:15)
19:38:32        at parseHttpResponse (/tmp/e2e/node_modules/selenium-webdriver/lib/http.js:587:13)
19:38:32        at Executor.execute (/tmp/e2e/node_modules/selenium-webdriver/lib/http.js:515:28)
19:38:32        at processTicksAndRejections (node:internal/process/task_queues:95:5)
19:38:32        at async thenableWebDriverProxy.execute (/tmp/e2e/node_modules/selenium-webdriver/lib/webdriver.js:741:17)
19:38:32        at async Object.thenFinally [as finally] (/tmp/e2e/node_modules/selenium-webdriver/lib/promise.js:100:5)
19:38:32        at async DriverHelper.quit (/tmp/e2e/utils/DriverHelper.ts:749:3)
19:38:32        at async Context.stopTheDriver (/tmp/e2e/specs/MochaHooks.ts:148:5)
19:38:32  
19:38:32  
19:38:32  
19:38:32  Failed to send log. Error: Item with tempId "undefined" not found
19:38:32      at RPClient.sendLogWithoutFile (/tmp/e2e/node_modules/@reportportal/client-javascript/lib/report-portal-client.js:686:9)
19:38:32      at RPClient.sendLog (/tmp/e2e/node_modules/@reportportal/client-javascript/lib/report-portal-client.js:666:17)
19:38:32      at ReportportalAgent.sendLog (/tmp/e2e/node_modules/@reportportal/agent-js-mocha/lib/mochaReporter.js:124:39)
19:38:32      at ReportportalAgent.sendTestItemLog (/tmp/e2e/node_modules/@reportportal/agent-js-mocha/lib/mochaReporter.js:116:10)
19:38:32      at process.emit (node:events:517:28)
19:38:32      at process.emit (node:domain:489:12)
19:38:32      at process.emit.sharedData.processEmitHook.installedValue [as emit] (/tmp/e2e/node_modules/@cspotcode/source-map-support/source-map-support.js:745:40)
19:38:32      at Function.addLog (/tmp/e2e/node_modules/@reportportal/client-javascript/lib/publicReportingAPI.js:45:13)
19:38:32      at Object.log (/tmp/e2e/node_modules/@reportportal/agent-js-mocha/lib/publicReportingAPI.js:23:30)
19:38:32      at Object.error (/tmp/e2e/node_modules/@reportportal/agent-js-mocha/lib/publicReportingAPI.js:30:48)
19:38:32      at Function.error (/tmp/e2e/utils/Logger.ts:26:10)
19:38:32      at Runner.<anonymous> (/tmp/e2e/utils/CheReporter.ts:126:11)
@dmytro-ndp dmytro-ndp added kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P2 Has a minor but important impact to the usage or development of the system. area/qe labels Nov 1, 2023
@dmytro-ndp
Copy link
Contributor Author

similar issue: reportportal/agent-js-cypress#9

@dmytro-ndp dmytro-ndp changed the title Fix 'Failed to send log. Error: Item with tempId "undefined" not found' error when run E2E typescript SmokeTest Fix 'Failed to send log. Error: Item with tempId "undefined" not found' error when run E2E typescript tests May 15, 2024
@dmytro-ndp dmytro-ndp self-assigned this May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/qe kind/task Internal things, technical debt, and to-do tasks to be performed. severity/P2 Has a minor but important impact to the usage or development of the system.
Projects
Status: ✅ Done
Development

No branches or pull requests

1 participant