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

unknown error: cannot deserialize the result value received from Runtime.callFunctionOn #557

Closed
marianfoo opened this issue Nov 9, 2023 · 7 comments · Fixed by #570
Closed

Comments

@marianfoo
Copy link
Member

Describe the bug
Error thrown with FE V4 SAPUI5 1.120 on method getBindingContext() https://github.com/marianfoo/ui5-cc-spreadsheetimporter/blob/4dd811a70272fc6171555436c8c065bf0c4829bc/examples/test/specs/Objects/FEV4.js#L60

see github action run:
https://github.com/marianfoo/ui5-cc-spreadsheetimporter/actions/runs/6816727497/job/18538689782

It seems error only for Fiori Elements OData V4 with SAPUI5 Version 1.120

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/marianfoo/ui5-cc-spreadsheetimporter
  2. git checkout test/120
  3. pnpm i
  4. pnpm start:server
  5. pnpm start:v4fe:120
  6. cd examples
  7. npm run test -- ordersv4fe 120 --spec ./test/specs/all/UploadFileObjectPage.test.js

Expected behavior
No error

Logs/Console Output
if applicable, please copypasta code-fenced log output, e.g.

[chrome 118.0.5993.117 linux #0-4] 1) Upload File Object Page check Field: validFrom
[chrome 118.0.5993.117 linux #0-4] unknown error: cannot deserialize the result value received from Runtime.callFunctionOn
  (Session info: chrome=118.0.5993.117)
[chrome 118.0.5993.117 linux #0-4] unknown error: unknown error: cannot deserialize the result value received from Runtime.callFunctionOn
[chrome 118.0.5993.117 linux #0-4]   (Session info: chrome=118.0.5993.117)
[chrome 118.0.5993.117 linux #0-4]     at processTicksAndRejections (node:internal/process/task_queues:95:5)
[chrome 118.0.5993.117 linux #0-4]     at async executeControlMethod (/home/runner/work/ui5-cc-spreadsheetimporter/ui5-cc-spreadsheetimporter/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]._dqzhjicgm7f2oljenbbv2lawui/node_modules/wdio-ui5-service/client-side-js/executeControlMethod.cjs:14:12)
[chrome 118.0.5993.117 linux #0-4]     at async clientSide_executeControlMethod (/home/runner/work/ui5-cc-spreadsheetimporter/ui5-cc-spreadsheetimporter/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]._dqzhjicgm7f2oljenbbv2lawui/node_modules/wdio-ui5-service/client-side-js/executeControlMethod.cjs:143:18)
[chrome 118.0.5993.117 linux #0-4]     at async WDI5Control._executeControlMethod (file:https:///home/runner/work/ui5-cc-spreadsheetimporter/ui5-cc-spreadsheetimporter/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_@[email protected]._dqzhjicgm7f2oljenbbv2lawui/node_modules/wdio-ui5-service/src/lib/wdi5-control.ts:515:25)
[chrome 118.0.5993.117 linux #0-4]     at async FEV4.getDateFields (/home/runner/work/ui5-cc-spreadsheetimporter/ui5-cc-spreadsheetimporter/examples/test/specs/Objects/FEV4.js:60:19)
[chrome 118.0.5993.117 linux #0-4]     at async Context.<anonymous> (/home/runner/work/ui5-cc-spreadsheetimporter/ui5-cc-spreadsheetimporter/examples/test/specs/all/UploadFileObjectPage.test.js:129:24)

Runtime Env (please complete the following information):

  • wdi5/wdio-ui5-service-version: 2.0.2
  • UI5 version: 1.120.0
  • wdio-version (output of wdio --version): 8.18.2
  • node-version (output of node --version): 18.4
  • OS: mac/Linux
  • Browser + Version chrome 1.119
@vobu
Copy link

vobu commented Nov 15, 2023

ping to FE lib integration specialist @Siolto on this one :)

@Siolto
Copy link
Collaborator

Siolto commented Nov 16, 2023

Error exists since SAPUI5 Version 1.115.0 on Fiori Elements v4 applications. Further analysis needed

@marianfoo
Copy link
Member Author

Ok, thanks for looking into it.
But it doesn't sound like there is a quick solution.
Any workaround?

@Siolto
Copy link
Collaborator

Siolto commented Nov 16, 2023

not yet... I am more confused by the issue than i really understand it. I will keep you in the loop.

@Siolto
Copy link
Collaborator

Siolto commented Dec 14, 2023

In general getBindingContext is working fine. There seems to be a very weird edge case since 1.115. I condensed your example to a minimum. These are the required steps to trigger the error:

await browser.asControl({
            selector: {
                id: "ui.v4.ordersv4fe::OrdersList--fe::FilterBar::Orders-btnSearch"
            }
        }).press();
        await browser.pause(2000)

        await browser.goTo({ sHash: "#/Orders(ID={orderId},IsActiveEntity=true)" });
        await browser.pause(1000)
        await browser.goTo({ sHash: "#/Orders(ID={orderId},IsActiveEntity=true)/Items(ID={itemId},IsActiveEntity=true)" });
        const field = await browser.asControl({
            selector: {
                id: `ui.v4.ordersv4fe::Orders_ItemsObjectPage--fe::FormContainer::Identification::FormElement::DataField::validFrom::Field`
            }
        });

        const bindingContext = await field.getBindingContext()
        console.log(bindingContext)

If one of the steps is missing or we directly jump to the detail page everything is working fine

@marianfoo
Copy link
Member Author

Thank you for the detailed investigation.
If the workaround is to go directly to the object page then I will try that.
I had planned to do that anyway, but unfortunately I don't think it will work for all tests.
I'll give it a try

@marianfoo
Copy link
Member Author

fix helped me, all tests are green :)
https://github.com/marianfoo/ui5-cc-spreadsheetimporter/actions/runs/7292241157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants