iframe 中的 Java Applet 无法在 Mac Safari 中加载
对于 Facebook iframe 应用程序,我们加载文件浏览器 Java 小程序。这在 PC 上的所有主要浏览器和 Mac 上的 Firefox 中运行良好。它在 Mac 上的 Safari 中的 iframe 之外也能正常加载。
但是,一旦从 Safari/Mac 中的 iframe 中调用页面,小程序就不会加载。我们确实得到了签名的小程序权限弹出窗口,但之后加载只是旋转,直到超时。
我已经在 Facebook 外部和内部的 iframe 中对此进行了测试,因此我知道这不是 Facebook 问题。还确保 Java 在 Safari 中已启用且是最新的,并且在控制台中没有观察到相关错误消息。
还有其他人遇到过这个问题吗?如果是的话,是否有可以实施的解决方案或解决方法?
更新:下面 Java 控制台的输出。始终挂在 liveconnect 调用的同一位置,不会引发错误。
Java Plug-in 1.6.0_22
Using JRE version 1.6.0_22-b04-307-10M3261 Java HotSpot(TM) Client VM
User home directory = /Users/user
Java Plug-in 1.6.0_22
Using JRE version 1.6.0_22-b04-307-10M3261 Java HotSpot(TM) Client VM
User home directory = /Users/user
network: Loading user-defined proxy configuration…
network: Done.
network: Loading proxy configuration from Netscape Navigator…
network: Done.
network: Loading direct proxy configuration…
network: Done.
network: Proxy Configuration: No proxy
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@da90c, refcount=1
basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@1797795
basic: Loading applet…
basic: Initializing applet…
basic: Starting applet…
basic: completed perf rollup
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Connecting http://[server_address_removed]/testutility10_21_2009_10_27_45.jar with proxy=DIRECT
network: Connecting socket://[server_address_removed]:80 with proxy=DIRECT
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Connecting http://[server_address_removed]/testutility10_21_2009_10_27_45.jar with proxy=DIRECT
network: Downloading resource: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar
Content-Length: 3,686
Content-Encoding: null
security: Blacklist revocation check is enabled
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Connecting http://[server_address_removed]/testutility10_21_2009_10_27_45.jar with proxy=DIRECT
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
BaseApplet:init-complete
applet:start
invoking startup callback testAppletInitialized
liveconnect: JSObject::call: name=open
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@602b6b, refcount=1
basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@18a6e6e
basic: Loading applet…
basic: Initializing applet…
basic: Starting applet…
basic: completed perf rollup
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
network: Connecting http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar with proxy=DIRECT
network: Connecting socket://[server_address_removed]:80 with proxy=DIRECT
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
network: Connecting http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar with proxy=DIRECT
network: Downloading resource: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar
Content-Length: 33,019
Content-Encoding: null
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
security: Loading Root CA certificates from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/security/cacerts
security: Loaded Root CA certificates from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/security/cacerts
security: Loading certificates from Deployment session certificate store
security: Loaded certificates from Deployment session certificate store
security: Loading Root CA certificates from from keychain
security: Loaded Root CA certificates from from keychain
security: Validate the certificate chain using CertPath API
security: Obtain certificate collection in Root CA certificate store
security: Obtain certificate collection in Root CA certificate store
security: Obtain certificate collection in Root CA certificate store
security: jpicertstore.cert.getkeystore
security: No timestamping info available
security: Cannot find jurisdiction list file
security: The CRL support is disabled
security: The OCSP support is disabled
security: This OCSP End Entity validation is disabled
security: Checking if certificate is in Deployment denied certificate store
security: Checking if certificate is in Deployment permanent certificate store
security: Checking if certificate is in Deployment session certificate store
security: Creating MacOSXTrust
security: Evaluating MacOSXTrust
security: MacOSXTrust: cert chain is valid, no explict intent
security: MacOSXTrust: cert chain is valid, keychain explicity requested user confirmation
security: Evaluating trust of site: [server_address_removed]
security: Did not find a trusted site record for: http://[server_address_removed]<ab7662bf>
security: Showing MacOSXTrustSiteDialog
security: User permitted app to continue with priviledges
security: MacOSXTrustUI.evaluateTrustAfterShow: returning GrantThisSession
security: User has granted the privileges to the code for this session only
security: Adding certificate in Deployment session certificate store
security: Added certificate in Deployment session certificate store
security: Saving certificates in Deployment session certificate store
security: Saved certificates in Deployment session certificate store
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
network: Connecting http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar with proxy=DIRECT
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
calling workaround: javascript:testAppletInitialized("1.6.0_22");BaseApplet:init-complete
SingleFileServer23196574: server at http://127.0.0.1:3145
SingleFileServer23196574: server running
XMLSocketServer18107298:server at xmlsocket://127.0.0.1:7711
XMLSocketServer18107298:policy <cross-domain-policy><allow-access-from domain='[server_address_removed]' secure='false' to-ports='7711' /></cross-domain-policy>
applet:init-complete
XMLSocketServer18107298:running
applet:start
SingleFileServer23196574: now serving certificate e848b62e2782e2cef20fe2d075d9e633 at http://127.0.0.1:3145/certificate1290016856751
invoking startup callback
calling workaround: javascript:appletInitialized("http://127.0.0.1:3145","xmlsocket://127.0.0.1:7711","http://127.0.0.1:3145/certificate1290016856751");running on Mac OS X
applet:start-complete
liveconnect: JSObject::call: name=open
For a Facebook iframe app, we load a file browser Java applet. This works fine in all major browsers on PC, and Firefox on the Mac. It also loads fine outside of an iframe in Safari on the Mac.
However, as soon as the page is called from within an iframe in Safari/Mac, the applet will not load. We do get the signed applet permission pop-up, but after that the loading just spins until it times out.
I have tested this in an iframe outside of Facebook, as well as within, so I know it is not a Facebook issue. Have also made sure Java is enabled and up-to-date in Safari, and observed no relevant error messages in the console.
Has anyone else run into this issue, and if so, is there a solution or workaround that can be implemented?
UPDATE: Output from Java console below. Always hangs at the same place on the liveconnect call, no error thrown.
Java Plug-in 1.6.0_22
Using JRE version 1.6.0_22-b04-307-10M3261 Java HotSpot(TM) Client VM
User home directory = /Users/user
Java Plug-in 1.6.0_22
Using JRE version 1.6.0_22-b04-307-10M3261 Java HotSpot(TM) Client VM
User home directory = /Users/user
network: Loading user-defined proxy configuration…
network: Done.
network: Loading proxy configuration from Netscape Navigator…
network: Done.
network: Loading direct proxy configuration…
network: Done.
network: Proxy Configuration: No proxy
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@da90c, refcount=1
basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@1797795
basic: Loading applet…
basic: Initializing applet…
basic: Starting applet…
basic: completed perf rollup
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Connecting http://[server_address_removed]/testutility10_21_2009_10_27_45.jar with proxy=DIRECT
network: Connecting socket://[server_address_removed]:80 with proxy=DIRECT
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Connecting http://[server_address_removed]/testutility10_21_2009_10_27_45.jar with proxy=DIRECT
network: Downloading resource: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar
Content-Length: 3,686
Content-Encoding: null
security: Blacklist revocation check is enabled
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Connecting http://[server_address_removed]/testutility10_21_2009_10_27_45.jar with proxy=DIRECT
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/testutility10_21_2009_10_27_45.jar, version: null]
BaseApplet:init-complete
applet:start
invoking startup callback testAppletInitialized
liveconnect: JSObject::call: name=open
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@602b6b, refcount=1
basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@18a6e6e
basic: Loading applet…
basic: Initializing applet…
basic: Starting applet…
basic: completed perf rollup
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
network: Connecting http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar with proxy=DIRECT
network: Connecting socket://[server_address_removed]:80 with proxy=DIRECT
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
network: Connecting http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar with proxy=DIRECT
network: Downloading resource: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar
Content-Length: 33,019
Content-Encoding: null
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
security: Loading Root CA certificates from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/security/cacerts
security: Loaded Root CA certificates from /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/security/cacerts
security: Loading certificates from Deployment session certificate store
security: Loaded certificates from Deployment session certificate store
security: Loading Root CA certificates from from keychain
security: Loaded Root CA certificates from from keychain
security: Validate the certificate chain using CertPath API
security: Obtain certificate collection in Root CA certificate store
security: Obtain certificate collection in Root CA certificate store
security: Obtain certificate collection in Root CA certificate store
security: jpicertstore.cert.getkeystore
security: No timestamping info available
security: Cannot find jurisdiction list file
security: The CRL support is disabled
security: The OCSP support is disabled
security: This OCSP End Entity validation is disabled
security: Checking if certificate is in Deployment denied certificate store
security: Checking if certificate is in Deployment permanent certificate store
security: Checking if certificate is in Deployment session certificate store
security: Creating MacOSXTrust
security: Evaluating MacOSXTrust
security: MacOSXTrust: cert chain is valid, no explict intent
security: MacOSXTrust: cert chain is valid, keychain explicity requested user confirmation
security: Evaluating trust of site: [server_address_removed]
security: Did not find a trusted site record for: http://[server_address_removed]<ab7662bf>
security: Showing MacOSXTrustSiteDialog
security: User permitted app to continue with priviledges
security: MacOSXTrustUI.evaluateTrustAfterShow: returning GrantThisSession
security: User has granted the privileges to the code for this session only
security: Adding certificate in Deployment session certificate store
security: Added certificate in Deployment session certificate store
security: Saving certificates in Deployment session certificate store
security: Saved certificates in Deployment session certificate store
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
network: Connecting http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar with proxy=DIRECT
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
network: Cache entry not found [url: http://[server_address_removed]/fileutility10_21_2009_10_27_45.jar, version: null]
calling workaround: javascript:testAppletInitialized("1.6.0_22");BaseApplet:init-complete
SingleFileServer23196574: server at http://127.0.0.1:3145
SingleFileServer23196574: server running
XMLSocketServer18107298:server at xmlsocket://127.0.0.1:7711
XMLSocketServer18107298:policy <cross-domain-policy><allow-access-from domain='[server_address_removed]' secure='false' to-ports='7711' /></cross-domain-policy>
applet:init-complete
XMLSocketServer18107298:running
applet:start
SingleFileServer23196574: now serving certificate e848b62e2782e2cef20fe2d075d9e633 at http://127.0.0.1:3145/certificate1290016856751
invoking startup callback
calling workaround: javascript:appletInitialized("http://127.0.0.1:3145","xmlsocket://127.0.0.1:7711","http://127.0.0.1:3145/certificate1290016856751");running on Mac OS X
applet:start-complete
liveconnect: JSObject::call: name=open
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我仍然不知道原因,但我找到了适合我们的解决方法。我意外地发现,如果您重新加载小程序框架,它将第二次加载小程序。一个问题是,如果你做得太快,它就不起作用,所以我添加了 setTimeout 并延迟一秒。这似乎对我们有用。
I still do not know the cause but I have found a workaround that works for us. What I accidently discovered was if you reload the applet frame it will load the applet the second time. One catch was if you did it too fast it would not work so I added setTimeout to it with a one second delay. This seems to work for us.
更新:下面的解决方案无法一致工作;在相同的环境中(Safari 版本、操作系统版本、所有设置都相同),这只在我测试的 4 台 Mac 中的 1 台上有效。仍在寻找一致的解决方案。
我们能够通过修改 Mac OS 中的 Java 首选项来解决此问题:
Mac版本:10.6.5; Safari 版本:5.0.2; Java 版本:1.6.0_22-604-307
UPDATE: the solution below doesn't work consistently; in equal environments (Safari version, OS version, all settings the same), this only has worked on 1 of 4 Macs I tested on. Still looking for a consistent solution.
We were able to resolve this by modifying the Java Preferences in Mac OS:
Mac version: 10.6.5; Safari version: 5.0.2 ; Java version: 1.6.0_22-604-307