GithubHelp home page GithubHelp logo

Comments (7)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Having the same problem here. I'm getting this error using multiple and single 
threads.

"Unable to cast COM object of type 'System.__ComObject' to interface type 
'Skybound.Gecko.nsIWebNavigation'." at run time. Mine fails on the line:

wbInfo.Navigate("http://www.google.com");

Where wbInfo is my GeckoWebBrowser object.

Original comment by [email protected] on 14 Feb 2009 at 7:07

from geckofx.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Unable to cast COM object of type 'System.__ComObject' to interface type
'Skybound.Gecko.nsIWebNavigation'. This operation failed because the 
QueryInterface
call on the COM component for the interface with IID
'{F5D9E7B0-D930-11D3-B057-00A024FFC08C}' failed due to the following error: No 
such
interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

Same problem here.
Note: Using the browser in a tab.

Original comment by [email protected] on 16 Mar 2009 at 8:56

from geckofx.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
The same... 

Original comment by [email protected] on 19 Jan 2010 at 2:52

from geckofx.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
This error is thrown when you're trying to access the GeckoFX browser from a new
non-UI thread. Code sample that works:

void AsyncNavigate(string url) {
  ThreadStart starter = delegate { AsyncNavigateThread(url); };
  Thread thread = new Thread(starter);
  thread.IsBackground = true;
  thread.Start();
}

private delegate void StringDelegate(string url);
private void AsyncNavigateThread(string url) {
  if (this == null || this.IsDisposed) return;
  if (this.InvokeRequired || webBrowser.InvokeRequired) {
    this.BeginInvoke(new StringDelegate(AsyncNavigateThread), new object[] { url });
    return;
  }
  webBrowser.Navigate(url);
}

We need a better exception message though!

Original comment by [email protected] on 19 Jan 2010 at 3:57

from geckofx.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
I am trying to use GeckoFX because the standard WebBrowser control struggles 
handling javascript in a number of areas.  My implementation with WebBrowser 
control runs in a ApartmentState.STA thread that has no UI.  I have been unable 
to get GeckFX to work in this scenario.  I get an error stating that I cannot 
navigate before the window handle is created and if I call CreateControl() on 
th GeckoFX browser control, I get an object is null exception from the naviagte 
call.  The delegate code above is incomplete, so I wonder if you could post a 
more complete answer.

Alos, might the right answer be to write a version of GeckoFX that does not 
inherit from Control.

Any thoughts would be appreciated.

Original comment by [email protected] on 18 Oct 2010 at 4:10

from geckofx.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Hey all...I am using the GeckoWebBrowser 1.9.1.0 in a .NET 2.0 application with 
the XURLrunner 1.9.2.12 and have the same problem when executing this line of 
code: webBrowser.Document.ActiveElement;

Unable to cast COM object of type 'System.__ComObject' to interface type 
'Skybound.Gecko.nsIDOMNSDocument'. This operation failed because the 
QueryInterface call on the COM component for the interface with IID 
'{533A8131-8D0C-4EBF-990B-7FAD7CD514EE}' failed due to the following error: No 
such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

Nothing works...
--> I tried to use the AsyncNavigate hint
--> I tried to use the GeckoWebBrowser outside of a TabControl within a new 
Form()

Everything I want to get work is to move the focus to the flash content when 
the DocumentCompleted event raised. Does someone have an idea how to solve this 
problem? I am happy for every hint.

Original comment by [email protected] on 22 Nov 2010 at 8:44

from geckofx.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Hello,all:
    My code is as follows:
    private void button1_Click(object sender, EventArgs e)
        {
            Browser.Navigate("http://www.baidu.com");

            GeckoElement script = Browser.Document.CreateElement("script");
            script.SetAttribute("type", "text/javascript");
            string str = "alert('ptmind');";
            script.TextContent = str;
            Browser.Document.Body.AppendChild(script);
        }
while running GeckoElement script = 
Browser.Document.CreateElement("script"),appear a error message as follow:

Unable to cast COM object of type 'System.__ComObject' to interface type 
'Skybound.Gecko.nsIDOMNSDocument'. This operation failed because the 
QueryInterface call on the COM component for the interface with IID 
'{533A8131-8D0C-4EBF-990B-7FAD7CD514EE}' failed due to the following error: No 
such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

Regards
[email protected]

Original comment by [email protected] on 11 Jan 2011 at 9:46

from geckofx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.