{"action":"created","issue":{"url":"https://api.github.com/repos/google/cups-connector/issues/200","repository_url":"https://api.github.com/repos/google/cups-connector","labels_url":"https://api.github.com/repos/google/cups-connector/issues/200/labels{/name}","comments_url":"https://api.github.com/repos/google/cups-connector/issues/200/comments","events_url":"https://api.github.com/repos/google/cups-connector/issues/200/events","html_url":"https://github.com/google/cups-connector/issues/200","id":139647555,"number":200,"title":"Local printers keep disappearing","user":{"login":"kylemacfarlane","id":99594,"avatar_url":"https://avatars.githubusercontent.com/u/99594?v=3","gravatar_id":"","url":"https://api.github.com/users/kylemacfarlane","html_url":"https://github.com/kylemacfarlane","followers_url":"https://api.github.com/users/kylemacfarlane/followers","following_url":"https://api.github.com/users/kylemacfarlane/following{/other_user}","gists_url":"https://api.github.com/users/kylemacfarlane/gists{/gist_id}","starred_url":"https://api.github.com/users/kylemacfarlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylemacfarlane/subscriptions","organizations_url":"https://api.github.com/users/kylemacfarlane/orgs","repos_url":"https://api.github.com/users/kylemacfarlane/repos","events_url":"https://api.github.com/users/kylemacfarlane/events{/privacy}","received_events_url":"https://api.github.com/users/kylemacfarlane/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-03-09T17:30:07Z","updated_at":"2016-03-10T01:05:13Z","closed_at":null,"body":"I have two printers shared via a Raspberry Pi print server. They are always available through cloud print but the local print versions keep disappearing on Windows and Chrome OS (so far Android has always seen them but that might just be luck). Sometimes they are only gone for a minute or two but other times they are gone until I restart gcp or avahi-daemon (restarting either will fix it).\r\n\r\nI have logging set to debug level and when the local printers disappear it seems like the connector stops receiving the privet requests to /capabilities, /info, etc.\r\n\r\nSo I installed Bonjour Browser on Android and on Windows and Chrome OS I installed this Chrome app: https://chrome.google.com/webstore/detail/mdns-browser/kipighjpklofchgbdgclfaoccdlghidp Even when the local printers aren't appearing in Chrome both these browsers can find the printers on privet.\r\n\r\nRestarting the gcp service seems to be a 100% fix to make the local printers instantly reappear so presumably whatever it does on startup needs to be done more frequently.\r\n\r\n(Also Chrome on iOS can never see the local printers but I assume that's just an iOS limitation.)"},"comment":{"url":"https://api.github.com/repos/google/cups-connector/issues/comments/194599809","html_url":"https://github.com/google/cups-connector/issues/200#issuecomment-194599809","issue_url":"https://api.github.com/repos/google/cups-connector/issues/200","id":194599809,"user":{"login":"kylemacfarlane","id":99594,"avatar_url":"https://avatars.githubusercontent.com/u/99594?v=3","gravatar_id":"","url":"https://api.github.com/users/kylemacfarlane","html_url":"https://github.com/kylemacfarlane","followers_url":"https://api.github.com/users/kylemacfarlane/followers","following_url":"https://api.github.com/users/kylemacfarlane/following{/other_user}","gists_url":"https://api.github.com/users/kylemacfarlane/gists{/gist_id}","starred_url":"https://api.github.com/users/kylemacfarlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylemacfarlane/subscriptions","organizations_url":"https://api.github.com/users/kylemacfarlane/orgs","repos_url":"https://api.github.com/users/kylemacfarlane/repos","events_url":"https://api.github.com/users/kylemacfarlane/events{/privacy}","received_events_url":"https://api.github.com/users/kylemacfarlane/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T01:05:12Z","updated_at":"2016-03-10T01:05:12Z","body":"Using Wireshark this looks more and more like a Chrome bug but it should be easily repeatable so I wonder if someone else can check?\r\n\r\nWhat I'm seeing is that Chrome sends privet requests before mDNS responses are received. So if a local printer is in the mDNS cache it will work fine but if the cache has expired then Chrome will never query the printer for privet info.\r\n\r\n1. Use some kind of network monitoring tool.\r\n\r\n2. Open a print dialog in Chrome and then go to change printers and select your locally shared printer. This should fill your cache and get you in the same starting position.\r\n\r\n3. But don't print anything. Just close that print dialog and refresh the page.\r\n\r\n4. Open another print dialog. You should see the following traffic:\r\n4.1. One or more mDNS requests\r\n4.2. A HTTP privet request\r\n4.3. A HTTP privet response\r\n4.4. One or more mDNS responses\r\n\r\n5. Again don't print anything. Close the dialog, refresh the page, and wait ten or so minutes for Chrome to clear it's cache (clearing the main net-internals DNS cache doesn't seem to affect the mDNS cache).\r\n\r\n6. Open a new print dialog. You know the cache is empty when you see the loading spinner next to your printer and no printer options below it. You should see the following traffic:\r\n6.1. One or more mDNS requests\r\n6.2. No HTTP requests (the mDNS cache is presumably empty after step 5).\r\n6.3. One or more mDNS responses\r\n\r\n7. Click change printer. You should see the following traffic:\r\n7.1. One or more mDNS requests\r\n7.2. A HTTP privet request (the mDNS cache is presumably primed after step 6.3)\r\n7.3. A HTTP privet response\r\n7.4. One or more mDNS responses\r\n\r\n\r\nIf the above is a real bug then surely it would affect everyone using GCP 2.0? However I also noticed that the mDNS privet responses include some cache settings so maybe they are breaking Chrome?"}}