mobile-dev-inc / maestro

Painless Mobile UI Automation
https://maestro.mobile.dev/
Apache License 2.0
5.88k stars 281 forks source link

Memory leak when running CICD flow #2134

Open christian-hess-94 opened 1 week ago

christian-hess-94 commented 1 week ago

Is there an existing issue for this?

Steps to reproduce

Sadly I'm not able to provide a reproducible example as the issue randomly started happening. We are getting (node:3196) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unpipe listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit when running our CICD pipeline. There were not recent changes to it

Actual results

The workflow stops

Expected results

The workflow continues and finishes the tests

About app

It's a close source app for a startup. We are using maestro for running tests agains our storybook variant which houses all components from our design system.

About environment

The cicd workflow is being run on a ubuntu github actions CI machine

Logs

Logs ``` Tap on "SIDEBAR"... COMPLETED Wait for animation to end... (node:3196) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 end listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit COMPLETED Tap on id: Storybook.ListView.SearchBar... (node:3196) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 unpipe listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit (node:3196) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 data listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit (node:3196) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit (node:3196) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit (node:3196) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 finish listeners added to [Socket]. Use emitter.setMaxListeners() to increase limit FAILED ```

Maestro version

1.33.1

How did you install Maestro?

install script (https://get.maestro.mobile.dev)

Anything else?

No response

linear[bot] commented 1 week ago

MA-2542 Memory leak when running CICD flow

christian-hess-94 commented 1 week ago

Upon additional debugging, this seems to happen exclusively when the CICD machine tries to interact with the storybook Search bar, which we use to filter components for each test being carried. it seems that therre might be some kind of animation that is messing with the memory