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

Bug Report_Getting " PrintDeps.exe Bad image" pop-ups while running tests from terminal using ibm_db package with Playwright with JavaScript #974

Closed
54995610 opened this issue Jan 4, 2024 · 8 comments

Comments

@54995610
Copy link

54995610 commented Jan 4, 2024

System info
Playwright Version: v.1.40.1, JavaScript
Operating System: Windows 11 Enterprise 64, Version 10.0.19045 Build 19045
Browser: All (for example: Chromium version
Node version: v.18.19.0
ibm_db v.3.2.1 (https://www.npmjs.com/package/ibm_db)

We are using Playwright with Javascript for our UI automation where we are also establishing a connection to IBM Database by using following two :-

var ibmdb = require('ibm_db')
const open = util.promisify(ibmdb.open)

When I am executing the script I am getting 8 different PrintDeps.exe bad image pop-ops where I have to close all those 8 pop-ups manually and that's when the execution is starting.

We are using version :- "@playwright/test": "^1.40.1".

Note:- I did placed the " var ibmdb = require('ibm_db')" inside the function and I was able to execute the script without any issues. Actual issue comes when I execute my test scripts in Parallel or sequentially, first test script will get executed successfully and as soon second test script starts, we are seeing following 8 pop-ups.

Also, when I comment above two lines of code and assume I am not using ibm_db in my code, all my code is working parallelly and sequentially.

Observation :- When we do npx playwright install on my machine it is downloading "chromium-1091" folder in "C:\Users\Userid\AppData\Local\ms-playwright" folder where I think it is causing the issue.

We did set the PATH and also created a variable 'IBM_DB_HOME' with path having till 'license'.

image

image

image

image

image

image

image

@mxschmitt
Copy link

hello from the Playwright team! In the past a few users ran into this issue with using the library, which broke Playwright. We are unsure if its an issue on our or on your side. When I was debugging it, I saw that after we load the native ibm binding, it stops working, maybe you have a clue on whats going on there. See microsoft/playwright#28846 (comment).

Thanks!

@bimalkjha
Copy link
Member

@mxschmitt @54995610 what was the previous version of ibm_db which was working?
In the shared code, I see you are promisifying ibmdb.open() as const open = util.promisify(ibmdb.open). It may be the cause of issue as open api returns promise in latest version if you do not pass a callback function. In fact, all ibmdb apis returns promise and you can use it for async-await programming. Please check and update. thanks.

@mxschmitt
Copy link

I think it was never working. It only reproduces on Windows and it also reproduced without util.promisify.

@54995610
Copy link
Author

54995610 commented Jan 4, 2024

That's correct we are also seeing this issue even without using util,promisify.

@bimalkjha
Copy link
Member

@54995610 Could you please share simplified steps to reproduce this issue on my Windows system? I have not used Playwright yet. Thanks.

@mxschmitt
Copy link

OS: Windows

npm init playwright my-project
cd my-project
// put the require inside tests/example.spec.ts
npx playwright test

Actual: throws with a weird error (via a Windows MessageBox) when we launch PrintDeps.exe via child_process.spawn
Expected: Does not

Note: We mitigated it on the Playwright side for now, @54995610 has not confirmed yet, that it works for him, but for me did not reproduce anymore.

@bimalkjha
Copy link
Member

@mxschmitt Thanks for sharing the repro steps. I am able to reproduce the issue and getting test result as below:

C:\nodework\defects\my-proj>npx playwright test

Running 6 tests using 4 workers
  6 passed (37.6s)

To open last HTML report run:

  npx playwright show-report


C:\nodework\defects\my-proj>

The reason for these pop-ups only for require('ibm_db') is unknown for me. We need detailed info from playwright team about this behavior, then we can look further. Thanks.

@bimalkjha
Copy link
Member

Closing the issue now as issue seems with playwright. Once, you have input from playwrite team with detail, you can post here and we can reopen the issue. Thanks.

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

No branches or pull requests

3 participants