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

Removed unused lock, allowing usage on Lambda #1550

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

filipopo
Copy link

@filipopo filipopo commented Sep 7, 2023

Resolves #441, #772 and #975

This line of code does nothing? and it's preventing undetected-chromedriver from working on AWS Lambda:
image

I have made a minimal working example with this change so correct me if I'm wrong but removing this line doesn't break anything:
https://github.com/filipopo/undetected-chromedriver-lambda

@grantrosse
Copy link

good find- bumping this.

@filipopo
Copy link
Author

@ultrafunkamsterdam Please do check this so I no longer have to maintain a fork of this project with just one line removed hah

@KamilMroczek
Copy link

Bumping this. This is also the reason why I get "..../multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown" when running undetected in a mutiprocessing process.

import undetected_chromedriver as uc  # just importing it leads to the leakage
import multiprocessing


def worker(task_id: int):
    print(f'worker {task_id}')


def run():
    processes = []

    # Launch multiple processes
    for i in range(1):
        process = multiprocessing.Process(target=worker, args=(i, ))
        processes.append(process)
        process.start()

    # Wait for all processes to complete
    for process in processes:
        process.join()


if __name__ == '__main__':
    run()

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 this pull request may close these issues.

Using with AWS Lambda
3 participants