{"action":"opened","issue":{"url":"https://api.github.com/repos/cozy/cozy-data-system/issues/227","repository_url":"https://api.github.com/repos/cozy/cozy-data-system","labels_url":"https://api.github.com/repos/cozy/cozy-data-system/issues/227/labels{/name}","comments_url":"https://api.github.com/repos/cozy/cozy-data-system/issues/227/comments","events_url":"https://api.github.com/repos/cozy/cozy-data-system/issues/227/events","html_url":"https://github.com/cozy/cozy-data-system/issues/227","id":150904704,"number":227,"title":"Don't crash when index is not available","user":{"login":"clochix","id":384908,"avatar_url":"https://avatars.githubusercontent.com/u/384908?v=3","gravatar_id":"","url":"https://api.github.com/users/clochix","html_url":"https://github.com/clochix","followers_url":"https://api.github.com/users/clochix/followers","following_url":"https://api.github.com/users/clochix/following{/other_user}","gists_url":"https://api.github.com/users/clochix/gists{/gist_id}","starred_url":"https://api.github.com/users/clochix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clochix/subscriptions","organizations_url":"https://api.github.com/users/clochix/orgs","repos_url":"https://api.github.com/users/clochix/repos","events_url":"https://api.github.com/users/clochix/events{/privacy}","received_events_url":"https://api.github.com/users/clochix/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cozy/cozy-data-system/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-25T15:44:58Z","updated_at":"2016-04-25T15:44:58Z","closed_at":null,"body":"I think we shouldn't prevent the data-system to start when there's a problem with the index, because this makes the whole server unavailable. We should be able to operate without the indexer.\r\n\r\nA user had this issue today: after migrating its server, the owner of the directory of the index files changed, and the data-system was unable to access it, so it keeps crashing at startup:\r\n```\r\n/usr/local/cozy/apps/data-system/node_modules/cozy-data-system/node_modules/cozy-indexer/node_modules/search-index/lib/index.js:42\r\n      SearchIndex.add = searchIndexAdder.add\r\n                                        ^\r\nTypeError: Cannot read property 'add' of null\r\n    at /usr/local/cozy/apps/data-system/node_modules/cozy-data-system/node_modules/cozy-indexer/node_modules/search-index/lib/index.js:42:41\r\n\r\n```\r\n\r\nAnother common issue is that sometime, a dependency of our indexer fails to install (npm problem?) We should display a warning and start the data-system."}}