cefsharp / CefSharp

.NET (WPF and Windows Forms) bindings for the Chromium Embedded Framework
http://cefsharp.github.io/
Other
9.87k stars 2.92k forks source link

Release Notification - 87.1.x #3343

Closed amaitland closed 3 years ago

amaitland commented 3 years ago

This version includes some major changes to the Nuget packages including a new set of packages that specifically support .Net Core/.Net 5. See #3319 for changes in relation to the package restructure for the existing Nuget pacakges.

See Breaking Changes for a complete list (at this point there is likely the single breaking change).


Release 87.1.x-pre

Release 87.1.x

amaitland commented 3 years ago

The 87.1.130-pre release packages are now on Nuget.org. CEF has been updated to 87.1.13+g481a82a+chromium-87.0.4280.141 / Chromium 87.0.4280.141.

For the .Net 4.5.2 and above

For .Net Core 3.1/.Net 5.0

The https://github.com/cefsharp/CefSharp.MinimalExample/tree/cefsharp/87 branch of the MinimalExample can be used for testing purposes.

amaitland commented 3 years ago

For those wishing to use .Net Core 3.1/Net 5.0 see https://github.com/cefsharp/CefSharp/issues/3284#issuecomment-757130143 for more details.

andrewmd5 commented 3 years ago

It looks like with all these changes it is no longer possible to use object initializers to configure browser settings unless you directly reference settings CefSharp.Core.Runtime.

Trying to set BrowserSettings directly leads to System.Exception: 'BrowserSettings can only be of type CefSharp.BrowserSettings or null even if you use BrowserSettings = ObjectFactory.CreateBrowserSettings(true),

To configure browser settings you have to initialize the browser and let InitializeFieldsAndCefIfRequired execute which internally sets BrowserSettings, then configure the settings to your desire. If this is intended behavior then BrowserSettings should have a private setter to avoid confusion as classes implementing IBrowserSettings can't be used anyway.

amaitland commented 3 years ago

To configure browser settings you have to initialize the browser and let InitializeFieldsAndCefIfRequired execute which internally sets BrowserSettings, then configure the settings to your desire. If this is intended behavior then BrowserSettings should have a private setter to avoid confusion as classes implementing IBrowserSettings can't be used anyway.

Thanks for letting me know. The previous behaviour should be preserved if possible. Should just be a matter of changing the type checking, I'll investigate tomorrow and get back to you.

amaitland commented 3 years ago

Trying to set BrowserSettings directly leads to System.Exception: 'BrowserSettings can only be of type CefSharp.BrowserSettings or null even if you use BrowserSettings = ObjectFactory.CreateBrowserSettings(true),

@AndrewMD5 I've tested with net5.0-windows, netcoreapp3.1 and .net452 using https://github.com/cefsharp/CefSharp.MinimalExample/tree/cefsharp/87 and I've not been able to replace this using the CefSharp.MinimalExample.WinForms.

Which package are you using? Which version of .Net are you targeting?

andrewmd5 commented 3 years ago

I am using the WinForms .NET Framework package however my project is using the new csproj format you’d find with .NET Core / 5 projects. The target framework is just set to net472.

amaitland commented 3 years ago

I am using the WinForms .NET Framework package however my project is using the new csproj format you’d find with .NET Core / 5 projects. The target framework is just set to net472.

Thanks 👍 I've only tested with the older non-SDK-style project format when targeting 4.x. I guess it's possible a newer target .Net framework influences the behaviour. I'll test with the newer SDK-style shortly (SDK-style or non-SDK-style)

I can speculatively change the type checking, I'd like to reproduce the problem first if possible.

GieltjE commented 3 years ago

There seem to be some mayor issues with this version:

[0111/111834.642:VERBOSE1:pref_proxy_config_tracker_impl.cc(186)] 0000023A30A7E2F0: set chrome proxy config service to 0000023A30ACBB40
[0111/111834.656:VERBOSE1:webrtc_internals.cc(118)] Could not get the download directory.
[0111/111834.696:VERBOSE1:pref_proxy_config_tracker_impl.cc(186)] 0000023A30A7EB00: set chrome proxy config service to 0000023A30ACA940
[0111/111834.728:VERBOSE1:simple_index_file.cc(583)] Simple Cache Index is being restored from disk.
[0111/111834.728:VERBOSE1:simple_index_file.cc(583)] Simple Cache Index is being restored from disk.
[0111/111836.146:ERROR:network_service_instance_impl.cc(286)] Network service crashed, restarting service.
[0111/111836.232:WARNING:gpu_process_host.cc(1266)] The GPU process has crashed 1 time(s)
[0111/111837.371:WARNING:gpu_process_host.cc(1266)] The GPU process has crashed 2 time(s)
[0111/111837.855:ERROR:network_service_instance_impl.cc(286)] Network service crashed, restarting service.
[0111/111838.431:WARNING:gpu_process_host.cc(1266)] The GPU process has crashed 3 time(s)
[0111/111838.957:ERROR:network_service_instance_impl.cc(286)] Network service crashed, restarting service.
[0111/111839.617:WARNING:gpu_process_host.cc(1266)] The GPU process has crashed 4 time(s)
[0111/111840.557:WARNING:gpu_process_host.cc(1266)] The GPU process has crashed 5 time(s)
[0111/111841.735:WARNING:gpu_process_host.cc(1266)] The GPU process has crashed 6 time(s)
[0111/111841.736:ERROR:browser_gpu_channel_host_factory.cc(168)] Failed to launch GPU process.

Using .NET 4.8 Winforms.

Tried clearing all caches, disabling all settings (including command line args), how can I help debug this?

amaitland commented 3 years ago

Trying to set BrowserSettings directly leads to System.Exception: 'BrowserSettings can only be of type CefSharp.BrowserSettings or null even if you use BrowserSettings = ObjectFactory.CreateBrowserSettings(true),

@AndrewMD5 I've changed the type checking (commit https://github.com/cefsharp/CefSharp/commit/2a80b711619d1a8a104e022dfa4a7e90f2f4c65e) which should hopefully resolve this.

I need to resolve another issue before I can release a new -pre release. Details are at https://github.com/cefsharp/CefSharp/issues/3319#issuecomment-757580537

If this is a high priority for you please let me know and I'll loot at releasing another -pre release tomorrow.

amaitland commented 3 years ago

Using .NET 4.8 Winforms.

@GieltjE What version of Visual Studio are you using?

how can I help debug this?

Can you test with the MinimalExample and see if that runs on your machine. Specifically branch https://github.com/cefsharp/CefSharp.MinimalExample/tree/cefsharp/87

andrewmd5 commented 3 years ago

If I find some time tonight I’ll upload a re

Trying to set BrowserSettings directly leads to System.Exception: 'BrowserSettings can only be of type CefSharp.BrowserSettings or null even if you use BrowserSettings = ObjectFactory.CreateBrowserSettings(true),

@AndrewMD5 I've changed the type checking (commit 2a80b71) which should hopefully resolve this.

I need to resolve another issue before I can release a new -pre release. Details are at #3319 (comment)

If this is a high priority for you please let me know and I'll loot at releasing another -pre release tomorrow.

Thanks for the quick change. No rush on my end.

~Another small issue I noticed: if ProjectA references ProjectB which references the WinForm package then CefSharp.WinForms, CefSharp.Core.dll, CefSharp.dll and a handful of other files are not copied to the output directory of ProjectA. All content is however.~ looks like this was on me. I have <ReferenceOutputAssembly>false</ReferenceOutputAssembly> since its an executable project.

GieltjE commented 3 years ago

Using .NET 4.8 Winforms.

@GieltjE What version of Visual Studio are you using?

how can I help debug this?

Can you test with the MinimalExample and see if that runs on your machine. Specifically branch https://github.com/cefsharp/CefSharp.MinimalExample/tree/cefsharp/87

VS2019 enterprise, for some reason the example forces itself to v88.1.0 which doesn't seem to exist anywhere..... -edit- Got it working with 87, seems to work just fine, will try to find the differences.

GieltjE commented 3 years ago

Found the issue:

            chromiumWebBrowser.JavascriptObjectRepository.ResolveObject += (sender, e) =>
            {
                if (bindables.ContainsKey(e.ObjectName))
                {
                    e.ObjectRepository.Register(e.ObjectName, Activator.CreateInstance(bindables[e.ObjectName]), true);
                }
            };

When that code is present everything breaks, without it everything is fine.

-edit- Fixed by moving to JavascriptObjectRepository

amaitland commented 3 years ago

Thanks for the quick change. No rush on my end.

@AndrewMD5 Thanks, I'll fix a few more things and release a new build in a few days.

amaitland commented 3 years ago

VS2019 enterprise,

@GieltjE Are you using a newer SdkStyle project (PackageReference) or an older Non-SdkStyle (packages.config)?

VS2019 enterprise, for some reason the example forces itself to v88.1.0 which doesn't seem to exist anywhere.....

There are CI builds which target version 88 (For reference https://www.myget.org/feed/cefsharp/package/nuget/CefSharp.WinForms)

The MinimalExample branch should already be setup for the 87-pre release, did you do anything other than open and build it?

Based on the error you were seeing it's likely that some files weren't correctly copied correctly during the build process and the BrowserSubProcess failed to launch.

When that code is present everything breaks, without it everything is fine.

-edit- Fixed by moving to JavascriptObjectRepository

Can you clarify exactly what you changed? For me It's not clear how anything to do with the JavascriptObjectRepository would cause the errors reported, unless for some reason your project failed to build successfully. The error sounds more like a missing dependency at build time. If you can elaborate a little more that would be appreciated 👍

GieltjE commented 3 years ago

Using PackageReference, did nothing but open it, it was set to v86 at first, when attempting to update it to 87 it forced itself to 88 for some reason. The second attempt worked.

Don't know why or what changed, but moving back to the ObjectRepository by reversing git and cleaning all caches etc. now works for some weird reason, get the fealing I am missing something.

amaitland commented 3 years ago

Using PackageReference, did nothing but open it, it was set to v86 at first, when attempting to update it to 87 it forced itself to 88 for some reason. The second attempt worked.

@GieltjE For future reference the master branch always points to the current release (which is 86 currently). The link I provided above was for the CefSharp.MinimalExample/tree/cefsharp/87 branch which is already setup for the current -pre release for testing purposes (I use this for testing final packages).

Don't know why or what changed, but moving back to the ObjectRepository by reversing git and cleaning all caches etc. now works for some weird reason, get the fealing I am missing something.

If it happens again please let me know, there's been a major restructure in terms of the Nuget packages (https://github.com/cefsharp/CefSharp/issues/3319), so I'm expecting a few minor issues.

amaitland commented 3 years ago

The 87.1.131-pre release packages are now on Nuget.org.

For the .Net 4.5.2 and above

For .Net Core 3.1/.Net 5.0

The https://github.com/cefsharp/CefSharp.MinimalExample/tree/cefsharp/87 branch of the MinimalExample has been updated for testing purposes.

Known Issues

ZozoJL commented 3 years ago

Hello, I wanted to report 2 regressions between version 86.0.241 targeting the .net 4.72 framework and version 87.1.131-pre targeting the .net5 framework:

In my CefSetting configuration, I only define the CachePath and the Locale (fr). I have no specific configuration for the dictionaries, those used by version 86 were in the directory: %LocalAppData%\CEF\User Data\Dictionaries If I set CefSetting.UserDataPath with this directory it doesn't change anything.

amaitland commented 3 years ago

I wanted to report 2 regressions between version 86.0.241 targeting the .net 4.72 framework and version 87.1.131-pre targeting the .net5 framework:

@ZozoJL These are more likely problems with CEF and will need to be reported at https://bitbucket.org/chromiumembedded/cef/issues?status=new&status=open

amaitland commented 3 years ago

Spellchecker not working appears to be a known issue https://bitbucket.org/chromiumembedded/cef/issues/3055/windows-spell-checker-not-working-add

There's a workaround listed which we can enable by default.

amaitland commented 3 years ago

I was planning on releasing version 87 today, unfortunately I have picked up a stomach bug, so there will be a delay of a few days.

There will only be minor changes from the -pre release.

Windows native spell checker will be disabled by default as CEF doesn't yet support it. Commit https://github.com/cefsharp/CefSharp/commit/c43aec1733cbc84a91b818694b9e5c63e53d2043 you can add the command line args to the -pre release.

amaitland commented 3 years ago

The 87.1.132 release packages are now on Nuget.org.

For the .Net 4.5.2 and above

These packages required Visual C++ 2015 or greater

For .Net Core 3.1/.Net 5.0

These packages required Visual C++ 2019

NOTE A minimum of .Net Core 3.1 is required (for .Net 3.0 which is no longer supported by Microsoft you'll need to use the older packages).


Known Issues

Ijwhost.dll To support C++/CLI libraries in .NET Core, ijwhost was created as a shim for finding and loading the runtime. All C++/CLI libraries are linked to this shim, such that ijwhost.dll is found/loaded when the C++/CLI library is loaded.

amaitland commented 3 years ago

For specifics about using the new NetCore packages see https://github.com/cefsharp/CefSharp/issues/3284#issuecomment-772132523