Skip to content

MaxListenersExceededWarning when running fetch tests #32951

Closed

Description

tests/async/test_fetch_global.py::test_should_json_stringify_body_when_content_type_is_application_json[chromium-serialization2] (node:21485) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 lookup listeners added to [Socket]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit
    at genericNodeError (node:internal/errors:984:15)
    at wrappedFn (node:internal/errors:538:14)
    at _addListener (node:events:593:17)
    at Socket.addListener (node:events:611:10)
    at Readable.on (node:internal/streams/readable:1126:35)
    at ClientRequest.<anonymous> (/Users/maxschmitt/Developer/playwright-python/playwright/driver/package/lib/server/fetch.js:396:16)
    at ClientRequest.emit (node:events:531:35)
    at tickOnSocket (node:_http_client:850:7)
    at onSocketNT (node:_http_client:913:5)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
(node:21485) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 secureConnect listeners added to [Socket]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit
    at genericNodeError (node:internal/errors:984:15)
    at wrappedFn (node:internal/errors:538:14)
    at _addListener (node:events:593:17)
    at Socket.addListener (node:events:611:10)
    at Readable.on (node:internal/streams/readable:1126:35)
    at ClientRequest.<anonymous> (/Users/maxschmitt/Developer/playwright-python/playwright/driver/package/lib/server/fetch.js:402:16)
    at ClientRequest.emit (node:events:531:35)
    at tickOnSocket (node:_http_client:850:7)
    at onSocketNT (node:_http_client:913:5)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

When running the Python fetch tests: pytest --browser chromium tests/async/test_fetch_browser_context.py tests/async/test_fetch_global.py

Leaks here:

        socket.on('lookup', () => {
          dnsLookupAt = (0, _utils.monotonicTime)();
        });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions