headria / geckofx

Automatically exported from code.google.com/p/geckofx
0 stars 0 forks source link

InvalidCastException using GeckoElementCollection #23

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Make a new Form, put a Gecko browser on it
2. Get an element collection (for example take the .Frames attribute
3. Try to access the elements in the collection

What is the expected output? What do you see instead?

I get a InvalidCastException with the following message (freely translated from 
dutch):

Can not convert COM-object of type System.__ComObject to interfacetype 
Skybound.Gecko.nsIDOMNSElement. This operation failed because the 
QueryInterface-call for the COM-object for the interface with IID 
{F0AEF489-18C5-4DE6-99D5-58B3758B098C} failed with the following fault: 
Interface not supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

What version of the product are you using? On what operating system?

1.9.1.0
Windows 7 - 64 bit (I set my project to be 32-bit though)

Please provide any additional information below.

Using Visual Studio 2008. The project I made is a Windows Forms Application 
(C#).

Original issue reported on code.google.com by timmyab...@gmail.com on 12 Aug 2010 at 1:28

GoogleCodeExporter commented 8 years ago
same problem here

Original comment by daniel.z...@googlemail.com on 20 Aug 2010 at 3:10

GoogleCodeExporter commented 8 years ago
Same issue here: 

Version of geckofx:1.9.1.0
version of xulrunner: 1.9.2.9 (newest)

Resolved by downgrading xulrunner to 1.9.1.11

Original comment by lud...@gmail.com on 14 Sep 2010 at 1:09

GoogleCodeExporter commented 8 years ago
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 o.schum...@googlemail.com on 22 Nov 2010 at 8:52

GoogleCodeExporter commented 8 years ago
See this thread: http://geckofx.org/viewtopic.php?id=181

I was able to get this working with the latest version of GekoFX and XULRunner 
SDK 1.9.1.14 which can be found here: 
http://ftp.mozilla.org/pub/mozilla.org/mozilla.org/xulrunner/releases/1.9.1.14/s
dk/

Be sure to completely remove the previous xulrunner files before using these, I 
found that simply replacing the files does not work because certain files are 
left over from the other version which causes issues.

Original comment by muratmoz...@gmail.com on 10 Feb 2011 at 1:21