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

bug: Client can't start under Linux Mint #2358

Closed
1 task done
Firemaster640 opened this issue Jul 30, 2024 · 11 comments · Fixed by #2366
Closed
1 task done

bug: Client can't start under Linux Mint #2358

Firemaster640 opened this issue Jul 30, 2024 · 11 comments · Fixed by #2366
Labels
bug Something isn't working needs verification Pending confirmation that the bug exists by another user.

Comments

@Firemaster640
Copy link

Description

I have downloaded version 0.8.0 for the Linux version. The server started without any problems. However, the client did not. If it helps, I use the following Linux version:

NAME="Linux Mint"
VERSION="21.1 (Vera)"
ID=linuxmint
ID_LIKE="ubuntu debian"
PRETTY_NAME="Linux Mint 21.1"
VERSION_ID="21.1"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.linuxmint.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=vera
UBUNTU_CODENAME=jammy

I don't know if something extra needs to be installed to run it on Linux, if that would be necessary please let me know. Thanks :)
(Install the Repositorys [libSDL2, libopenal]] doesn't help]

Steps to Reproduce

  1. Download Version 0.8.0 for Linux
  2. Start Server
  3. Client can't Start

Version with bug

0.8.0

Last version that worked well

0.8.0

Affected platforms

Linux

Did you find any workaround?

No response

Relevant log output

2024-07-30 20:01:50.433 [Error] Received unhandled exception from : Unable to send custom ping payload. Run program under privileged user account or grant cap_net_raw capability using setcap(8).

--------------------------------------------------------------------------------
2024-07-30 20:01:50.450 [Error] PlatformNotSupportedException: Unable to send custom ping payload. Run program under privileged user account or grant cap_net_raw capability using setcap(8).
    Stack:    at System.Net.NetworkInformation.Ping.GetPingProcess(IPAddress address, Byte[] buffer, Int32 timeout, PingOptions options)
   at System.Net.NetworkInformation.Ping.SendWithPingUtility(IPAddress address, Byte[] buffer, Int32 timeout, PingOptions options)
   at System.Net.NetworkInformation.Ping.SendPingCore(IPAddress address, Byte[] buffer, Int32 timeout, PingOptions options)
   at System.Net.NetworkInformation.Ping.Send(IPAddress address, Int32 timeout, Byte[] buffer, PingOptions options)
   at System.Net.NetworkInformation.Ping.Send(String hostNameOrAddress, Int32 timeout, Byte[] buffer, PingOptions options)
   at Intersect.Network.ClientNetwork.get_Ping() in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Network/ClientNetwork.cs:line 64
   at Intersect.Client.MonoGame.Network.MonoSocket.get_Ping() in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client/MonoGame/Network/MonoSocket.cs:line 110
   at Intersect.Client.Networking.Network.get_Ping() in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client/Networking/Network.cs:line 23
   at Intersect.Client.Interface.Debugging.DebugWindow.<>c.<CreateTableDebugStats>b__34_1() in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client/Interface/Debugging/DebugWindow.cs:line 162
   at Intersect.Client.Framework.Gwen.Control.Data.ValueTableCellDataProvider`1.<>c__DisplayClass0_1.<.ctor>b__3(Task _) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Control/Data/ValueTableCellDataProvider`1.cs:line 12
   at System.Threading.Tasks.ContinuationResultTaskFromTask`1.InnerInvoke()
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at Intersect.Async.AsyncValueGenerator`1.DoLoop() in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect (Core)/Async/AsyncValueGenerator`1.cs:line 25
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()


--------------------------------------------------------------------------------

Duplicate Bug Check

  • This bug report is not a duplicate to the best of my knowledge.
@Firemaster640 Firemaster640 added bug Something isn't working needs verification Pending confirmation that the bug exists by another user. labels Jul 30, 2024
@WeylonSantana
Copy link
Contributor

Have you tried giving all privileges to the client/editor? In the error says something similar to "try to give privileges or run cap_net_raw" something like that, it is normal for the client/editor to be blocked because they try to access the internet

@Firemaster640
Copy link
Author

Yes. I try:
Run as Owner-Groops:

  • sudo
  • adm
  • user (is the admin)
    And i change the Acess from only Read to Read and Write - Test the Groops again.
    This doesn´t help.

Then I try, to start from the Terminal with sudo - This doesen't help too. :(

But i don't find a "cap_net_raw" File to start, i think this is a function(?)

@dhmello
Copy link
Contributor

dhmello commented Jul 31, 2024

Try execute this command:
sudo setcap cap_net_raw=eip /opt/microsoft/powershell/7/pwsh # real binary, not symlink

@Firemaster640
Copy link
Author

Try execute this command: sudo setcap cap_net_raw=eip /opt/microsoft/powershell/7/pwsh # real binary, not symlink

The console says the following:
Failed to set capabilities on file `/opt/microsoft/powershell/7/pwsh' (No such file or directory)
The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file

@dhmello
Copy link
Contributor

dhmello commented Jul 31, 2024

Solution 1: Run as root user
Open a terminal.
Run the program as root:

sudo ./program_name
Note: Replace program_name with the name of your executable.

Solution 2: Use setcap
Open a terminal.
Install setcap if it is not installed:
sudo apt-get install libcap2-bin
Grant the necessary capability to the executable:
sudo setcap cap_net_raw+ep /path/to/executable
Note: Replace /path/to/executable with the full path to your executable.

Check if setcap is installed:

dpkg -l | grep libcap2-bin
If the above command returns nothing, install it with the previously mentioned command.

Grant the capability:
Suppose your executable is located at /usr/local/bin/my_program. The command would be:

sudo setcap cap_net_raw+ep /usr/local/bin/my_program

Verify the granted capabilities:
To confirm if the capabilities were applied correctly, you can use the command:

getcap /usr/local/bin/my_program
This should return something like:

/usr/local/bin/my_program = cap_net_raw+ep
After following one of these methods, try running the program again.

@Firemaster640
Copy link
Author

Solution 1 - Console:

Resource: Intersect.Client.Resources.libopenal.so.1
Resource: Intersect.Client.Resources.libSDL2-2.0.so.0
Resource: Intersect.Client.Resources.openal32.dll
Resource: Intersect.Client.Resources.MonoGame.Framework.dll.config
Resource: Intersect.Client.Resources.MonoGame.Framework.dll
2024-07-31 14:54:34.983 [Error] NullReferenceException: Object reference not set to an instance of an object.
    Stack:    at Intersect.Client.Framework.Gwen.Skin.Texturing.Bordered.Equals(Bordered other) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Skin/Texturing/Bordered.cs:line 171
   at Intersect.Client.Framework.Gwen.Skin.Texturing.Bordered.op_Inequality(Bordered lhs, Bordered rhs) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Skin/Texturing/Bordered.cs:line 186
   at Intersect.Client.Framework.Gwen.Skin.Intersect2021.DrawWindow(Base control, Int32 topHeight, Boolean inFocus) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Skin/Intersect2021.cs:line 196
   at Intersect.Client.Framework.Gwen.Control.WindowControl.Render(Base skin) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Control/WindowControl.cs:line 326
   at Intersect.Client.Interface.Window.Render(Base skin) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client/Interface/Window.cs:line 32
   at Intersect.Client.Framework.Gwen.Control.Base.RenderRecursive(Base skin, Rectangle clipRect) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Control/Base.cs:line 2013
   at Intersect.Client.Framework.Gwen.Control.Base.DoRender(Base skin) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Control/Base.cs:line 1950
   at Intersect.Client.Framework.Gwen.Control.Base.RenderRecursive(Base skin, Rectangle clipRect) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Control/Base.cs:line 2026
   at Intersect.Client.Framework.Gwen.Control.Base.DoRender(Base skin) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Control/Base.cs:line 1950
   at Intersect.Client.Framework.Gwen.Control.Canvas.RenderCanvas() in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Control/Canvas.cs:line 148
   at Intersect.Client.Interface.Menu.MenuGuiBase.Draw() in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client/Interface/Menu/MenuGuiBase.cs:line 66
   at Intersect.Client.Interface.Interface.DrawGui() in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client/Interface/Interface.cs:line 201
   at Intersect.Client.Core.Graphics.Render(TimeSpan deltaTime, TimeSpan _) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client/Core/Graphics.cs:line 585
   at Intersect.Client.MonoGame.IntersectGame.Draw(GameTime gameTime) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client/MonoGame/IntersectGame.cs:line 326
   at Microsoft.Xna.Framework.Game.DoDraw(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop()
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
   at Microsoft.Xna.Framework.Game.Run()
   at Intersect.Client.MonoGame.IntersectGame.MonoGameRunner.Start(IClientContext context, Action postStartupAction) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client/MonoGame/IntersectGame.cs:line 562
   at Intersect.Client.Core.ClientContext.InternalStart() in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client/Core/ClientContext.cs:line 41
   at Intersect.Core.ApplicationContext`2.Start(Boolean lockUntilShutdown) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect (Core)/Core/ApplicationContext`2.cs:line 231

Solution 2 - Console:

Resource: Intersect.Client.Resources.libopenal.so.1
Resource: Intersect.Client.Resources.libSDL2-2.0.so.0
Resource: Intersect.Client.Resources.openal32.dll
Resource: Intersect.Client.Resources.MonoGame.Framework.dll.config
Resource: Intersect.Client.Resources.MonoGame.Framework.dll
2024-07-31 14:53:28.766 [Error] NullReferenceException: Object reference not set to an instance of an object.
    Stack:    at Intersect.Client.Framework.Gwen.Skin.Texturing.Bordered.Equals(Bordered other) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Skin/Texturing/Bordered.cs:line 171
   at Intersect.Client.Framework.Gwen.Skin.Texturing.Bordered.op_Inequality(Bordered lhs, Bordered rhs) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Skin/Texturing/Bordered.cs:line 186
   at Intersect.Client.Framework.Gwen.Skin.Intersect2021.DrawWindow(Base control, Int32 topHeight, Boolean inFocus) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Skin/Intersect2021.cs:line 196
   at Intersect.Client.Framework.Gwen.Control.WindowControl.Render(Base skin) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Control/WindowControl.cs:line 326
   at Intersect.Client.Interface.Window.Render(Base skin) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client/Interface/Window.cs:line 32
   at Intersect.Client.Framework.Gwen.Control.Base.RenderRecursive(Base skin, Rectangle clipRect) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Control/Base.cs:line 2013
   at Intersect.Client.Framework.Gwen.Control.Base.DoRender(Base skin) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Control/Base.cs:line 1950
   at Intersect.Client.Framework.Gwen.Control.Base.RenderRecursive(Base skin, Rectangle clipRect) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Control/Base.cs:line 2026
   at Intersect.Client.Framework.Gwen.Control.Base.DoRender(Base skin) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Control/Base.cs:line 1950
   at Intersect.Client.Framework.Gwen.Control.Canvas.RenderCanvas() in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client.Framework/Gwen/Control/Canvas.cs:line 148
   at Intersect.Client.Interface.Menu.MenuGuiBase.Draw() in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client/Interface/Menu/MenuGuiBase.cs:line 66
   at Intersect.Client.Interface.Interface.DrawGui() in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client/Interface/Interface.cs:line 201
   at Intersect.Client.Core.Graphics.Render(TimeSpan deltaTime, TimeSpan _) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client/Core/Graphics.cs:line 585
   at Intersect.Client.MonoGame.IntersectGame.Draw(GameTime gameTime) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client/MonoGame/IntersectGame.cs:line 326
   at Microsoft.Xna.Framework.Game.DoDraw(GameTime gameTime)
   at Microsoft.Xna.Framework.Game.Tick()
   at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop()
   at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
   at Microsoft.Xna.Framework.Game.Run()
   at Intersect.Client.MonoGame.IntersectGame.MonoGameRunner.Start(IClientContext context, Action postStartupAction) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client/MonoGame/IntersectGame.cs:line 562
   at Intersect.Client.Core.ClientContext.InternalStart() in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect.Client/Core/ClientContext.cs:line 41
   at Intersect.Core.ApplicationContext`2.Start(Boolean lockUntilShutdown) in /home/runner/work/Intersect-Engine/Intersect-Engine/Intersect (Core)/Core/ApplicationContext`2.cs:line 231

-----------------------
Because of the new error name ‘NullReferenceException: Object reference not set to an instance of an object.’ I only found out through Google that it is a known error code for Linux and Net Framework. But no solution was named that would help. :(

@WeylonSantana
Copy link
Contributor

Nop, nop, that's is a better error, is saying something about the interface is null, then fixing that maybe everything can run normally in your system.

Are u testing the full version? With all assets? Maybe is something missing in files.

@Firemaster640
Copy link
Author

Yes I run the Version:
intersect-linux-x64-full-0.8.0-beta.210+build.a4d523e70068f1942b659bc29ee764431b00ab20.zip

:(

@WeylonSantana
Copy link
Contributor

WeylonSantana commented Jul 31, 2024

I experienced this error a little while ago, actually crashing on this line, but I don't remember what I did to fix it, but it's related to the gui folder, it has to do with the skin file which has the name "Intersect2021" or ""intersect-2021 ", even though it was not supposed to give an error in the full version, I'll download the Windows version to test

@lodicolo
Copy link
Member

lodicolo commented Aug 2, 2024

Not sure why the original issue mentioned wasn't seen sooner, but this is apparently an intentionally breaking change by Microsoft:

https://learn.microsoft.com/en-us/dotnet/core/compatibility/networking/7.0/ping-custom-payload-linux

Since I am able to reproduce it consistently on my machine (Arch, kernel 6.10) I created a fix that does not require setcap, and opened PR #2366 for it.

@dhmello
Copy link
Contributor

dhmello commented Aug 7, 2024

@lodicolo tested here, and that error persist..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs verification Pending confirmation that the bug exists by another user.
Projects
None yet
4 participants