Replies: 3 comments
-
It depends on what you mean by fails. Is it crashing? Or just returning If it's crashing then you can setup crash reporting. https://github.com/cefsharp/CefSharp/wiki/Trouble-Shooting#unmanaged-crashes-when-the-process-dies
Make sure your log file/path is writable by the user. Do you see any errors in the
Do you mean
You should be able to now get the error code using
Native |
Beta Was this translation helpful? Give feedback.
-
Thank you for your detailed response Alex, to answer your questions:
> It depends on what you mean by fails. Is it crashing? Or just returning
false?
^^ I mean Cef.Initialize is just returning false
> Make sure your log file/path is writable by the user.
^^ I will test and make sure on this, it currently logs to the executable
path folder, I do see the log created when Cef.Initialize returns true, so
I’m assuming it’s not a permissions issue
> Cef.GetErrorCode()
^^ Thank you for this I will try this
> ARM
^^ That makes sense, and this could be the issue if users are running
Microsoft Surface, etc
Thank you for the help,
Tim
…On Tue, Jan 21, 2025 at 1:49 AM Alex Maitland ***@***.***> wrote:
At a high level, how can I capture the root cause or stack trace of why
Cef.Initiliaze fails?
It depends on what you mean by fails. Is it crashing? Or just returning
false?
If it's crashing then you can setup crash reporting.
https://github.com/cefsharp/CefSharp/wiki/Trouble-Shooting#unmanaged-crashes-when-the-process-dies
1. but it seems like you don't get any logging if Cef does not
initialize? How can I get an output in the log of why Cef did not
initialize?
Make sure your log file/path is writable by the user.
Do you see any errors in the Event Viewer?
.Net Version: 4.8.6
Do you mean 4.8.1?
3. if Cef does not Initialize (!Cef.Initialize), I've added some by hand
validation
You should be able to now get the error code using Cef.GetErrorCode()
#4914 <#4914>
3. in case most of the users have a specific OS Architecture like ARM even
though I've read ARM should be supported
Native ARM64 is only supported when targeting .Net 5.0 or greater
currently. If you are using .net 4.8.x then you will be running via
emulation. This maybe the source of your problem.
#4155 <#4155>
—
Reply to this email directly, view it on GitHub
<#5034 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB7JGD35B25A473KPFO6VND2LX3YLAVCNFSM6AAAAABVLDUZHWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCOBZHEYTANA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
@amaitland thank you for the help here. GetErrorCode or GetExitCode? - I don't see a Cef.GetErrorCode, so I'm using GetExitCode, is this what you mean? And for CefErrorCodes, I've been reviewing: Cef Unmanaged Crash - I may try to setup the unmanaged Cef Crash Reporting, but as of now most of the users have been reporting the Cef.Initialize returning false. Thanks again, |
Beta Was this translation helpful? Give feedback.
-
At a high level, how can I capture the root cause or stack trace of why Cef.Initiliaze fails? Right now we have many users reporting this but we're not sure why Cef isn't initialize and it makes it very difficult to troubleshoot. Cef loads on our developer machines, but we many end users that report they can't load the application because Cef does not initialize. We would like to log a stack trace or information about why Cef did not initialize. Here's is what I've tried and our current, not ideal approach:
Discussions - I did search for Cef.Intialize error, not loading, etc and viewed the first 2 pages or so but I didn't see anything specific to trying to capture why Cef doesn't load (although I do see specific errors in the Discussions, like #4595)
.Net Version: 4.8
Windows Forms
CefSharp Version: 126 and 129 (it looks like older versions may have thrown exceptions on Initialize?)
Try / Catch - I've tried adding try / catch handling, but no exceptions are thrown
By Hand Detection - if Cef does not Initialize (!Cef.Initialize), I've added some by hand validation (see below). This is not ideal though because the issue may be caused by something else (hardware, etc), it would be much better if I could capture the error that is being thrown. Here is what I've manually added:
CheckMissingDependencyFiles - I'm manullay checking to see if DLLs like libcef.dll, CefSharp.dll, etc exist
CheckMismatchedVersions - I'm manually checking to see if there is a DLL version mismatch on the dependency DLLs
CheckOsArchitecture - I'm manually checking the OS Architecture, in case most of the users have a specific OS Architecture like ARM even though I've read ARM should be supported
Thank you for the help,
Tim
Beta Was this translation helpful? Give feedback.
All reactions