Open Bug 1102482 Opened 10 years ago Updated 2 years ago

Failed to start socket in SimpleServiceDiscovery.jsm

Categories

(Toolkit :: General, defect)

All
macOS
defect

Tracking

()

People

(Reporter: jryans, Unassigned)

References

Details

I get frequent errors like failed to start socket: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIUDPSocket.init]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: resource://gre/modules/SimpleServiceDiscovery.jsm :: _search :: line 159" data: no] in the Browser Console.
Can we disable this service if it fails to open the socket or something?
Flags: needinfo?(blassey.bugs)
sure
Flags: needinfo?(blassey.bugs)
Flags: firefox-backlog?
Blocks: 1054959
Hardware: x86 → All
BTW: In my case the problem was that I use Bittorrent Sync and the SSDP port was in use by it according to: sudo lsof -i :1900 Once I quit Bittorrent Sync, I was able to see a Roku in the Send Video to Device list.
(In reply to Matthew N. [:MattN] from comment #3) > BTW: In my case the problem was that I use Bittorrent Sync and the SSDP port > was in use by it according to: > sudo lsof -i :1900 > > Once I quit Bittorrent Sync, I was able to see a Roku in the Send Video to > Device list. Yea, same here. Presumably Bittorrent isn't opening the socket such that it can be shared.
(In reply to Brad Lassey [:blassey] (use needinfo?) from comment #4) > (In reply to Matthew N. [:MattN] from comment #3) > > BTW: In my case the problem was that I use Bittorrent Sync and the SSDP port > > was in use by it according to: > > sudo lsof -i :1900 > > > > Once I quit Bittorrent Sync, I was able to see a Roku in the Send Video to > > Device list. > > Yea, same here. Presumably Bittorrent isn't opening the socket such that it > can be shared. That's likely true, though I don't believe we are either... I think we'd need to set SO_REUSEPORT on the socket to allow multiple listeners on the same port, which is not yet exposed as an option in nsIUDPSocket. Also, I don't think such an option exists on Windows. Of course, it's no help for the root cause of the problem unless BitTorrent also makes a change.
FWIW, I think it's fine to continually try and use the service if the port is in use but the warning should probably be off by default (perhaps behind a debug pref for the module).
Flags: firefox-backlog? → firefox-backlog+
Related, probably something to fix at the same time: 02-20 12:36:21.335 W/GeckoConsole( 2899): [JavaScript Error: "failed to convert to byte array: [Exception... "Component returned failure code: 0x804b0010 (NS_ERROR_OFFLINE) [nsIUDPSocket.send]" nsresult: "0x804b0010 (NS_ERROR_OFFLINE)" location: "JS frame :: resource://gre/modules/SimpleServiceDiscovery.jsm :: _search/< :: line 174" data: no]" {file: "resource://gre/modules/SimpleServiceDiscovery.jsm" line: 176}] This happens at least twice per Robocop test, because as far as the device is concerned it's offline.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.