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

Exception thrown when using forRootAsync #250

Open
orankhu opened this issue Dec 7, 2020 · 2 comments
Open

Exception thrown when using forRootAsync #250

orankhu opened this issue Dec 7, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@orankhu
Copy link

orankhu commented Dec 7, 2020

Bug Report

browser.createIncognitoBrowserContext is not a function

Current behavior

If using forRootAsync throws an error saying that browser.createIncognitoBrowserContext is not a function

Expected behavior

It should not throw an exception and create module correctly when using forRootAsync

Possible solution

I'm not sure if it's related but found out in in the PuppeteerCoreModule where it tries to create context HERE. useFactory has 1 arg which is Browser but inject is provided with 2 parameters and browser is the second param.

According to Nest docs, it mentioned that The two lists should be correlated: Nest will pass instances from the inject list as arguments to the factory function in the same order.

Environment

"@nestjs/common": "^7.5.1",
"@nestjs/config": "^0.6.1",
"@nestjs/core": "^7.5.1",
"nest-puppeteer": "^1.1.1",
"puppeteer": "^5.5.0"

@tinovyatkin
Copy link
Owner

Thank you for reporting, will investigate that. PRs are also very welcome!

@tinovyatkin tinovyatkin added the bug Something isn't working label Jan 22, 2021
@prionkor
Copy link

prionkor commented May 4, 2022

Having same problem, anyone found a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants