Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 433179

Summary: RAP application does not start in Firefox 29
Product: [RT] RAP Reporter: Cristina Petra <petracristina>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: andreas.blochberger, g.roessle, ivan, juan.flores, mknauer, nick.laborera, petracristina, sebastien.arod, swimmer_86, tbuschto
Version: 1.5   
Target Milestone: 2.3 M3   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Cristina Petra CLA 2014-04-22 05:36:33 EDT
I noticed our RAP application does not start anymore using Firefox 29 (currently beta, but soon to be released). I had the same behavior when Firefox 29 was alpha.

We are still using RAP 1.5, but I can reproduce the problem using the RAP online demos:
http://rap.eclipsesource.com/demo/release/rapdemo/examples
http://rap.eclipsesource.com/demo/release/workbenchdemo/workbench
http://rap.eclipsesource.com/demo/release/controlsdemo/controls

I can see client errors using Firebug:
TypeError: this._engineName is null
http://rap.eclipsesource.com/demo/release/rapdemo/rwt-resources/rap-client.js
[...]
Comment 1 Tim Buschtoens CLA 2014-04-22 08:51:44 EDT
The user agent does not seem very different [1], and as of RAP 2.2 the client should not bother anymore if the browser is not detected....

I will download and try it.

[1] http://www.useragentstring.com/Firefox29.0_id_19769.php
Comment 2 Cristina Petra CLA 2014-04-22 09:17:56 EDT
(In reply to Tim Buschtoens from comment #1)
> The user agent does not seem very different [1], and as of RAP 2.2 the
> client should not bother anymore if the browser is not detected....
> 
> I will download and try it.
> 
> [1] http://www.useragentstring.com/Firefox29.0_id_19769.php

I am not sure it has to do with the user agent.
I looked a bit in the client code( Client.js, _initGecko function)
It seems to me that window.controllers is undefined - maybe this can be the cause?

I checked the client code for RAP 1.5, so maybe what I say is not relevant for the latest RAP.
Comment 3 Tim Buschtoens CLA 2014-04-22 09:19:31 EDT
Okay, it crashes for me in the online demo, but not master. Gecko is not detected, but as of RAP 2.2 it should not crash anymore:

421843: [WebClient] Null pointer crash when User-Agent is not recognized

The online demo seems older, even though it should be 2.2.

In any case, gecko is not detected because Client.js uses some weird API that was removed. It does not use the user agent string because nearly all browser write "like Gecko" in there, so those have to be excluded. It should be easy to fix. 

Not sure what to do about RAP < 2.2?
Comment 4 Ivan Furnadjiev CLA 2014-04-23 04:27:45 EDT
Fixed in master with change https://git.eclipse.org/r/25369.
Comment 5 Gregor Roessle CLA 2014-04-29 04:44:17 EDT
I guess that still a lot of users are stuck with RAP version 1.5 up to 2.2 and are not able to quickly update to 2.3M3 or 2.3 when it will be released.
Is there any possible solution to have workaround for Firefox 29 to work with  those older versions?
Can I somehow patch the libraries?
Comment 6 Ivan Furnadjiev CLA 2014-04-29 06:15:08 EDT
The fix is available in the change mentioned in comment #4. This fix should work with RAP 2.2... and probably (but not 100% sure) in older RAP versions.
Comment 7 Tim Buschtoens CLA 2014-04-29 12:11:47 EDT
There is now a workaround for older RAP versions:

https://wiki.eclipse.org/RAP/FAQ#Blank_page_or_client_crash_in_Firefox_29.2B
Comment 8 Ivan Furnadjiev CLA 2014-04-29 13:47:49 EDT
(In reply to comment #7)
> https://wiki.eclipse.org/RAP/FAQ#Blank_page_or_client_crash_in_Firefox_29.2B
Perfect!!!
Comment 9 Gregor Roessle CLA 2014-04-30 02:03:49 EDT
(In reply to Tim Buschtoens from comment #7)
> There is now a workaround for older RAP versions:
> 
> https://wiki.eclipse.org/RAP/FAQ#Blank_page_or_client_crash_in_Firefox_29.2B

Works like a charm!
Thanks a lot!
Comment 10 Yury CLA 2014-04-30 05:37:22 EDT
(In reply to Ivan Furnadjiev from comment #6)
> The fix is available in the change mentioned in comment #4. This fix should
> work with RAP 2.2... and probably (but not 100% sure) in older RAP versions.

Works with RAP 2.1 too.
Comment 11 Nick Lab CLA 2014-05-01 11:01:54 EDT
Have you guys tested the workaround on 1.4.x? It seems to be not working for us.
Comment 12 Ivan Furnadjiev CLA 2014-05-01 13:26:02 EDT
(In reply to Nick from comment #11)
> Have you guys tested the workaround on 1.4.x? It seems to be not working for
> us.

What did you try - branding workaround or integrate the patch set into Client.js?
Comment 13 Nick Lab CLA 2014-05-01 16:29:24 EDT
Integrated it to client.js and that didn't work. I switched to Branding workaround and seems to be working now for FF 29. Thanks a bunch!

However, while testing I discovered that IE 11 doesn't work anymore too... :(

Do you have any suggestion or workaround to have RAP1.4.2 work with IE 11? We can't switch to newer RAP yet. Thanks!
Comment 14 Ivan Furnadjiev CLA 2014-05-01 16:52:34 EDT
(In reply to comment #13)
> However, while testing I discovered that IE 11 doesn't work anymore too... :(
> 
> Do you have any suggestion or workaround to have RAP1.4.2 work with IE 11? We
> can't switch to newer RAP yet. Thanks!
Look at this change - https://git.eclipse.org/r/#/c/21246/. But you have to backport the fix yourself to 1.4.2.
Comment 15 Markus Knauer CLA 2014-05-02 08:32:28 EDT
(In reply to Tim Buschtoens from comment #3)
> The online demo seems older, even though it should be 2.2.

The online demo linked from [1] has been updated to RAP 2.2 stable latest. I don't remember why there were some older bundles in the online demo, but it should be fixed now.

(In reply to Tim Buschtoens from comment #7)
> There is now a workaround for older RAP versions:
> https://wiki.eclipse.org/RAP/FAQ#Blank_page_or_client_crash_in_Firefox_29.2B

Since yesterday the online demos at [1] run with the ApplicationConfiguration workaround (examples demo, controls demo) and the branding workaround (workbench demo). The change is also available in the streams/2.2-maintenance branch.

[1] http://eclipse.org/rap/demos/
Comment 16 Nick Lab CLA 2014-05-02 11:09:55 EDT
(In reply to Ivan Furnadjiev from comment #14)
> (In reply to comment #13)
> > However, while testing I discovered that IE 11 doesn't work anymore too... :(
> > 
> > Do you have any suggestion or workaround to have RAP1.4.2 work with IE 11? We
> > can't switch to newer RAP yet. Thanks!
> Look at this change - https://git.eclipse.org/r/#/c/21246/. But you have to
> backport the fix yourself to 1.4.2.

Thanks Ivan! Adding the changes to org.eclipse.rwt/Client.js seems to be not working for me. Am I missing something?
Comment 17 Yury CLA 2014-05-03 00:25:55 EDT
(In reply to Nick from comment #16)
> (In reply to Ivan Furnadjiev from comment #14)
> > (In reply to comment #13)
> > > However, while testing I discovered that IE 11 doesn't work anymore too... :(
> > > 
> > > Do you have any suggestion or workaround to have RAP1.4.2 work with IE 11? We
> > > can't switch to newer RAP yet. Thanks!
> > Look at this change - https://git.eclipse.org/r/#/c/21246/. But you have to
> > backport the fix yourself to 1.4.2.
> 
> Thanks Ivan! Adding the changes to org.eclipse.rwt/Client.js seems to be not
> working for me. Am I missing something?

Probably you must to compile all *.js into client.js file.
Comment 18 Ivan Furnadjiev CLA 2014-05-03 03:25:12 EDT
(In reply to Yury from comment #17)
> > Thanks Ivan! Adding the changes to org.eclipse.rwt/Client.js seems to be not
> > working for me. Am I missing something?
> 
> Probably you must to compile all *.js into client.js file.
Yes... that's true. ClientBuilder for 1.4 is available here:
https://github.com/ralfstx/rap-clientbuilder/tree/1.4-maintenance
Comment 19 Ivan Furnadjiev CLA 2014-05-05 05:49:51 EDT
*** Bug 434089 has been marked as a duplicate of this bug. ***
Comment 20 Ivan Furnadjiev CLA 2014-05-05 06:17:15 EDT
*** Bug 434001 has been marked as a duplicate of this bug. ***
Comment 21 Nick Lab CLA 2014-05-07 15:27:55 EDT
(In reply to Ivan Furnadjiev from comment #18)
> (In reply to Yury from comment #17)
> > > Thanks Ivan! Adding the changes to org.eclipse.rwt/Client.js seems to be not
> > > working for me. Am I missing something?
> > 
> > Probably you must to compile all *.js into client.js file.
> Yes... that's true. ClientBuilder for 1.4 is available here:
> https://github.com/ralfstx/rap-clientbuilder/tree/1.4-maintenance

It worked. You guys rock! don't stop being awesome... :)
Comment 22 Ivan Furnadjiev CLA 2014-05-14 06:36:58 EDT
*** Bug 434834 has been marked as a duplicate of this bug. ***