Possible EventEmitter memory leak detected.
I'm seeing this error constantly at the moment, with the log below. Any idea why this is happening?
[18-05-18 00:29:20.515] (CLI) (node:678) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 data listeners added. Use emitter.setMaxListeners() to increase limit
at _addListener (events.js:280:19)
at IOSDeviceLibStdioHandler.addListener (events.js:297:10)
at Promise (/usr/local/lib/node_modules/nativescript/node_modules/ios-device-lib/index.js:121:35)
at new Promise (<anonymous>)
at IOSDeviceLib._getPromise (/usr/local/lib/node_modules/nativescript/node_modules/ios-device-lib/index.js:103:10)
at deviceIdentifiers.map.di (/usr/local/lib/node_modules/nativescript/node_modules/ios-device-lib/index.js:78:43)
at Array.map (<anonymous>)
at IOSDeviceLib.apps (/usr/local/lib/node_modules/nativescript/node_modules/ios-device-lib/index.js:78:28)
at getMultipleResults (/usr/local/lib/node_modules/nativescript/lib/common/mobile/ios/device/ios-device-operations.js:91:65)
at IOSDeviceOperations.<anonymous> (/usr/local/lib/node_modules/nativescript/lib/common/mobile/ios/device/ios-device-operations.js:198:30)
Once this error arises, I can't use Sidekick anymore and need to restart it. Painful.
Hey @delanick ,
Can you try installing NativeScript CLI's next version and see if you'll still face the same issue? We have applied some fixes for this particular case. In order to install it, just execute:
npm install -g nativescript@next
Please note that next versions are development versions, so you may face some unexpected issues.
Hey @rosen-vladimirov thanks so much for the tip. Will try it. How do I use it with Sidekick? Will it affect my current projects? Sorry, I'm an amateur so not clued up on how to make the NEXT version work with my Sidekick version.
Hey @delanick ,
When you install this CLI version globally, you just need to restart Sidekick and it will start using it. The change affects the build and run process of your applications, not the applications code. At any time you can get back to the official CLI version by executing npm install -g nativescript@latest
@rosen-vladimirov I'll check it out, thanks a ton! Hoping it sorts the issue out as I have many problems I'm experiencing with Sidekick currently. Really struggling with errors that were never there before. Will advise if it helps. Thanks so much!
@rosen-vladimirov Could you give me an indication of what was fixed in the next version?
Hey @delanick ,
In CLI's next version we have updated the version of the ios-device-lib dependency. Here's its changelog: https://github.com/telerik/ios-device-lib/releases/tag/v0.4.11
In fact next version of CLI is built from its master branch, i.e. all commits here are available in the next version of CLI.
@rosen-vladimirov Thanks so much! Will let you know how my switch goes :)
Hey @rosen-vladimirov I've looked at the change log, and have to ask: Can I now use Sidekick (with NS next obviously) and connect my devices with Wifi instead of only via USB? Pleeease tell me that's possible, so sick of cables! How would I connect them? If they're on the same wifi, then what do I do?
Hey @rosen-vladimirov it removed the crashes I was experiencing, but I have new issues now. When saving files during debugging, it doesn't LiveSync and gives an error regarding the copying of one of my icon images. See below:
[18-05-19 17:45:57.270] (CLI) cp: copyFileSync: could not write to dest file (code=EACCES):/Users/nickdelahunt/Documents/OneDrive/wigital/Mobile apps/MobiWasSA/Project FIles/MobiWash/MobiWashSA/platforms/android/app/src/main/assets/app/media/menu_18pt_1x.png
and
[18-05-19 17:45:57.277] Error detected during LiveSync on 52108bf447e0c3ad for /Users/nickdelahunt/Documents/OneDrive/wigital/Mobile apps/MobiWasSA/Project FIles/MobiWash/MobiWashSA. Error: cp: copyFileSync: could not write to dest file (code=EACCES):/Users/nickdelahunt/Documents/OneDrive/wigital/Mobile apps/MobiWasSA/Project FIles/MobiWash/MobiWashSA/platforms/android/app/src/main/assets/app/media/menu_18pt_1x.png
@rosen-vladimirov Getting the MaxListenersExceededWarning error all the time now. Not sure what's going on. Using the @next version.
Any update on this? I am getting this MaxListenersExceededWarning error also.
I think it must be a bug because it has happened just after creating a new app on SideKick with very little going on (a single RadListView on a home page--same code that is working elsewhere). On iOS, using the latest stuff (CLI 5.1.0)
@NL33, can you please share the complete Sidekick logs so we can investigate this further? You can access them by following the steps outlined in Access the NativeScript Sidekick logs. Additionally, it would help if you can share more information about your environment:
- Are you running Sidekick on Windows or macOS?
- Are you deploying the app on a single device or on several? If you are on macOS, are you deploying to the Xcode simulator?
It would be great if you can open a new issue and directly provide the logs and additional information there, because the problem reported here is quite old and we believe it to be resolved. Thank you!
Hi. I have opened a new issue with the details requested. The issue is #325