Skip to content

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()

@filipopo
Copy link
Author

Maybe if this was branded as a "Fixed memory leak" it would get some more attention @KamilMroczek ...

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