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

packaged exe main script crashing without internet access #27

Open
JackGit3 opened this issue Feb 11, 2021 · 3 comments
Open

packaged exe main script crashing without internet access #27

JackGit3 opened this issue Feb 11, 2021 · 3 comments
Labels
awaiting replication bug Something isn't working

Comments

@JackGit3
Copy link

If I run it in the editor with or without internet everything still works just fine. However in the packaged version if I turn off my internet connection then the mainscript crashes every time. Where would be a good starting point for me to dig into this issue or would anyone perhaps know why this might be happening?

@getnamo
Copy link
Owner

getnamo commented Feb 12, 2021

What does the log say? this is where the wrapper script starts, you may want to trace it from there to see where it could be crashing: https://github.com/getnamo/nodejs-ue4/blob/master/Content/Scripts/nodeWrapper.js#L101

@getnamo getnamo added awaiting replication bug Something isn't working labels Feb 12, 2021
@xiaodoudou
Copy link

I have exactly the same issue.
If I shut down my network card the node process doesn't start.

[2021.05.12-15.41.30:574][  0]LogWorld: Bringing up level for play took: 0.001941
[2021.05.12-15.41.30:577][  0]LogTemp: RunScriptStart
[2021.05.12-15.41.30:579][  0]LogTemp: node thread start
[2021.05.12-15.41.30:579][  0]LogTemp: Starting node.exe at C:/Users/{OBFUSCATED}/Plugins/nodejs-ue4/Source/ThirdParty/node with ../../../Content/Scripts/nodeWrapper.js
[2021.05.12-15.41.30:579][  0]LogUMG: Display: Widget Class LiveTime_W_C - Loaded Fast Template.
[2021.05.12-15.41.30:579][  0]LogUMG: Display: Widget Class LiveScore_W_C - Loaded Fast Template.
[2021.05.12-15.41.30:580][  0]LogUMG: Display: Widget Class MainScreen_W_C - Loaded Fast Template.
[2021.05.12-15.41.30:582][  0]SocketIOLog: SocketIO Invalid appears to have lost connection, reconnecting attempt 0 with delay 5000

@xiaodoudou
Copy link

I need a bit of a test and end up binding HTTP to 127.0.0.1 instead. of localhost.

Inside: Plugins/nodejs-ue4/Source/CommandLine/Private/NodeCmd.cpp

-	Socket->Connect(FString::Printf(TEXT("http://localhost:%d"), Port));
+	Socket->Connect(FString::Printf(TEXT("http://127.0.0.1:%d"), Port));

Inside: Plugins/nodejs-ue4/Content/Scripts/nodeWrapper.js

 
-http.listen(k.port, ()=>{
+http.listen({
+	host: '127.0.0.1',
+	port: k.port,
+	exclusive: false,
+	readableAll: true,
+	writableAll: true
+}, ()=>{

Exclusive is default to false, so should be useless, and believe the readable/writable should be too, but we launch our game as admin (Kiosked PC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting replication bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants