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

Migration path to Avalonia 11 #80

Closed
sandreas opened this issue Mar 31, 2023 · 17 comments · Fixed by #82
Closed

Migration path to Avalonia 11 #80

sandreas opened this issue Mar 31, 2023 · 17 comments · Fixed by #82

Comments

@sandreas
Copy link

Hey there,

I tried to build a Project with Avalonia 11 but unfortunately it did not work, because there are still dependencies requiring Avalonia Styles 0.10.x.

I would really appreciate a migration path to Avalonia 11 - and am willing to help, unfortunately I don't know what would be the migration path and which files I need to change to make the project compatible.

This issue may be releated to OutSystems/WebView#303, but I think this is the right project to report this.

Thank you!

@joaompneves
Copy link
Collaborator

Hi,

Since its yet a preview release we dont have immediate plans for upgrade.

@sandreas
Copy link
Author

sandreas commented Apr 3, 2023

@joaompneves Thank you for the quick response. That's understandable.

I am willing to help, if you'd like. How about adding a branch for Aval. 11 Support? I would just need a short explanation, what task would be needed to achieve it and maybe the answer to some further questions. Then I could try to solve them in a PR.

@joaompneves
Copy link
Collaborator

Sure, feel free to open a PR. First of all you need to upgrade
https://github.com/OutSystems/CefGlue/blob/main/Directory.Packages.props#L19-L21
Then it should be a matter of fixing any breaking changes. I will try to answer your questions.

@sandreas
Copy link
Author

sandreas commented Apr 3, 2023

Sure, feel free to open a PR. First of all you need to upgrade ...

@joaompneves Cool thanks for the starting guide. I'll keep you updated.

@sandreas
Copy link
Author

sandreas commented Apr 7, 2023

So I tried to load the project into my IDE (JetBrains Rider on macOS) and I noticed, that this project seems to be tied pretty tight to a windows build process, isn't it?

I took a look in the build-wpf.cmd file, which links to a build.cmd that I could not find anywhere in the project.

I'm willing to use a Windows System to do the PR, is there any short guide you could give how to set up the project to build and test the results?
And how do you test CefGlue on macOS or Linux systems?

Thank you.

@sandreas sandreas closed this as completed Apr 7, 2023
@joaompneves
Copy link
Collaborator

joaompneves commented Apr 7, 2023

The project builds and runs on macOS. Just load it on Rider and launch the CefGlue.Demo.Avalonia. It should run without troubles and its a good test environment. Regarding the Tests project, it only runs on windows due to some threading issues/limitations on mac. Running Tests on windows its pretty straightforward using Visual Studio Test Explorer.

@sandreas
Copy link
Author

sandreas commented Apr 8, 2023

Mmh, this did not work for me. Maybe my macOS is too old? (MacBook Pro 13" Early 2015, macOS Monterey 12.6.3) Current error:

/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.Demo.Avalonia
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
[0408/154243.662865:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=39424
[0408/154243.665409:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 1 time(s)
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
[0408/154243.962461:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
[0408/154243.965195:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=39424
[0408/154243.965557:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 2 time(s)
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
[0408/154244.000113:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
[0408/154244.005754:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=39424
[0408/154244.005870:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 3 time(s)
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
[0408/154244.016312:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
[0408/154244.018700:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=39424
[0408/154244.018792:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 4 time(s)
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
[0408/154244.031030:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
[0408/154244.032837:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=39424
[0408/154244.032991:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 5 time(s)
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
[0408/154244.048184:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
[0408/154244.050078:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=39424
[0408/154244.050162:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 6 time(s)
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
[0408/154244.054699:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
[0408/154244.059436:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=39424
[0408/154244.059564:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 7 time(s)
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
[0408/154244.066387:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
[0408/154244.117110:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=39424
[0408/154244.117195:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 8 time(s)
[0408/154244.117675:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
[0408/154244.125097:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
The application to execute does not exist: '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.BrowserProcess.dll'.
[0408/154244.135441:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=39424
[0408/154244.135543:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 9 time(s)
[0408/154244.135602:FATAL:gpu_data_manager_impl_private.cc(441)] GPU process isn't usable. Goodbye.

Process finished with exit code 133.

@sandreas sandreas reopened this Apr 8, 2023
@sandreas
Copy link
Author

sandreas commented Apr 9, 2023

Short update: I tried the whole procedure on a Windows 10 machine and could still not build the project.
Rider does not show an error but exists with the return code of -2,147,483,645.

dotnet sdk version is 7.0.202

@sandreas
Copy link
Author

sandreas commented Apr 9, 2023

Next step on mac:

Since the Xilium.CefGlue.BrowserProcess.dll is missing, I just tried to link it and it got further:

cd ~/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0
ln -s Xilium.CefGlue.BrowserProcess Xilium.CefGlue.BrowserProcess.dll

Now the error is a missing libhostpolicy.dylib similar to RicoSuter/NSwag#838
I'll try the solutions on https://stackoverflow.com/questions/47285243/a-fatal-error-was-encountered-the-library-libhostpolicy-so-required, hope I can get rid of this soon.

/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.Demo.Avalonia
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
[0409/194902.078223:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=33536
[0409/194902.078842:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 1 time(s)
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
[0409/194902.366502:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
[0409/194902.371206:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=33536
[0409/194902.371311:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 2 time(s)
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
[0409/194902.449164:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
[0409/194902.458188:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=33536
[0409/194902.458301:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 3 time(s)
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
[0409/194902.471758:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
[0409/194902.474041:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=33536
[0409/194902.474156:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 4 time(s)
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
[0409/194902.481761:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
[0409/194902.486179:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=33536
[0409/194902.486536:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 5 time(s)
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
[0409/194902.503977:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
[0409/194902.509007:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=33536
[0409/194902.509107:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 6 time(s)
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
[0409/194902.520013:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
[0409/194902.526652:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=33536
[0409/194902.527190:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 7 time(s)
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
[0409/194902.532492:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
[0409/194902.541146:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=33536
[0409/194902.541590:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 8 time(s)
[0409/194902.542395:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.
[0409/194902.588519:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
[0409/194902.590721:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=33536
[0409/194902.590825:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 9 time(s)
[0409/194902.590888:FATAL:gpu_data_manager_impl_private.cc(441)] GPU process isn't usable. Goodbye.
A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/usr/local/share/dotnet'.
Failed to run as a self-contained app.
  - The application was run as a self-contained app because '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' was not found.
  - If this should be a framework-dependent app, add the '/Users/sandreas/Projects/CefGlue/CefGlue.Demo.Avalonia/bin/Debug/net6.0/Xilium.CefGlue.runtimeconfig.json' file and specify the appropriate framework.

@joaompneves
Copy link
Collaborator

Opened a PR #82 but the browser does not display.
Don't have much clues besides this issue thats appearing in the console:

objc[56764]: Class WebSwapCGLLayer is implemented in both .../WebCore.framework/Versions/A/Frameworks/libANGLE-shared.dylib (0x7ffa585388f0)
and /Users/.../net6.0/CefGlueBrowserProcess/libGLESv2.dylib (0x10632eb20). One of the two will be used. Which one is undefined.

@sandreas
Copy link
Author

sandreas commented Apr 10, 2023

Opened a PR #82 but the browser does not display. Don't have much clues besides this issue thats appearing in the console:

@joaompneves Wow this is awesome, thank you for your effort. I also have no clue what's going on, I think I have to better understand the code. I think that the problem is maybe in Cef itself, not CefGlue, but I'm not sure.

@joaompneves
Copy link
Collaborator

Well, I made a mistake and forgot to add the app styles... the browser is now showing up.

@sandreas
Copy link
Author

Thank you so much. I'll check and report back, if it is working.

@joaompneves joaompneves linked a pull request Apr 10, 2023 that will close this issue
@sandreas
Copy link
Author

sandreas commented Apr 11, 2023

@joaompneves
So, while it does work in development (start via Rider), it DOES NOT in release (after publish and running the binary on Windows).

dotnet publish MyProject -f net7.0 -r "win-x64" -c "Release" -o "dist/win-x64"  --self-contained -p:PublishSingleFile=true -p:PublishReadyToRun=true

I'm getting the error below in debug.log, even when I use CefSettings.NoSandbox = true (according to microsoft/vscode#133695). Any advice?

If required, I try to set up an example project asap...

[0411/085532.445:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=-2147450726
[0411/085532.445:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 1 time(s)
[0411/085532.477:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=-2147450726
[0411/085532.478:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 2 time(s)
[0411/085532.508:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=-2147450726
[0411/085532.508:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 3 time(s)
[0411/085532.529:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=-2147450726
[0411/085532.529:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 4 time(s)
[0411/085532.571:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=-2147450726
[0411/085532.571:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 5 time(s)
[0411/085532.640:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
[0411/085532.705:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=-2147450726
[0411/085532.705:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 6 time(s)
[0411/085532.712:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
[0411/085532.734:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=-2147450726
[0411/085532.734:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 7 time(s)
[0411/085532.737:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
[0411/085532.761:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=-2147450726
[0411/085532.761:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 8 time(s)
[0411/085532.767:ERROR:network_service_instance_impl.cc(499)] Network service crashed, restarting service.
[0411/085532.788:ERROR:gpu_process_host.cc(974)] GPU process exited unexpectedly: exit_code=-2147450726
[0411/085532.788:WARNING:gpu_process_host.cc(1276)] The GPU process has crashed 9 time(s)
[0411/085532.788:FATAL:gpu_data_manager_impl_private.cc(441)] GPU process isn't usable. Goodbye.

@joaompneves
Copy link
Collaborator

Try without -p:PublishSingleFile=true. Check for any files missing differences between debug and release.

@sandreas
Copy link
Author

@joaompneves
Thanks that seems to have solved the problem, thanks for the great support. You don't have sponsoring enabled, is there a way I could donate a small amount?

@joaompneves
Copy link
Collaborator

Glad it worked. In the future we will release this from the main branch, once Avalonia 11 becomes stable.

Thanks, no need ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants