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

Unable to deploy Photino.Blazor to Linux (SteamOS)? #79

Closed
sourceit opened this issue Mar 27, 2023 · 14 comments
Closed

Unable to deploy Photino.Blazor to Linux (SteamOS)? #79

sourceit opened this issue Mar 27, 2023 · 14 comments
Assignees
Labels
bug Something isn't working Linux

Comments

@sourceit
Copy link

I am trying to deploy the Photino.Blazor Hello World to SteamOS. The application compiles and runs on windows. I have attempted to publish a linux version with

dotnet publish -c release -r linux-x64 --self-contained -p:PublishSingleFile=True

However when I run this on the Steam Deck I get the following error:

(deck@steamdeck HelloWorld)$ ./HelloWorld
Photino.NET: "Photino".SetTitle(Photino.Blazor App)
Photino.NET: "Photino.Blazor App".SetUseOsDefaultLocation(False)
Photino.NET: "Photino.Blazor App".SetWidth(1000)
Photino.NET: "Photino.Blazor App".SetHeight(900)
Photino.NET: "Photino.Blazor App".SetLeft(0)
Photino.NET: "Photino.Blazor App".SetTop(100)
Photino.NET: "Photino.Blazor App".SetIconFile(favicon.ico)
Photino.NET: "Photino.Blazor App".SetTitle(Photino Hello World)
Photino.NET: "Photino Hello World".Load(app://localhost/)
Photino.NET: "Photino Hello World"***
Unable to load shared library 'Photino.Native' or one of its dependencies. In order to help diagnose loading problems, consider se
tting the LD_DEBUG environment variable: libPhotino.Native: cannot open shared object file: No such file or directory
at PhotinoNET.PhotinoWindow.Photino_ctor(PhotinoNativeParameters& parameters)
at PhotinoNET.PhotinoWindow.b__274_0()
at PhotinoNET.PhotinoWindow.Invoke(Action workItem)
at PhotinoNET.PhotinoWindow.WaitForClose()
Error #0
Photino.NET: "Photino Hello World".OpenAlertWindow(Fatal exception, System.ApplicationException: Native code exception. Error # 0
See inner exception for details.
---> System.DllNotFoundException: Unable to load shared library 'Photino.Native' or one of its dependencies. In order to help dia
gnose loading problems, consider setting the LD_DEBUG environment variable: libPhotino.Native: cannot open shared object file: No
such file or directory
at PhotinoNET.PhotinoWindow.Photino_ctor(PhotinoNativeParameters& parameters)
at PhotinoNET.PhotinoWindow.b__274_0()
at PhotinoNET.PhotinoWindow.Invoke(Action workItem)
at PhotinoNET.PhotinoWindow.WaitForClose()
--- End of inner exception stack trace ---
at PhotinoNET.PhotinoWindow.WaitForClose()
at Photino.Blazor.PhotinoBlazorApp.Run() in C:\temp\delete\photino.Blazor-master\Photino.Blazor\PhotinoBlazorApp.cs:line 50
at HelloWorld.Program.Main(String[] args) in C:\temp\delete\photino.Blazor-master\Samples\HelloWorld\Program.cs:line 32)
Unhandled exception. System.ApplicationException: Native code exception. Error # 0 See inner exception for details.
---> System.DllNotFoundException: Unable to load shared library 'Photino.Native' or one of its dependencies. In order to help dia
gnose loading problems, consider setting the LD_DEBUG environment variable: libPhotino.Native: cannot open shared object file: No
such file or directory
at PhotinoNET.PhotinoWindow.Photino_ctor(PhotinoNativeParameters& parameters)
at PhotinoNET.PhotinoWindow.b__274_0()
at PhotinoNET.PhotinoWindow.Invoke(Action workItem)
at PhotinoNET.PhotinoWindow.WaitForClose()
--- End of inner exception stack trace ---
at PhotinoNET.PhotinoWindow.WaitForClose()
at Photino.Blazor.PhotinoBlazorApp.Run() in C:\temp\delete\photino.Blazor-master\Photino.Blazor\PhotinoBlazorApp.cs:line 50
at HelloWorld.Program.Main(String[] args) in C:\temp\delete\photino.Blazor-master\Samples\HelloWorld\Program.cs:line 32
Aborted (core dumped)
(134)(deck@steamdeck HelloWorld)$

I have copied all files over, including Photino.Native.so.

@sourceit
Copy link
Author

Same issue applies to Photino.HelloPhotino.NET

@ottodobretsberger
Copy link
Contributor

In theory, if the files and folders are copied onto the SteamDeck correctly (including the .so libraries, which you indicated you did), it should work. We do not however have an option to verify this process ourselves at the moment, since neither of us owns or has access to a Steam Deck at the moment.
One thought is: Photino relies on GTK, which isn't included by default on SteamOS as far as I understand. Maybe that is missing? Either way, it's going to be hard for us to troubleshoot this particular scenario.

@sam-wheat
Copy link

Same issue on Windows 10 / Ubunto running on WSL.

Project is the Photino.Blazor sample.

Publish profile:

<Project>
  <PropertyGroup>
	<Configuration>Release</Configuration>
	<Platform>Any CPU</Platform>
	<PublishDir>\\wsl.localhost\Ubuntu\tmp\BlazorPhoton</PublishDir>
	<PublishProtocol>FileSystem</PublishProtocol>
	<_TargetId>Folder</_TargetId>
	<TargetFramework>net6.0</TargetFramework>
	<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
	<SelfContained>true</SelfContained>
	<PublishSingleFile>false</PublishSingleFile>
	<PublishTrimmed>false</PublishTrimmed>
  </PropertyGroup>
</Project>

Steps to reproduce:

  • Windows Visual Studio 2022 - Publish using above profile. In my case the output folder in the publish profile is the WSL filesystem.
  • Open terminal on WSL
  • cd /tmp/BlazorPhoton
  • chmod 777 ./Photino.Blazor.Sample
  • ./Photino.Blazor.Sample

Error msg:

Photino.NET: "Photino".SetTitle(Photino.Blazor App)
Photino.NET: "Photino.Blazor App".SetUseOsDefaultLocation(False)
Photino.NET: "Photino.Blazor App".SetWidth(1000)
Photino.NET: "Photino.Blazor App".SetHeight(900)
Photino.NET: "Photino.Blazor App".SetLeft(0)
Photino.NET: "Photino.Blazor App".SetTop(100)
Photino.NET: "Photino.Blazor App".SetIconFile(favicon.ico)
Photino.NET: "Photino.Blazor App".SetTitle(Photino Blazor Sample)
Photino.NET: "Photino Blazor Sample".Load(app://localhost/)
Photino.NET: "Photino Blazor Sample"***
Unable to load shared library 'Photino.Native' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libPhotino.Native: cannot open shared object file: No such file or directory
at PhotinoNET.PhotinoWindow.Photino_ctor(PhotinoNativeParameters& parameters)
at PhotinoNET.PhotinoWindow.b__274_0()
at PhotinoNET.PhotinoWindow.Invoke(Action workItem)
at PhotinoNET.PhotinoWindow.WaitForClose()
Error #0
Photino.NET: "Photino Blazor Sample".OpenAlertWindow(Fatal exception, System.ApplicationException: Native code exception. Error # 0 See inner exception for details.
---> System.DllNotFoundException: Unable to load shared library 'Photino.Native' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libPhotino.Native: cannot open shared object file: No such file or directory
at PhotinoNET.PhotinoWindow.Photino_ctor(PhotinoNativeParameters& parameters)
at PhotinoNET.PhotinoWindow.b__274_0()
at PhotinoNET.PhotinoWindow.Invoke(Action workItem)
at PhotinoNET.PhotinoWindow.WaitForClose()
--- End of inner exception stack trace ---
at PhotinoNET.PhotinoWindow.WaitForClose()
at Photino.Blazor.PhotinoBlazorApp.Run() in C:\Projects\photino.Blazor\Photino.Blazor\PhotinoBlazorApp.cs:line 50
at Photino.Blazor.Sample.Program.Main(String[] args) in C:\Projects\photino.Blazor\Samples\Photino.Blazor.Sample\Program.cs:line 33)
Unhandled exception. System.ApplicationException: Native code exception. Error # 0 See inner exception for details.
---> System.DllNotFoundException: Unable to load shared library 'Photino.Native' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libPhotino.Native: cannot open shared object file: No such file or directory
at PhotinoNET.PhotinoWindow.Photino_ctor(PhotinoNativeParameters& parameters)
at PhotinoNET.PhotinoWindow.b__274_0()
at PhotinoNET.PhotinoWindow.Invoke(Action workItem)
at PhotinoNET.PhotinoWindow.WaitForClose()
--- End of inner exception stack trace ---
at PhotinoNET.PhotinoWindow.WaitForClose()
at Photino.Blazor.PhotinoBlazorApp.Run() in C:\Projects\photino.Blazor\Photino.Blazor\PhotinoBlazorApp.cs:line 50
at Photino.Blazor.Sample.Program.Main(String[] args) in C:\Projects\photino.Blazor\Samples\Photino.Blazor.Sample\Program.cs:line 33
Aborted

Capture

@sam-wheat
Copy link

Is anyone here?

@MikeYeager
Copy link
Collaborator

@sam-wheat So far, we are not able to reproduce your issue.

@manfromarce
Copy link

I get the same error in both Ubuntu and Debian on WSL (Windows 11).

@leaderanalytics
Copy link

@MikeYeager because you didn't try or because it works? lol

@sam-wheat
Copy link

@MikeYeager 2.6.0 is working thus far! Thank you!

@philippjbauer
Copy link
Member

Possibly related to: #81

@philippjbauer philippjbauer self-assigned this Apr 27, 2023
@philippjbauer philippjbauer added the bug Something isn't working label Apr 27, 2023
@SommerEngineering
Copy link

SommerEngineering commented Dec 30, 2023

I am also very interested in running a Photino.Blazor project on the Steam Deck 😄. However, I'm still in the planning phase and don't currently have a Steam Deck to test 🙁. Would it be possible to run SteamOS in a VM? Yes, I found instructions here: https://www.youtube.com/watch?v=NJ2jvTgp4AA

@MikeYeager
Copy link
Collaborator

@MikeYeager because you didn't try or because it works? lol

Because it works. :-)

@MikeYeager
Copy link
Collaborator

FYI We will soon release builds with a few fixes that support .NET6-8 and we have published and tested some of our samples using single file deploy with tree shaking (trimming). We have not yet tested on Blazor and will be doing that next.

@sam-wheat
Copy link

BTW I am using Photiono.Blazor with dotnet 8 and I have not run into any issues.

@philippjbauer
Copy link
Member

@sourceit @SommerEngineering @sam-wheat
You'll want to look at the Flatpack option to publish to SteamOS:

The guide for publishing on all platforms is available as a sample in the Photino.Samples repository as a separate project. It includes a publish script and packaging templates that can be adapted for your specific situation.

Currently only available in the debug branch (as of 03/19/2024), lets find the rough edges together! :)
https://github.com/tryphotino/photino.Samples/tree/debug/Photino.PublishPhotino

You'll want to look at the Flatpack option to publish to SteamOS

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

No branches or pull requests

8 participants