Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WINDOWS] Electron package DNSServiceRef is not initialized / supportsInterfaceIndexLocalOnly #159

Open
gabrielstuff opened this issue Feb 26, 2016 · 13 comments

Comments

@gabrielstuff
Copy link

The following ticket says that this issue might be related to mdns not electron : electron/electron#4606. So here it is.
After successfully installed mdns module for usage in electron and a perfectly running apps when we package it using electron-packager (https://github.com/maxogden/electron-packager) we are unfortunately not able to zip and ship it for other Windows users.

We tested it on Windows 10 and Windows 7 with exactly the same environnement and same computers as the app is built on.

Dropping the zip anywhere on the computer we build the app on works perfectly (in any folders). Unfortunately giving the zip, unzipping on an other computer running windows 10 gives the following error :

error

Uncaught Exception:
Error: DNSServiceRef is not initialized
  at error (Native)
  at supportsInterfaceIndexLocalOnly
...
@y-lohse
Copy link
Contributor

y-lohse commented Feb 26, 2016

Is the Bonjour SDK for windows installed on that other machine?

@gabrielstuff
Copy link
Author

Yes it is... but it should not be necessary... as the app include it's own lib compiled...

@gabrielstuff
Copy link
Author

We also tried to install a full copy of all the lib and tool necessary to compile it but it does not change anything.

@agnat
Copy link
Owner

agnat commented Feb 26, 2016

Is the Bonjour SDK for windows installed on that other machine?

Yes it is...

Good. It is required.

but it should not be necessary... as the app include it's own lib compiled...

That is probably not true. The Bonjour SDK contains three things:

  1. The header files needed for compilation
  2. The interface DLLs
  3. A system service executable

Even if the electron-packager manages to detect the DLL dependency I don't see how it could detect the dependency on the system service. So, definitely install the SDK. Also, make sure the Bonjour service is actually running. If in doubt reboot after installing the SDK.

Bottom line is: I think it is a dependency issue. Copying the binary should work fine and you are probably really close.

@gabrielstuff
Copy link
Author

Hmmm how would One distribute an app with zeroconf capabilities without asking to install Apple dependencies ? The bonjour mdns services ?
I do but see any differences between the three computers and I'm still not able to run it.

What are the services provided by the Bonjour service exe?

Envoyé rapidement et avec attention depuis un terminal mobile.

Le 26 févr. 2016 à 16:51, David Siegel notifications@github.com a écrit :

Is the Bonjour SDK for windows installed on that other machine?
Yes it is...

Good. It is required.

but it should not be necessary... as the app include it's own lib compiled...

That is probably not true. The Bonjour SDK contains three things:

The header files needed for compilation
The interface DLLs
A system service executable
Even if the electron-packager manages to detect the DLL dependency I don't see how it could detect the dependency on the system service. So, definitely install the SDK. Also, make sure the Bonjour service is actually running. If in doubt reboot after installing the SDK.

Bottom line is: I think it is a dependency issue. Copying the binary should work fine and you are probably really close.


Reply to this email directly or view it on GitHub.

@agnat
Copy link
Owner

agnat commented Feb 26, 2016

how would One distribute an app with zeroconf capabilities without asking to install Apple dependencies ?

I don't know.

Technically, you could ship a Setup.exe that contains both, the SDK and your zip file. First, install the SDK, unzip, reboot... But: I'm not sure if it is legal to redistribute the Bonjour SDK.

I do but see any differences between the three computers and I'm still not able to run it.

Hmm...

What are the services provided by the Bonjour service exe?

The Bonjour service exe provides the bonjour service.

No, seriously: It handles the actual network stuff. Creating a Browser or Advertisement (or any DNSServiceRef) creates a local connection to this system service (daemon). The system service then performs the actual network IO. Since it fails while creating the very first DNSServiceRef I still believe something is fishy with the system service.

@agnat
Copy link
Owner

agnat commented Feb 26, 2016

Random thoughts: Maybe it is a permission problem? Check the system logs? Local firewalls?

@agnat
Copy link
Owner

agnat commented Feb 26, 2016

Also, some other Apple packages used to install the bonjour service (Safari, iTunes). Not sure if that is still the case. Maybe there is an older, incompatible or just different version installed? Just guessing...

@y-lohse
Copy link
Contributor

y-lohse commented Feb 26, 2016

how would One distribute an app with zeroconf capabilities without asking to install Apple dependencies ?

I don't know.

Technically, you could ship a Setup.exe that contains both, the SDK and your zip file. First, install the >SDK, unzip, reboot... But: I'm not sure if it is legal to redistribute the Bonjour SDK.

That's what we did. During the setup, start the BonjourSDK installer.

@black-snow
Copy link

We're shipping the bonjour sdk along with our app, too. Sporadically getting the above error anyway (after manually killing/restarting the bonjour service it worked again) so I switched to using dns-sd by hand i. e. calling dns-sd on the command line.

@fttx
Copy link

fttx commented Apr 16, 2017

@black-snow, @y-lohse did you send to apple both Windows Bundling Agreement and Bonjour Logo License Agreement?

Is there a way to make mdns work on Linux without asking the final user to install dependencies? I currently use electron to build an .AppImage

@black-snow
Copy link

@fttx I'm not sure which applications we sent to Apple but I think we filled out every paper that was present on Apple's page. Took some weeks until we got the go.

I think it depends on the way you plan to distribute you linux app. If you ship via dpkg or alike you should be able to add avahi to the dependencies. Sadly, I'm not an expert in that area.
But you should be able to check the availability within your app and pop a window open to let the user install the required deps. That's pretty much how I did it.
Maybe you could bundle your own avahi deamon that will be used if the system hasn't got one.

@fttx
Copy link

fttx commented May 3, 2017

After reading the whole license agreement and contacting them i learned that if your product isn't an hardware product, and it isn't distributed by hardware medias, you don't need to show the logo anywhere thus only the "Windows bundling agreement" should be enough.

Regarding the DNSServiceRef error i also had a report from an user that solved the problem by restarting the service, and he had the bonjour library already installed from another application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants