lwille / node-gphoto2

A Node.js wrapper for libgphoto2
MIT License
298 stars 91 forks source link

Several Nan "'Call' is deprecated" Warnings on Install (Node v8.1) #97

Closed joshbg2k closed 6 years ago

joshbg2k commented 6 years ago

I get several Nan-related warnings when I install this in my Electron project. I seem to have all the main dependencies installed, but some functions aren't working. I've confirmed I'm using Nan 2.9.2. Warnings include:

../src/camera.cc:344:18: warning: 'Call' is deprecated [-Wdeprecated-declarations]
  config_req->cb.Call(argc, argv);
../src/gphoto.cc:206:16: warning: 'Call' is deprecated [-Wdeprecated-declarations]
  list_req->cb.Call(1, argv);

I'm having issues calling getConfig and downloadPicture (possibly more) in an Electron project. Calling them causes the Electron project to lock up and no further errors appear to the logged. Note that takePicture is working fine. I'm not positive that the Nan warnings are related to the function calls failing. Any ideas?

lwille commented 6 years ago

I suspect this might be a threading issue specific to the combination of electron + node-gphoto2.

Did you follow the instructions on using native modules with electron?

The nan warnings are just that: A warning that these methods will be removed in the future.

joshbg2k commented 6 years ago

Thanks, yeah that's exactly what the issue was. I solved shortly after I reported it and would have updated the issue, but I had forgotten about reporting it.