SelfRegisterDll Load FAILED with error: Unknown error: -2804

2006-04-08 Thread steve . lu
Hi,

Has anyone seen this type of error before?
This happens when my embedding app tries to AutoRegister XPCOM
components.

This is for MacOSX (10.4) embedding against FF 1.5.0.1 code base.

nsNativeComponentLoader: autoregistering begins.
nsNativeComponentLoader: SelfRegisterDll(libcaps.dylib) Load FAILED
with error: Unknown error: -2804
nsNativeComponentLoader: SelfRegisterDll(libdocshell.dylib) Load FAILED
with error: Unknown error: -2804
nsNativeComponentLoader: SelfRegisterDll(libeditor.dylib) Load FAILED
with error: Unknown error: -2804
nsNativeComponentLoader: SelfRegisterDll(libembedcomponents.dylib) Load
FAILED with error: Unknown error: -2804
nsNativeComponentLoader: SelfRegisterDll(libgfx_mac.dylib) Load FAILED
with error: Unknown error: -2804

Thanks,
Steve

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Embedded browser's form post got split into two tcp packets

2008-03-28 Thread steve lu
Hi All,

While testing my embedded browser (Firefox 2.0.0.6 code base),
I ran across this site that consistently fails.

The site is Flixster.com and it uses cookie to verify the characters in 
an image.
(to counter automatically generated registration requests.).

In my embedded browser, the registration page fails to redirect to the 
next page.
and always return me back to the registration page.

In Ethereal, the difference between embedded browser and Firefox 3.0b4 
is obvious:

Here is the firefox HTTP packet:

// 
Firefox sends out this request:

POST /userAuth.do HTTP/1.1
Host: www.flixster.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4) 
Gecko/2008030714 Firefox/3.0b4
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.flixster.com/userAuth.do?displayRegister=
Cookie: 
__gads=ID=0b6071988ad5dc9c:T=1206125987:S=ALNI_MaCAXfxdS_Y1QcrxCVIIICxO1PFrg; 
__utma=27263211.1571772873.1206125983.1206456579.1206479500.3; 
__utmz=27263211.1206125983.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); 
__qca=1201978530-45995052-21228652; 
JSESSIONID=11D8B46CBA4F6E682DACCE9A6C36F586.localhost; __utmb=27263211; 
__utmc=27263211; __qcb=693699893; testCookie=flixsterWorks; 
captchaCookie=d03596dda6a4d0ad0ebde090dcc94783062be062
Content-Type: application/x-www-form-urlencoded
Content-Length: 237

userauthAction=doRegistercountryName=United+StatesuserauthEmail=s1235%40s1235.comuserauthFirstName=suserauthLastName=sdobMonth=2dobDay=3dobYear=1981hideAge=trueuserauthPassword=1235captcha=ghkbsubmit=Join+Flixster

// ---
Server responds with a redirect:

HTTP/1.1 302 Moved Temporarily
Date: Tue, 25 Mar 2008 21:21:06 GMT
Server: Apache
Expires: Sat, 6 May 1995 12:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, 
pre-check=0
Pragma: no-cache
Set-Cookie: [EMAIL PROTECTED]; Domain=.flixster.com; 
Expires=Wed, 25-Mar-2009 21:21:06 GMT; Path=/
Set-Cookie: loggedInCookie=819299674#{SHA}rBqyPWKIcRvmSiW/E0Mrrx5gsr0=; 
Domain=.flixster.com; Path=/
Set-Cookie: autoLoginCookie=819299674#{SHA}rBqyPWKIcRvmSiW/E0Mrrx5gsr0=; 
Domain=.flixster.com; Expires=Wed, 25-Mar-2009 21:21:06 GMT; Path=/
Location: http://www.flixster.com/inviteDisplay.do?displayInvite=wiz=true
Content-Length: 0
Vary: User-Agent
Keep-Alive: timeout=10, max=100
Connection: Keep-Alive
Content-Type: text/plain; charset=UTF-8

// 


Here is the HTTP packets from the embedded browser:

// 
browser sends out this request:

First packet:

POST /userAuth.do HTTP/1.1
Host: www.flixster.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) 
Gecko/20080327
Accept: 
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.flixster.com/userAuth.do?displayRegister=
Cookie: 
__gads=ID=f7fadabf9f5cabe9:T=1206624044:S=ALNI_MYtK6AlK5ovGVbEvAo47c69NrCN8A; 
__qca=1206587765-19948213-99345422; 
__utmz=27263211.1206624037.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none); 
__utma=27263211.1951460417.1206624037.1206715093.1206717132.10; 
JSESSIONID=3CE1DA814EE697632A7B328EA0F2D930.localhost; __utmb=27263211; 
__utmc=27263211; __qcb=540636320; testCookie=flixsterWorks; 
captchaCookie=41bc1fbea7006d00d13897cafb53041a396f5fb1

Second Packet:

Content-Type: application/x-www-form-urlencoded
Content-Length: 253

userauthAction=doRegistercountryName=United+StatesuserauthEmail=s1242%401242.comuserauthFirstName=suserauthLastName=sdobMonth=1dobDay=13dobYear=1982hideAge=trueuserauthPassword=1242captcha=cmdenewsletter=truesubmit=Join+Flixster+

// ---
Server responds with the original registration page:

HTTP/1.1 200 OK
Date: Wed, 26 Mar 2008 05:51:15 GMT
Server: Apache
Expires: Sat, 6 May 1995 12:00:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, 
pre-check=0
Pragma: no-cache
Content-Language: en
Vary: User-Agent,Accept-Encoding
Content-Encoding: gzip
Keep-Alive: timeout=10, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html;charset=ISO-8859-1

// 

The issue is that the embedded browser's HTTP Request somehow got broken 
into two packets
(while Firefox's HTTP request sits in one packet nicely).

I don't know if this explains why Flixster server fails to redirect the 
embedded browser.
(But it seems to be the only culprit, since the two POST requests are 
almost identical except
the number of 

Re: Embedded browser's form post got split into two tcp packets

2008-03-28 Thread steve lu
Boris Zbarsky wrote:
 steve lu wrote:
   
 While testing my embedded browser (Firefox 2.0.0.6 code base),
 

 Yeah, this is a known issue in Gecko 1.8: the packet boundaries can be a 
   little weird for HTTP (esp over SSL).  We tried to fix it, but sites 
 broke.  We're hoping the changes in 1.9, which were a little more 
 extensive, will lay it to rest.

 -Boris
 ___
 dev-embedding mailing list
 dev-embedding@lists.mozilla.org
 https://lists.mozilla.org/listinfo/dev-embedding

   

I've just tested it with Firefox 2.0.0.12 and it doesn't have this issue.
Is it possible that it has something to do with XULRunner and how it was 
embedded into my app. (in a secondary thread.)?

If I want to debug into the code where these packets are sent, which 
files should I place my break point in?

Thank you for all your help,
Eagerly looking forward to Firefox 3.0.

-Steve

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: Problem with gmail on embedded browser

2008-05-01 Thread steve lu
Does the video loads and play automatically if you visit this page in 
your embedded browser?

http://www.cnn.com/video/#/video/crime/2008/05/01/pkg.pregnant.woman.dui.baynews9

I believe the Gmail issue is caused by not able to write to your cookie 
by the web site (exactly what happened in the CNN video site).

Make sure you compile Gecko with:

ac_add_options --enable-extensions=default,cookie

-Steve


Christopher Blizzard wrote:
 Glen Gray wrote:
   
 So, I'm guessing that somethings going wrong with the javascript/ 
 session but I've no idea how to debug that. So some suggestions are  
 definitely most welcome.

 

 This is a pretty vague bug report and I think that we would need a lot 
 more data to be able to help you.  I guess I would start with a few 
 questions:

 1.  Under the exact same environment does it work fine with an official 
 Firefox 2 release?

 2. Can you trim it down to a very small test case that shows the problem 
 outside of gmail?

 3. Do you have access to a Firefox 3 release and if so does it happen 
 there as well?

 --Chris
 ___
 dev-embedding mailing list
 dev-embedding@lists.mozilla.org
 https://lists.mozilla.org/listinfo/dev-embedding

   

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: How to call the embedding application from the embedded Javascript ?

2008-11-06 Thread Steve Lu

Philippe Torrelli wrote:

Hi there,

 


I'm trying to call a function of my embedding app from the javascript in the
embedded gecko.

This is with the embedding sample from pelle Johansen, and a firefox 3.1
build.
  

The XRE_InitEmbedding functions lets you initialize with static modules
that provides native interface to JS in an embedding app.

Steve



 


I've been successful in calling native code from the javascript but it was
using either the npapi, or using the category manager to make an XPcom
object available from the dom of the embedded browser.

 


What I don't like with both these two approaches is  that the code triggered
is in a separate module

and I want to use the function to consult/update the state of my embedding
app. 

 


I now will try to create and register my xpcom object from the embedding
app, so that I can pass it the data I want from the factory, but it seems
quite a complicated solution .. 

 


Is there a simpler way to register a callback to that will call the
embedding app from the embedded browser ?

 


Any hint appreciated

 


TIA

 


Philippe Torrelli

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding

  


___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: How to get the event when embedded browser close by javascript

2009-01-05 Thread steve lu

sonicfly wrote:

Hi, could you guys tell me how to hook the event or notification when
the embedding browser is going to be closed by javascript in the page.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding

  

class yourEmbeddedBrowser::nsIWebBrowserChrome
{...};

and

nsIWebBrowserChrome::DestroyBrowserWindow()

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: OnStateChange not called when navigating locally?

2009-07-22 Thread steve lu

Prehaps you are casting it to a nsIHttpChannel first?

// don't want to do this
nsCOMPtr nsIHttpChannel  httpChannel = do_QueryInterface( request );


NS_IMETHODIMP Browser::OnStateChange( nsIWebProgress* progress, 
nsIRequest* request,

PRUint32 progressStateFlags, nsresult status )
{
nsCOMPtrnsIURI aURL;
nsCOMPtrnsIChannel aChannel = do_QueryInterface( request );
if (aChannel)
{
result = aChannel-GetOriginalURI(getter_AddRefs(aURL));
if (NS_SUCCEEDED(result))
{
nsEmbedCString str;
aURL-GetScheme(str);
if (str.Equals(file))
{
// loading local file just fine.
}
}
}

Steve

Babele Dunnit wrote:

Hi,

I just discovered that, when clicking on an already-navigated link on
a local (i.e. file://) URI, OnStateChange callback is never called,
and onLocationChange request is always NULL. Is this a bug? Or is this
behaviour related to reading from cache an already clicked link? I
have some important initialization and finalization code in
OnStateChange and it is never called...

___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding

  


___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: How to raise events from plugins and receive it in embedding application?

2009-08-21 Thread steve lu

Look up these interfaces:

nsIObserver and nsIObserverService.

This is how Firefox notify all XPCOM components that it is about to 
shutdown.


Steve


ra wrote:

Hi all,

I have embedded gecko 1.8.1 into a MFC application. There are also
some custom XPCOM plugins. The plugins should send events to the
embedding application. Any documentation, samples, hints for code
reading telling me how to do this are welcome.

regards,
Rainer
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding

  


___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding


Re: unable to write in textbox/text area

2009-12-14 Thread steve lu


Did you do this?

nsCOMPtr nsIWebBrowserFocus  focus( do_GetInterface( mWebBrowser ) );
focus-Activate();

Steve



testols ols wrote:

On Dec 11, 4:23 pm, testols ols testing...@gmail.com wrote:
  

I have embedded Xulrunner into my native application. The webpage
opens up in xulrunner browser and renders the html page correctly.
However the browser is not letting me to enter text into the text
fields or text area. Is there anything specific required for letting
the user enter text.



*
Xianzhu Wang to me, dev-embedding

Which version of xulrunner are you using?
If 1.9.2, it seems this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=533245
**

I put a breakpoint at nsEventStateManager.cpp
function nsEventStateManager::PostHandleEvent
 at lines case NS_KEY_DOWN:
  case NS_KEY_UP:
and function nsEventStateManager::PreHandleEvent
 at line case NS_KEY_PRESS:

But the control is not stopping at breakpoints. Strange :(
However the cases concerned with mouse events are caught properly.

Someone please help me.
___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding

  


___
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding