CEF sharp displays web page but CefWebBrowser.IsBrowserInitialized always false












0















I have a very strange situation here with CEF Sharp x86 (67 with latest cef.redist 3.3497.1841), but originally reported with v49. It's very crazy, so I'm just looking, maybe somebody have stumbled upon anything similar. We host WPF ChromiumWebBrowser inside WinForms UserControl (via ElementHost) and it's running inside 3rd party application, with which it does not interact in any way (so it's a plugin to this host application). For about 100 or so users everything is ok, but for a single person this happens: webpage loads and displays correctly, but the ChromiumWebBrowser.IsBrowserInitialized flag is always false.



Now, by 'user' I don't mean Windows account, just a user in totally unrelated 3rd party application, logging-in against 3rd party userid/password verification - unrelated to any windows settings. So as crazy as it sounds we've tried it on multiple computers on multiple windows accounts, using different user ids for the application, and the result is still the same - for this one userid there is a problem, for others - all ok.



I wonder if anyone has had such crazy experience with CEF. I'm betting on some bug in .NET layer, as the actual browser works fine - webpage is rendered, you can browse normally. Also this has sth to do with CEF run as plugin to this exact 3rd party app - if I run a test winform app with same setup - user control -> element host -> WPF ChromiumWebBrowser, all is ok. CEF log is not much help, no errors other than in OK situation.



I'm not attaching any code or logs, I don't think it'd be helpful in this case. Just for more background the plugin has been around for almost 3 years with not a single bug reported, except this case. Just to make it clear - I need this flag to be true to be able to inject JS calls into the plugin.










share|improve this question

























  • Using IsBrowserInitialized in relation to js seems strange to me, what does your code look like? There is no class called CefWebBrowser, please use the correct class names, you'll only confuse others. I've never heard of other reports.

    – amaitland
    Nov 14 '18 at 23:26











  • If you haven't already then please read github.com/cefsharp/CefSharp/wiki/…

    – amaitland
    Nov 14 '18 at 23:27











  • Yup, meant ChromiumWebBrowser, my bad. The relation it's that when you call ExecuteScriptAsync, the flag is checked and if not true, exception is raised.

    – Łukasz Zwierko
    Nov 15 '18 at 0:28











  • Again, the code has been in production for 3 years and it's working ok, besides this single anomaly, so rtfm is no good here.

    – Łukasz Zwierko
    Nov 15 '18 at 0:30
















0















I have a very strange situation here with CEF Sharp x86 (67 with latest cef.redist 3.3497.1841), but originally reported with v49. It's very crazy, so I'm just looking, maybe somebody have stumbled upon anything similar. We host WPF ChromiumWebBrowser inside WinForms UserControl (via ElementHost) and it's running inside 3rd party application, with which it does not interact in any way (so it's a plugin to this host application). For about 100 or so users everything is ok, but for a single person this happens: webpage loads and displays correctly, but the ChromiumWebBrowser.IsBrowserInitialized flag is always false.



Now, by 'user' I don't mean Windows account, just a user in totally unrelated 3rd party application, logging-in against 3rd party userid/password verification - unrelated to any windows settings. So as crazy as it sounds we've tried it on multiple computers on multiple windows accounts, using different user ids for the application, and the result is still the same - for this one userid there is a problem, for others - all ok.



I wonder if anyone has had such crazy experience with CEF. I'm betting on some bug in .NET layer, as the actual browser works fine - webpage is rendered, you can browse normally. Also this has sth to do with CEF run as plugin to this exact 3rd party app - if I run a test winform app with same setup - user control -> element host -> WPF ChromiumWebBrowser, all is ok. CEF log is not much help, no errors other than in OK situation.



I'm not attaching any code or logs, I don't think it'd be helpful in this case. Just for more background the plugin has been around for almost 3 years with not a single bug reported, except this case. Just to make it clear - I need this flag to be true to be able to inject JS calls into the plugin.










share|improve this question

























  • Using IsBrowserInitialized in relation to js seems strange to me, what does your code look like? There is no class called CefWebBrowser, please use the correct class names, you'll only confuse others. I've never heard of other reports.

    – amaitland
    Nov 14 '18 at 23:26











  • If you haven't already then please read github.com/cefsharp/CefSharp/wiki/…

    – amaitland
    Nov 14 '18 at 23:27











  • Yup, meant ChromiumWebBrowser, my bad. The relation it's that when you call ExecuteScriptAsync, the flag is checked and if not true, exception is raised.

    – Łukasz Zwierko
    Nov 15 '18 at 0:28











  • Again, the code has been in production for 3 years and it's working ok, besides this single anomaly, so rtfm is no good here.

    – Łukasz Zwierko
    Nov 15 '18 at 0:30














0












0








0








I have a very strange situation here with CEF Sharp x86 (67 with latest cef.redist 3.3497.1841), but originally reported with v49. It's very crazy, so I'm just looking, maybe somebody have stumbled upon anything similar. We host WPF ChromiumWebBrowser inside WinForms UserControl (via ElementHost) and it's running inside 3rd party application, with which it does not interact in any way (so it's a plugin to this host application). For about 100 or so users everything is ok, but for a single person this happens: webpage loads and displays correctly, but the ChromiumWebBrowser.IsBrowserInitialized flag is always false.



Now, by 'user' I don't mean Windows account, just a user in totally unrelated 3rd party application, logging-in against 3rd party userid/password verification - unrelated to any windows settings. So as crazy as it sounds we've tried it on multiple computers on multiple windows accounts, using different user ids for the application, and the result is still the same - for this one userid there is a problem, for others - all ok.



I wonder if anyone has had such crazy experience with CEF. I'm betting on some bug in .NET layer, as the actual browser works fine - webpage is rendered, you can browse normally. Also this has sth to do with CEF run as plugin to this exact 3rd party app - if I run a test winform app with same setup - user control -> element host -> WPF ChromiumWebBrowser, all is ok. CEF log is not much help, no errors other than in OK situation.



I'm not attaching any code or logs, I don't think it'd be helpful in this case. Just for more background the plugin has been around for almost 3 years with not a single bug reported, except this case. Just to make it clear - I need this flag to be true to be able to inject JS calls into the plugin.










share|improve this question
















I have a very strange situation here with CEF Sharp x86 (67 with latest cef.redist 3.3497.1841), but originally reported with v49. It's very crazy, so I'm just looking, maybe somebody have stumbled upon anything similar. We host WPF ChromiumWebBrowser inside WinForms UserControl (via ElementHost) and it's running inside 3rd party application, with which it does not interact in any way (so it's a plugin to this host application). For about 100 or so users everything is ok, but for a single person this happens: webpage loads and displays correctly, but the ChromiumWebBrowser.IsBrowserInitialized flag is always false.



Now, by 'user' I don't mean Windows account, just a user in totally unrelated 3rd party application, logging-in against 3rd party userid/password verification - unrelated to any windows settings. So as crazy as it sounds we've tried it on multiple computers on multiple windows accounts, using different user ids for the application, and the result is still the same - for this one userid there is a problem, for others - all ok.



I wonder if anyone has had such crazy experience with CEF. I'm betting on some bug in .NET layer, as the actual browser works fine - webpage is rendered, you can browse normally. Also this has sth to do with CEF run as plugin to this exact 3rd party app - if I run a test winform app with same setup - user control -> element host -> WPF ChromiumWebBrowser, all is ok. CEF log is not much help, no errors other than in OK situation.



I'm not attaching any code or logs, I don't think it'd be helpful in this case. Just for more background the plugin has been around for almost 3 years with not a single bug reported, except this case. Just to make it clear - I need this flag to be true to be able to inject JS calls into the plugin.







c# cefsharp






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 1 '18 at 13:01









halfer

14.6k758113




14.6k758113










asked Nov 14 '18 at 22:03









Łukasz ZwierkoŁukasz Zwierko

36829




36829













  • Using IsBrowserInitialized in relation to js seems strange to me, what does your code look like? There is no class called CefWebBrowser, please use the correct class names, you'll only confuse others. I've never heard of other reports.

    – amaitland
    Nov 14 '18 at 23:26











  • If you haven't already then please read github.com/cefsharp/CefSharp/wiki/…

    – amaitland
    Nov 14 '18 at 23:27











  • Yup, meant ChromiumWebBrowser, my bad. The relation it's that when you call ExecuteScriptAsync, the flag is checked and if not true, exception is raised.

    – Łukasz Zwierko
    Nov 15 '18 at 0:28











  • Again, the code has been in production for 3 years and it's working ok, besides this single anomaly, so rtfm is no good here.

    – Łukasz Zwierko
    Nov 15 '18 at 0:30



















  • Using IsBrowserInitialized in relation to js seems strange to me, what does your code look like? There is no class called CefWebBrowser, please use the correct class names, you'll only confuse others. I've never heard of other reports.

    – amaitland
    Nov 14 '18 at 23:26











  • If you haven't already then please read github.com/cefsharp/CefSharp/wiki/…

    – amaitland
    Nov 14 '18 at 23:27











  • Yup, meant ChromiumWebBrowser, my bad. The relation it's that when you call ExecuteScriptAsync, the flag is checked and if not true, exception is raised.

    – Łukasz Zwierko
    Nov 15 '18 at 0:28











  • Again, the code has been in production for 3 years and it's working ok, besides this single anomaly, so rtfm is no good here.

    – Łukasz Zwierko
    Nov 15 '18 at 0:30

















Using IsBrowserInitialized in relation to js seems strange to me, what does your code look like? There is no class called CefWebBrowser, please use the correct class names, you'll only confuse others. I've never heard of other reports.

– amaitland
Nov 14 '18 at 23:26





Using IsBrowserInitialized in relation to js seems strange to me, what does your code look like? There is no class called CefWebBrowser, please use the correct class names, you'll only confuse others. I've never heard of other reports.

– amaitland
Nov 14 '18 at 23:26













If you haven't already then please read github.com/cefsharp/CefSharp/wiki/…

– amaitland
Nov 14 '18 at 23:27





If you haven't already then please read github.com/cefsharp/CefSharp/wiki/…

– amaitland
Nov 14 '18 at 23:27













Yup, meant ChromiumWebBrowser, my bad. The relation it's that when you call ExecuteScriptAsync, the flag is checked and if not true, exception is raised.

– Łukasz Zwierko
Nov 15 '18 at 0:28





Yup, meant ChromiumWebBrowser, my bad. The relation it's that when you call ExecuteScriptAsync, the flag is checked and if not true, exception is raised.

– Łukasz Zwierko
Nov 15 '18 at 0:28













Again, the code has been in production for 3 years and it's working ok, besides this single anomaly, so rtfm is no good here.

– Łukasz Zwierko
Nov 15 '18 at 0:30





Again, the code has been in production for 3 years and it's working ok, besides this single anomaly, so rtfm is no good here.

– Łukasz Zwierko
Nov 15 '18 at 0:30












1 Answer
1






active

oldest

votes


















1














Ok, so it turned out to be a case of opening 2 instances of browser within single process. One browser window was initializing and working fine, second was was displaying page, but reporting 'not initialized'. It became clear only when I went to customer and actually saw the scenario, because they did not report that they opened 2nd instance. I this case, they don't need 2nd instance, so that was the fix, maybe there is an error I our code, I'll follow up this issue once we do more through analysis.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53309405%2fcef-sharp-displays-web-page-but-cefwebbrowser-isbrowserinitialized-always-false%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Ok, so it turned out to be a case of opening 2 instances of browser within single process. One browser window was initializing and working fine, second was was displaying page, but reporting 'not initialized'. It became clear only when I went to customer and actually saw the scenario, because they did not report that they opened 2nd instance. I this case, they don't need 2nd instance, so that was the fix, maybe there is an error I our code, I'll follow up this issue once we do more through analysis.






    share|improve this answer




























      1














      Ok, so it turned out to be a case of opening 2 instances of browser within single process. One browser window was initializing and working fine, second was was displaying page, but reporting 'not initialized'. It became clear only when I went to customer and actually saw the scenario, because they did not report that they opened 2nd instance. I this case, they don't need 2nd instance, so that was the fix, maybe there is an error I our code, I'll follow up this issue once we do more through analysis.






      share|improve this answer


























        1












        1








        1







        Ok, so it turned out to be a case of opening 2 instances of browser within single process. One browser window was initializing and working fine, second was was displaying page, but reporting 'not initialized'. It became clear only when I went to customer and actually saw the scenario, because they did not report that they opened 2nd instance. I this case, they don't need 2nd instance, so that was the fix, maybe there is an error I our code, I'll follow up this issue once we do more through analysis.






        share|improve this answer













        Ok, so it turned out to be a case of opening 2 instances of browser within single process. One browser window was initializing and working fine, second was was displaying page, but reporting 'not initialized'. It became clear only when I went to customer and actually saw the scenario, because they did not report that they opened 2nd instance. I this case, they don't need 2nd instance, so that was the fix, maybe there is an error I our code, I'll follow up this issue once we do more through analysis.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 1 '18 at 19:23









        Łukasz ZwierkoŁukasz Zwierko

        36829




        36829
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53309405%2fcef-sharp-displays-web-page-but-cefwebbrowser-isbrowserinitialized-always-false%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            The Sandy Post

            Danny Elfman

            Pages that link to "Head v. Amoskeag Manufacturing Co."