EpicGamesExt / BlenderTools

Blender addons that improve the game development workflow between Blender and Unreal.
https://epicgamesext.github.io/BlenderTools/
MIT License
2.76k stars 49 forks source link

Send to Unreal - "No Unreal connection.." error on "Skeletal asset" and "Physical asset" fields. #564

Closed Epimorphisme closed 1 year ago

Epimorphisme commented 1 year ago

Addon : Send to Unreal version 2.3.0 Steps to Reproduce the Problem : Pipeline > Settings dialog > Path > Get systematically "No Unreal Editor connection..." on "Skeletal asset" and "Physical asset" fields with "Copy reference" parameter in UE.

image

Error Log :

blender_debug_output.txt blender_system_info.txt

OS : Windows 10 Professional (build 19.0.45) Addon Version : Send to Unreal 2.3.0 Blender Version : 3.4.0 Unreal Version : 5.1.1

Details :

First of all a big thank you for this essential add-on.

I get a "No connection unreal editor" error with any project on UE 5.1.1 and on any project on blender even with blank project and the "load factory settings" enable in blender.

Only when i try to set the "Skeletal asset" and "Physical asset" fields, with the "copy reference" in UE.

All other functionalities, export to UE and import run correctly.

I Test with "Send to Unreal" version 2.2.0 and i don't have this error anymore.. and the "skeleton asset" is correctly located when export skeletal mesh with UE skeleton.

Return from the netsh command:

PS > netstat -an|sls 6766

UDP 0.0.0.0:6766 :

PS > netstat -an|sls 9998

TCP 127.0.0.1:9998 0.0.0.0:0 LISTENING TCP 127.0.0.1:9998 0.0.0.0:0 LISTENING

Test with antivirus and firewall disable/enable with correct rules in firewall.

Thanks.

james-baber commented 1 year ago

Hey I tried to repro on my end and seems to work fine. image

I used this unreal project in UE 5.1 https://github.com/EpicGames/BlenderTools/tree/main/tests/test_files/unreal_projects/test01

And the female mannequin here https://github.com/EpicGames/BlenderTools/blob/main/tests/test_files/blender_files/mannequins.blend

Since creating your new project, did you enable remote execution in your project settings?

Epimorphisme commented 1 year ago

Thanks for reply,

I try yours files and got the same error.. only with "Sendto Unreal" version 2.3.0 other versions works fine.

Obviously, the python environment in my unreal is correctly defined (Python plugin is activated and remote execution is enable), according to the "SendtoUnreal" doc. And as I said the others functions are working fine. I can export, import, set path "Mesh folder" etc. Only "Skeletal asset" and "Physical asset" fields won't work..

I forgot to specify that I work on a cloudcomputing service so my machine is hosted on a server and windows is emulated on a type 1 hypervisor.

syt0r commented 1 year ago

I have the same issue, blender 3.2.0, ue 5.0.3, send to unreal 2.3.0, running everything on local machine. Addon can push assets with default settings, but after I set skeleton it says 'No Unreal Editor connection ... can not be validated'

mudboi commented 1 year ago

I think this has something to do with Windows Firewall, I removed UnrealEditor and Blender from the "Allow Apps Through Windows Firewall" list, and reallowed access when the firewall pop up happened after restarting Unreal Editor and using push assets on Blender Send2UE, fixed the issue at least right now.

syt0r commented 1 year ago

Doesn't work for me even with disabled firewal and realtime virus protection in windows security, I'm on win 11 by the way

Epimorphisme commented 1 year ago

After a full réinstallation of windows, unreal and blender, the problem persist for me too. "Push asset" works well in any case, as syt0r said, it's only the "skeletal asset" and "Physical asset" fields in "Export settings" that return an error if we try to set them. (with the python environment correctly set and with necessary plugins enabled and correct firewall rules...)

Knowing that with version 2.2.0 everything works perfectly. I feel like this problem arose with the integration of authentication to the RPC server on 2.2.1 version... I will test with a static auth token using RPC_AUTH_TOKEN environment variable, and we'll see.

best regards.

james-baber commented 1 year ago

Ok so based on some of these comments and this https://github.com/EpicGames/BlenderTools/issues/552

I just want to clarify. This is a UI bug, but isn't effecting the actual Push Asset operation? If this is soley a UI issue then that helps narrow it down a bit for me in interms of reproducing this issue

Epimorphisme commented 1 year ago

I don't think it's just a UI bug, because if i set "Skeletal asset" or "physical asset" paths with the correct référence path on unreal instance, push asset become unusable. It print a "No unreal connection"... And if we clear these two paths Push asset work normally and can export skeletal mesh with a new skeletal asset.

mudboi commented 1 year ago

So the problem persisted even after me messing around with firewall settings, sometimes it would work sometimes it woudn't. It looks like setting a static auth token with RPC_AUTH_TOKEN env variable fixed it for now. Was able to fix the issue with on two seperate machines.

Patters0n commented 1 year ago

I have the same issue! The linked mannequins.blend still throws the error. If I export more than just the Animation, everything works fine. I even tried the "Start RPC Servers" button under Utilities before editing the File Path. The utility seemed to succeed (Blender hangs after clicking when Unreal is closed) but the File Path check still failed.

Send to Unreal 2.3.0 Blender 3.4.1 Unreal 5.1.1

james-baber commented 1 year ago

Hmm ok, maybe this is related to the RPC authentication token added in 2.2.1. I would be interested to know if the problem exists just in 2.3.0 or 2.2.1 as well? (if so, my guess would be that 2.2.0 was the last version that doesn't have this issue)

One thing to try is in windows that might fix this currently is

image

Then click new Environment variables and add a new one

image

And set RPC_AUTH_TOKEN to some static value. Then uninstall the addon from blender, shutdown unreal, restart blender, install the addon, then restart unreal.

If everyone on this issue could give those a try and let me know if they work or not? That will narrow down things a bit since I still can't repro this

syt0r commented 1 year ago

Great, with RPC_AUTH_TOKEN manually defined it works for me

Patters0n commented 1 year ago

Manually setting RPC_AUTH_TOKEN works for me as well! However, I either have to run the Start RPC Server Utility or click Push Assets before the Asset Path is successfully accepted.

Steps: Open Blender, open Unreal, change the Asset Path in Blender -> validation will fail. Run the Start RPC Server Utility, change the Asset Path again -> validation succeeds.

OR

Steps: Open Blender, open Unreal, change the Asset Path in Blender -> validation will fail. Click Push Assets -> validation succeeds and pushing Animation only also succeeds.

Subsequent changes to the Asset Path will successfully validate in either case.

Thanks for all your time and effort James! These tools help a lot and I'm glad you're able to continue supporting them :).

Epimorphisme commented 1 year ago

Work for me as well ! With same steps as Patters0n. With plugins version 2.3.0 and 2.2.1. Yes the last version without this issue is 2.2.0.

james-baber commented 1 year ago

This was fixed in the latest release. Re-open if you are still experiencing issues