{"action":"created","issue":{"url":"https://api.github.com/repos/atom/apm/issues/220","labels_url":"https://api.github.com/repos/atom/apm/issues/220/labels{/name}","comments_url":"https://api.github.com/repos/atom/apm/issues/220/comments","events_url":"https://api.github.com/repos/atom/apm/issues/220/events","html_url":"https://github.com/atom/apm/issues/220","id":49823423,"number":220,"title":"Native module (chokidar) with APM: Assertion failed: (handle->InternalFieldCount() > 0)","user":{"login":"bpasero","id":900690,"avatar_url":"https://avatars.githubusercontent.com/u/900690?v=3","gravatar_id":"","url":"https://api.github.com/users/bpasero","html_url":"https://github.com/bpasero","followers_url":"https://api.github.com/users/bpasero/followers","following_url":"https://api.github.com/users/bpasero/following{/other_user}","gists_url":"https://api.github.com/users/bpasero/gists{/gist_id}","starred_url":"https://api.github.com/users/bpasero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpasero/subscriptions","organizations_url":"https://api.github.com/users/bpasero/orgs","repos_url":"https://api.github.com/users/bpasero/repos","events_url":"https://api.github.com/users/bpasero/events{/privacy}","received_events_url":"https://api.github.com/users/bpasero/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-11-23T12:13:27Z","updated_at":"2015-01-14T22:40:48Z","closed_at":null,"body":"I am not sure if this is the right place to file this issue, but I am starting here because I dont see the issue when using vanilla npm.\r\n\r\nSetup:\r\n- Atom Shell 0.19.4\r\n- APM --version\r\n   > apm  0.111.0\r\n   > npm  1.4.4\r\n   > node 0.10.33\r\n   > python 2.7.6\r\n   > git 2.1.2\r\n- chokidar 0.11.1\r\n\r\nTo reproduce:\r\n- unzip atom shell 0.19.4\r\n- create a bare atom shell application as outlined at https://github.com/atom/atom-shell/blob/master/docs/tutorial/quick-start.md\r\n- add a dependency to chokidar from the package.json\r\n\r\n```\r\n{\r\n  \"name\"    : \"your-app\",\r\n  \"version\" : \"0.1.0\",\r\n  \"main\"    : \"main.js\",\r\n  \"dependencies\": {\r\n  \t\"chokidar\": \"*\"\r\n  }\r\n}\r\n```\r\n- use chokidar from main.js\r\n\r\n```\r\nvar app = require('app');  // Module to control application life.\r\nvar BrowserWindow = require('browser-window');  // Module to create native browser window.\r\n\r\nvar chokidar = require('chokidar');\r\nvar watcher = chokidar.watch(\"~/\", { persistent: true, usePolling: false });\r\nwatcher.on(\"all\", function(type, path) {\r\n  console.log(type, path);\r\n});\r\n\r\n// Report crashes to our server.\r\nrequire('crash-reporter').start();\r\n\r\n// Keep a global reference of the window object, if you don't, the window will\r\n// be closed automatically when the javascript object is GCed.\r\nvar mainWindow = null;\r\n\r\n// Quit when all windows are closed.\r\napp.on('window-all-closed', function() {\r\n  if (process.platform != 'darwin')\r\n    app.quit();\r\n});\r\n\r\n// This method will be called when atom-shell has done everything\r\n// initialization and ready for creating browser windows.\r\napp.on('ready', function() {\r\n  // Create the browser window.\r\n  mainWindow = new BrowserWindow({width: 800, height: 600});\r\n\r\n  // and load the index.html of the app.\r\n  mainWindow.loadUrl('file://' + __dirname + '/index.html');\r\n\r\n  // Emitted when the window is closed.\r\n  mainWindow.on('closed', function() {\r\n    // Dereference the window object, usually you would store windows\r\n    // in an array if your app supports multi windows, this is the time\r\n    // when you should delete the corresponding element.\r\n    mainWindow = null;\r\n  });\r\n});\r\n```\r\n\r\n- install chokidar using apm: \"apm install .\"\r\n- run our app\r\n\r\nAs soon as you launch the app, you will find this on the command line:\r\n\r\n➜  MacOS  ./Atom ~/Desktop/watchapp\r\nAssertion failed: (handle->InternalFieldCount() > 0), function Wrap, file /Users/bpasero/.atom/.node-gyp/.node-gyp/0.19.4/src/node_object_wrap.h, line 77.\r\n[1]    4859 abort      ./Atom ~/Desktop/watchapp\r\n\r\nI am able to use chokidar with its native dependency (fsevents) on both node.js 0.10 and 0.11, but it fails when used from Atom. \r\n\r\nAny pointers to how to further debug this issue is welcomed.\r\n\r\nI uploaded my full Atom app to reproduce without following the steps to here: https://drive.google.com/file/d/0B3qppHphwBz0eEp0UmF0QnVUeVU/view?usp=sharing"},"comment":{"url":"https://api.github.com/repos/atom/apm/issues/comments/70007224","html_url":"https://github.com/atom/apm/issues/220#issuecomment-70007224","issue_url":"https://api.github.com/repos/atom/apm/issues/220","id":70007224,"user":{"login":"kevinsawicki","id":671378,"avatar_url":"https://avatars.githubusercontent.com/u/671378?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinsawicki","html_url":"https://github.com/kevinsawicki","followers_url":"https://api.github.com/users/kevinsawicki/followers","following_url":"https://api.github.com/users/kevinsawicki/following{/other_user}","gists_url":"https://api.github.com/users/kevinsawicki/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinsawicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinsawicki/subscriptions","organizations_url":"https://api.github.com/users/kevinsawicki/orgs","repos_url":"https://api.github.com/users/kevinsawicki/repos","events_url":"https://api.github.com/users/kevinsawicki/events{/privacy}","received_events_url":"https://api.github.com/users/kevinsawicki/received_events","type":"User","site_admin":true},"created_at":"2015-01-14T22:40:48Z","updated_at":"2015-01-14T22:40:48Z","body":"@bpasero are you still experiencing this issue?"}}