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

Preview does not work in Github Codespaces #122

Open
dylanlangston opened this issue Mar 26, 2024 · 0 comments
Open

Preview does not work in Github Codespaces #122

dylanlangston opened this issue Mar 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@dylanlangston
Copy link

Describe the bug

Preview does not work in Github Codespaces. The error "127.0.0.1 refused to connect." is displayed instead.
image

To Reproduce

  1. Use the dotnet-codespaces template to create a new Codespace.
  2. Install the Avalonia VSCode Extension in Codespaces.
  3. Run these commands in VSCode's terminal to create a new Avalonia app:
rm -r * #Delete existing files
dotnet new install Avalonia.Templates #Install Avalonia templates
dotnet new avalonia.app #Create cew Avalonia app
dotnet build #Build the newly created app
  1. Click the MainWindow.axaml file to open it. Then click the Show Preview icon .

Avalonia for VS Code

v0.0.31

Avalonia version

11.0.10

VS Code version

1.87.2

Relevant log output

2024-03-26 17:58:46.396 [info] [Trace - 5:58:46 PM] Sending notification 'workspace/didChangeWatchedFiles'.
2024-03-26 17:58:47.891 [info] [Trace - 5:58:47 PM] Sending notification 'workspace/didChangeWatchedFiles'.
2024-03-26 17:58:58.787 [info] Command avalonia.previewProcess, file:///workspaces/dotnet-codespaces/MainWindow.axaml
2024-03-26 17:58:58.787 [info] PreviewServer.start /workspaces/dotnet-codespaces/bin/Debug/net8.0/dotnet-codespaces.dll
2024-03-26 17:58:58.818 [info] Previewer process started with args: exec,--runtimeconfig "/workspaces/dotnet-codespaces/bin/Debug/net8.0/dotnet-codespaces.runtimeconfig.json",--depsfile "/workspaces/dotnet-codespaces/bin/Debug/net8.0/dotnet-codespaces.deps.json" "/root/.nuget/packages/avalonia/11.0.10/tools/netcoreapp2.0/designer/Avalonia.Designer.HostApp.dll",--method avalonia-remote,--transport tcp-bson://127.0.0.1:8001/,--method html,--html-url http://127.0.0.1:8000,"/workspaces/dotnet-codespaces/bin/Debug/net8.0/dotnet-codespaces.dll"
2024-03-26 17:58:58.818 [info] Preview server listening on port 8001
2024-03-26 17:58:58.819 [info] Show Preview to side: file:///workspaces/dotnet-codespaces/MainWindow.axaml
2024-03-26 17:58:58.911 [info] Preview server connected on port 8001
2024-03-26 17:58:58.911 [info] Preview server connected on port 8001
2024-03-26 17:58:58.911 [info] Preview server connected on port 8001
2024-03-26 17:58:58.911 [info] Preview server connected on port 8001
2024-03-26 17:58:58.919 [info] Initializing application in design mode

2024-03-26 17:58:58.926 [info] Obtaining AppBuilder instance from dotnet_codespaces.Program

2024-03-26 17:58:58.955 [info] {"Uri":"http://127.0.0.1:8000/"}
2024-03-26 17:58:58.955 [info] {"Uri":"http://127.0.0.1:8000/"}
2024-03-26 17:58:58.955 [info] {"Uri":"http://127.0.0.1:8000/"}
2024-03-26 17:58:58.955 [info] {"Uri":"http://127.0.0.1:8000/"}
2024-03-26 17:58:58.962 [info] Unhandled exception. 
2024-03-26 17:58:58.972 [info] System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception.
 ---> System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies. In order to help diagnose loading problems, consider using a tool like strace. If you're using glibc, consider setting the LD_DEBUG environment variable: 
libfontconfig.so.1: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.3/libSkiaSharp.so: cannot open shared object file: No such file or directory
/workspaces/dotnet-codespaces/bin/Debug/net8.0/libSkiaSharp.so: cannot open shared object file: No such file or directory
/workspaces/dotnet-codespaces/bin/Debug/net8.0/runtimes/linux-x64/native/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.3/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
/workspaces/dotnet-codespaces/bin/Debug/net8.0/liblibSkiaSharp.so: cannot open shared object file: No such file or directory
/workspaces/dotnet-codespaces/bin/Debug/net8.0/runtimes/linux-x64/native/libSkiaSharp: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.3/libSkiaSharp: cannot open shared object file: No such file or directory
/workspaces/dotnet-codespaces/bin/Debug/net8.0/libSkiaSharp: cannot open shared object file: No such file or directory
/workspaces/dotnet-codespaces/bin/Debug/net8.0/runtimes/linux-x64/native/liblibSkiaSharp: cannot open shared object file: No such file or directory
/usr/share/dotnet/shared/Microsoft.NETCore.App/8.0.3/liblibSkiaSharp: cannot open shared object file: No such file or directory
/workspaces/dotnet-codespaces/bin/Debug/net8.0/liblibSkiaSharp: cannot open shared object file: No such file or directory

   at SkiaSharp.SkiaApi.sk_colortype_get_default_8888()
   at SkiaSharp.SKImageInfo..cctor()
   --- End of inner exception stack trace ---
   at Avalonia.Skia.PlatformRenderInterface..ctor(Nullable`1 maxResourceBytes)
   at Avalonia.Skia.SkiaPlatform.Initialize(SkiaOptions options)
   at Avalonia.SkiaApplicationExtensions.<>c.<UseSkia>b__0_0()
   at Avalonia.AppBuilder.SetupUnsafe()
   at Avalonia.AppBuilder.Setup()
   at Avalonia.AppBuilder.SetupWithoutStarting()
   at Avalonia.DesignerSupport.Remote.RemoteDesignerEntryPoint.AppInitializer.ConfigureApp(IAvaloniaRemoteTransportConnection transport, CommandLineArgs args, Object obj)
   at Avalonia.DesignerSupport.Remote.RemoteDesignerEntryPoint.Main(String[] cmdline)
   at Avalonia.Designer.HostApp.Program.Main(String[] args)

2024-03-26 17:58:59.063 [info] Preview server closed for /workspaces/dotnet-codespaces/bin/Debug/net8.0/dotnet-codespaces.dll
2024-03-26 17:58:59.063 [info] Preview server closed for /workspaces/dotnet-codespaces/bin/Debug/net8.0/dotnet-codespaces.dll
2024-03-26 17:58:59.063 [info] Preview server closed for /workspaces/dotnet-codespaces/bin/Debug/net8.0/dotnet-codespaces.dll
2024-03-26 17:58:59.063 [info] Preview server closed for /workspaces/dotnet-codespaces/bin/Debug/net8.0/dotnet-codespaces.dll
2024-03-26 17:58:59.064 [info] Aborted (core dumped)

2024-03-26 17:58:59.064 [info] Previewer process exited with code 134

Additional context

No response

@dylanlangston dylanlangston added the bug Something isn't working label Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant