Invalid Asset Bundle and downloading failed (connection refused)


Am following up the tutorial about asset bundles trying to understand the mechanics of this feature, [AssetBundles and AssetBundleManager][1] with Unity version 5.5.0f3 in Win10.

For the Example 3 VariantLoader, here bundles are built to be loaded from the server.
One needs to execute the Local AssetBundle Server, which apparently works (can’t tell for sure though) to properly load the bundle.

Quoting from the tutorial doc

This local server should run
seamlessly, but, as with any network
communication, the local server will
have the same restrictions as any
network communication and may be
subject to permissions requirements,
firewalls, and other limitations. Be
aware that the Local AssetBundle
Server is enabling a Local AssetBundle
Server that is set to the default IP
Address and Port, which is usually

My ip is, as expected, around the range of addresses 192.168.xx.xx.
and I only get this error:

Failed downloading bundle Windows from
Failed to connect to
port 7888: Connection refused

I haven’t done any change in the code, but am aware this example might be deprecated and contain errors.

On my first attempt of fixing it, I tried adding the application and port to the windows firewall exceptions but it had no difference, I kept getting same error.

pinging the address above works, but when specifying the port (with the help of the [PSTools] [2]) the connection is refused.
I probably have missing information on how to properly open the port in Win10, help appreciated.

Next, I set up the local server on my machine and copied the bundle to the appropriate path (wwwroot). I changed the code in BuildScript and removed the port to test.
Basically the line

downloadURL = "http://"+localIP+ ":7888/";

To this line

    downloadURL = "http://"+localIP+ "/";

With some progress, apparently the manifest is loaded but it stops complaining with an invalid bundle.

[AssetBundleManager] Loading Asset Bundle Manifest: Windows
Windows is not a valid asset bundle.

I have trying copying the bundle with different method: GUI, xcopy all gave me same result. Is there a missing step? Maybe removing the port has this consequence (that would be super weird though)??

The last weird thing happening in the Editor (not sure if related), once I select the Local AssetBundle Server, the selection becomes grayed out. I can’t tell if there is an error or the server is really executing properly.
Should I expect the AssetBundleServer.exe running in the task manager?

It would be great if someone can clarify the server part of the tutorial and how is expected to be set up.
Thanks in advance.

[EDIT]: how can I recompile the AssetBundleServer.exe, I couldn’t update by building the solution containing the code :S.

[EDIT 2] apparently the grayed out area, is due to missing try catch in the AssetBundle manager, by adding those lines the area doesn’t gray out anymore, if the server is working properly I don’t know yet
[2]: PsPing - Sysinternals | Microsoft Learn

I set up a remote server and everything worked as a charm.
This is a problem between Win10 and Unity , I hope someone can have more help about to fix it. It is really necessary to my test to have the local server working.

same error as @Desoxi. Somebody please asssist… .

On Windows 10, I’ve fixed this issue by making this change in LaunchAssetBundleServer.cs:


ProcessStartInfo startInfo = new ProcessStartInfo( pathToAssetServer ); //ExecuteInternalMono.GetProfileStartInfoForMono(MonoInstallationFinder.GetMonoInstallation("MonoBleedingEdge"), GetMonoProfileVersion(), pathToAssetServer, args, true);
startInfo.WorkingDirectory = assetBundlesDirectory;
startInfo.Arguments = args;
startInfo.UseShellExecute = true;
startInfo.Verb = "runas";

Process launchProcess = Process.Start(startInfo);