Bug 24912 - [Linux] Webkit incompatible with Java plugins
Summary: [Linux] Webkit incompatible with Java plugins
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Linux
: P2 Major
Assignee: Nobody
URL:
Keywords: Gtk
Depends on:
Blocks:
 
Reported: 2009-03-28 06:16 PDT by Samuel Creshal
Modified: 2010-04-18 10:08 PDT (History)
12 users (show)

See Also:


Attachments
Add WebKitWebSetting to enable/disable Java plugin support. (5.80 KB, patch)
2010-02-17 02:04 PST, Xan Lopez
no flags Details | Formatted Diff | Diff
resolvesymlinks.diff (4.93 KB, patch)
2010-02-17 03:27 PST, Xan Lopez
no flags Details | Formatted Diff | Diff
createjavaappletwidget.diff (2.55 KB, patch)
2010-02-17 03:51 PST, Xan Lopez
no flags Details | Formatted Diff | Diff
npversion.diff (7.06 KB, patch)
2010-02-17 04:34 PST, Xan Lopez
xan.lopez: commit-queue-
Details | Formatted Diff | Diff
npversion.diff (6.50 KB, patch)
2010-02-17 05:12 PST, Xan Lopez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Creshal 2009-03-28 06:16:50 PDT
None of the Java plugins available for linux (x64) seems to be compatible with WebkitGtk, you get error messages like "libjavaplugin.so: Undefined symbol: NP_GetValue" when trying to load them.
Comment 1 javier 2009-06-10 10:06:42 PDT
I have midori and libwebkit installed under arch-linux, and right now it looks like the sun java plugin gets recognized.  Actually when looking at "Tools -> Netscape plugins" I can see the sun java one information...

The problem is that even though that, when going to java.com, and trying to detect the java support, it doesn't get detected, and when going to other web pages requiring java support, they fail (such as my bank one)...

So I believe there's still problems, but not the same...  Versions on archlinux:

midori 0.1.7-1
libwebkit 1.1.8-2
Comment 2 javier 2009-06-13 15:01:10 PDT
Hmm, well my previous comment stands for x86_64.  For i686, midori browser just crashes...
Comment 3 cihat ertem 2009-07-11 14:32:03 PDT
I have the same problem with midori and webkit(midori 1.7.0-0, webkit 1.1.10-1). I am using ubuntu 9.04 64bit and both sun-java6-plugin and icedtea6-plugin seem useless when testing java versin in http://www.java.com/en/download/help/testvm.xml and http://www.javatester.org/version.html. I had opened a ticket at midori buglist/forum and they answered to me the problem was about webkitgtk. well, I see there is the problem for 4 months and it is still as "UNCONFIRMED" and no answer.

thanks and kind regards
Comment 4 javier 2009-07-11 14:48:06 PDT
Well, with libwebkit 1.1.10-1 now the i686 behavior matches the x86_64 one.  Too bad still no java support though...

thx,
Comment 5 Maciej Piechotka 2010-01-28 20:33:24 PST
With webkit 1.1.19 and icedtea6-1.7:
Information that java failed to start:
** (epiphany:26620): DEBUG: NP_Initialize
** (epiphany:26620): DEBUG: NP_Initialize succeeded
** (epiphany:26620): DEBUG: NP_Initialize
** (epiphany:26620): DEBUG: NP_Initialize succeeded
[XPCOM] Failed to get the service manager
** (epiphany:26620): DEBUG: NP_Initialize
** (epiphany:26620): DEBUG: NP_Initialize succeeded
/var/tmp/paludis/dev-java-icedtea6-1.7/work/icedtea6-1.7/plugin/icedteanp/IcedTeaNPPlugin.cc:1427: thread 0x262cde0: Error: Failed to spawn applet viewer: Failed to execute child process "/usr/share/java-config-2/nsplugin/../../bin/java" (No such file or directory)
** (epiphany:26620): DEBUG: NP_Initialize
** (epiphany:26620): DEBUG: NP_Initialize succeeded
[XPCOM] Failed to get the service manager
** (epiphany:26620): DEBUG: NP_Initialize
** (epiphany:26620): DEBUG: NP_Initialize succeeded
** (epiphany:26620): DEBUG: NP_Initialize
** (epiphany:26620): DEBUG: NP_Initialize succeeded
[XPCOM] Failed to get the service manager
/var/tmp/paludis/dev-java-icedtea6-1.7/work/icedtea6-1.7/plugin/icedteanp/IcedTeaNPPlugin.cc:1427: thread 0x262cde0: Error: Failed to spawn applet viewer: Failed to execute child process "/usr/share/java-config-2/nsplugin/../../bin/java" (No such file or directory)

It works ok with firefox.

With webkit 1.1.19 and icedtea 1.6:
Just:
alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason."
Comment 6 Xan Lopez 2010-02-17 02:04:31 PST
Created attachment 48873 [details]
Add WebKitWebSetting to enable/disable Java plugin support.
Comment 7 Xan Lopez 2010-02-17 03:27:14 PST
Created attachment 48883 [details]
resolvesymlinks.diff

Resolve symlinks when loading plugins as modules.
Comment 8 Xan Lopez 2010-02-17 03:51:05 PST
Created attachment 48886 [details]
createjavaappletwidget.diff

This implements the createJavaAppletWidget, which turns out to be relevant here. Who could have guessed.
Comment 9 Xan Lopez 2010-02-17 04:34:34 PST
Created attachment 48892 [details]
npversion.diff

Make the supported NP version backend dependent to avoid insta-crash in the Java plugin.
Comment 10 WebKit Review Bot 2010-02-17 04:39:27 PST
Attachment 48892 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebCore/plugins/gtk/PluginPackageGtk.cpp:149:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
WebCore/plugins/win/PluginPackageWin.cpp:338:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
WebCore/plugins/symbian/PluginPackageSymbian.cpp:177:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
WebCore/plugins/mac/PluginPackageMac.cpp:305:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
WebCore/plugins/wx/PluginDataWx.cpp:78:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
WebCore/plugins/qt/PluginPackageQt.cpp:146:  Place brace on its own line for function definitions.  [whitespace/braces] [4]
Total errors found: 6


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 Xan Lopez 2010-02-17 05:12:00 PST
Created attachment 48897 [details]
npversion.diff

Should fix the style warnings.
Comment 12 Gustavo Noronha (kov) 2010-02-17 05:30:32 PST
Comment on attachment 48883 [details]
resolvesymlinks.diff

I should get credit for this part =P lol
Comment 13 Gustavo Noronha (kov) 2010-02-17 05:34:52 PST
Comment on attachment 48897 [details]
npversion.diff

I feel we're invading NPAPI's territory by using the NP prefix here. What do you think of supportedNPVersion?
Comment 14 Xan Lopez 2010-02-17 05:46:36 PST
Comment on attachment 48873 [details]
Add WebKitWebSetting to enable/disable Java plugin support.

Landed as r54886.
Comment 15 Xan Lopez 2010-02-17 05:47:11 PST
Comment on attachment 48883 [details]
resolvesymlinks.diff

Landed as r54887 giving credit to Gustavo :)
Comment 16 Xan Lopez 2010-02-17 05:47:32 PST
Comment on attachment 48886 [details]
createjavaappletwidget.diff

Landed as r54888.
Comment 17 Xan Lopez 2010-02-17 05:51:17 PST
CCing Maciej in case he wants to have a look at the versioning patch.
Comment 18 Eric Seidel (no email) 2010-02-17 14:32:50 PST
I'm confused, given the number of patches on this bug, if there is still action needed her or not?
Comment 19 Eric Seidel (no email) 2010-02-17 14:33:59 PST
Comment on attachment 48897 [details]
npversion.diff

Looks OK.
Comment 20 Xan Lopez 2010-02-18 00:27:50 PST
Comment on attachment 48897 [details]
npversion.diff

Landed in r54940.
Comment 21 Xan Lopez 2010-02-18 00:28:22 PST
All patches landed, closing bug.
Comment 22 Alexey Proskuryakov 2010-02-18 10:06:25 PST
+        uint16 NPVersion() const;

Why isn't this static?

> I feel we're invading NPAPI's territory by using the NP prefix here. What do
> you think of supportedNPVersion?

The NPVersion() function name also violates WebKit style.
Comment 23 Xan Lopez 2010-02-18 10:17:10 PST
(In reply to comment #22)
> +        uint16 NPVersion() const;
> 
> Why isn't this static?

Yeah, I actually thought of this, not sure why I didn't do it. I agree it makes sense.

> 
> > I feel we're invading NPAPI's territory by using the NP prefix here. What do
> > you think of supportedNPVersion?
> 
> The NPVersion() function name also violates WebKit style.

So what about 'supportedVersion'? Or 'supportedNPVersion' as Gustavo says?
Comment 24 javier 2010-04-18 10:08:37 PDT
Hi, I'm using right now:

local/libwebkit 1.2.0-1
local/midori 0.2.4-1
local/jre 6u20-1

I think webkit 1.2.0 already grabbed the fixes on this bug, since before when trying to detect the java plugin on java.com with midori (webkit-gtk) was not possible.  Now it is, and the right version of the plugin is found by java.com.

While som things are working, still some are not.

The bank I have my accounts under uses something they call "virtual keyboard", it's a java applet which allows entering the letters of the password through the keyboard, but the numbers need to be button pressed by the mouse.  The applet shows up, and one can enter the password, but when pressing enter, it never gets to grant access to the bank account, although there's no error reported.  With firefox and the same version of the plugin, I have no problems at all.

The other issue I'm phasing is that under a corporate firewall, with firefox the java plugin is detected with no problem.  However with midori (webkit-gtk) the plugin is never detected, as the prior to these fixes behavior.  The java support should also be granted under a firewall.

I'm taking advantage the bug hasn't been closed, even though it says it's resolved/fixed.

Could any one look into these issues?  I know the bank account one is hard to reproduce since most people won't have a bank account under "www.bncr.fi.cr", but hey, I'm hoping some other similar applets might also be failing...

Also, is it recommended to open new bugs, or move this one to open, or perhaps just hope the issues are to be addressed with this same one?