"Unexpected transport error from import worker"

Nobody is getting these?

There is no stack trace, nothing, I can’t believe why editor developers leave error logs like this, who is it helping?

They are always spamming the console like crazy, in every project, unity 6000.0.40, or previous ones.
There can be hundreds of these literally. They are present for all our team members, yet I dont really see any posts on this issue.

They are very random and not sure whats the repro steps, thats why its not a bug report yet.
Maybe somebody figured this out?

havent seen it myself

As usual, try deleting the Library folder to see if that makes it go away. “End of file” could indicate a corrupt file, possibly an artifact in the Library.

Since you work in a team, ensure everyone is using the exact same Unity version down to the patch level (6000.0.40f1). Various issues can arise if devs on a team don’t give any consideration to versioning and everyone updating at the same time, including data corruption.

Although the details vary, there are several mentions of this kind of error.

So only way is to basically keep deleting the Library :slight_smile: because we delete library regularly due to other unity issues, but this error keeps happening.

We all use the same unity version with proper version controlling, so nothing like bad version gets through.

Also yes there are topics for this kind of error, but many of them mention like “its fixed in 6000.0.22”, while clearly it is not :slight_smile:
There is even issue tracker for this: Unity Issue Tracker - "Unexpected transport error from import worker 0" error is thrown when importing an asset marked as fixed…

Are you using some kind of cloud file sharing like one drive or google drive? Those types of things generally won’t work in Unity.

What are these?

I’m guessing all of these are related, and something keeps bonkering your Library or even project assets.

Try disabling parallel imports for a while since any custom asset importer must take the necessary steps to be multithreading compatible (outlined in the manual) and I’m guessing that many of the store asset or custom importers don’t concern themselves with that.

I’m also consistently peeving about proper use of the AssetDatabase (primarily: don’t Refresh, use ImportAsset; don’t SaveAssets, use SaveAssetIfDirty). Usually it’s just a matter of performance and playing nice with your users but occassionally it could also corrupt assets.

For instance you cannot use ADB methods in static ctors, InitializeOnLoad methods and all but one AssetPostprocessor method (OnPostprocessAllAssets is where you can use it). Unity started logging these as errors in Unity 6 though but perhaps not all of them.

One of the issues was this (the corrupt file from VFX asset)

The stuck unity processes is still an issue.

is this only for test to check if this may be causing the issue? How can we investigate what is causing it even if errors stop after this? As we need the parallel imports for real development, otherwise it will be extremely slow I presume.

yes we do use these, mainly

EditorUtility.SetDirty(this);
AssetDatabase.SaveAssetIfDirty(this);

only from within AssetPostprocessor.OnPostprocessAllAssets() though.

Then we use

AssetDatabase.FindAssets
AssetDatabase.GUIDToAssetPath
AssetDatabase.LoadAssetAtPath

from [InitializeOnLoadMethod] (doesnt log any error here).

Our aim was to go over all the scriptable objects after each code recompile, or project startup. Don’t know of any alternative to InitializeOnLoadMethod unfortunately.

No, its only git.

Yes for testing. If the issue goes away, check how much your project actually benefits from parallel imports in everyday use. Often its negligible. And then you should inspect all asset importers. The manual mentions the caveats I think.

I’m not sure if InitializeOnLoadMethod isn’t just fine. But it’s easy to bypass this by wrapping the code inside into:

EditorApplication.delayCall += () =>
{
    // the original code goes here
}

This delays execution until after the first editor update. The callback doesn’t need to be unregistered, it’s automatically removed every time a delayCall gets invoked.