Disabling unnecessary capybara-webkit warnings

Any tips on disabling these capybara-webkit warnings?

2015-09-06 14: 15: 38.455 webkit_server [3700: 6222738] Error loading / Users / justin / Library / Internet plugins / Google Earth Web Plug-in.plugin / Contents / MacOS / libnpgeplugin.dylib: dlopen (/ Users / justin / Library / Internet Plugins / Google Earth Web Plug-in.plugin / Content / MacOS / libnpgeplugin.dylib, 265): no matching image found. Found: / Users / justin / Library / Internet Plugins / Google Earth Plug-in.plugin / Contents / MacOS / libnpgeplugin.dylib: mach-o, but an incorrect architecture plugin, NP_Initialize start plugin, NP_Initialize end plugin, NP_GetEntryPoints starts the Private_Initialize plugin , NP_GetEntryPoints end 2015-09-06 14: 15: 38.463 webkit_server [3700: 6222738] Error loading / Users / Justin / Library / Application Support / Facebook / video / 3.1.0.522 / FacebookVideoCalling.webplugin / Content / MacOS / FacebookVideoCalling: dlopen (/ Users / justin / Library / Application Support / Facebook / video / 3.1.0.522 / FacebookVideoCalling.webplugin / Content / MacOS / FacebookVideoCalling, 262): no suitable image found. Found: / Users / Justin / Library / Application Support / Facebook / video / 3.1.0.522 / FacebookVideoCalling.webplugin / Content / MacOS / FacebookVideoCalling: mach-o, but the wrong architecture 2015-09-06 14: 15: 38.493 webkit_server [3700 : 6222738] Unable to find executable for CFBundle 0x7ffd14fcd260 (not loaded) 2015-09-06 14: 15: 38.495 webkit_server [3700: 6222738] Error loading / Library / Internet plug-ins / QuickTime Plugin.plugin / Content / MacOS plugin / QuickTime: dlopen (/ Library / Internet Plug-Ins / QuickTime Plugin.plugin / Contents / MacOS / QuickTime Plugin, 265): no matching image found. You have found: / Library / Internet Plugins / QuickTime Plugin.plugin / Contents / MacOS / QuickTime Plugin: mach-o but the architecture is objc incorrect [3700]: class AdobePDFProgressView is implemented in both / Library / Internet Plugins / AdobePDFViewer.plugin / Content / MacOS / AdobePDFViewer and / Library / Internet Plug-Ins / AdobePDFViewerNPAPI.plugin / Contents / MacOS / AdobePDFViewerNPAPI. One of the two will be used. Which one is undefined. objc [3700]: The ObjCTimerObject class is implemented as in / Library / Internet Plugins / AdobePDFViewer.plugin / Content / MacOS / AdobePDFViewer and / Library / Internet Plug-Ins / AdobePDFViewerNPAPI.plugin / Contents / MacOS / AdobePDFViewerNPAPI. One of the two will be used. Which one is undefined. objc [3700]: the MacCocoaSocketServerHelperRtc class is implemented as in / Library / Internet Plugins / o1dbrowserplugin.plugin / Content / MacOS / o1dbrowserplugin and / Library / Internet Plug-Ins / googletalkbrowserplugin.plugin / Contents / MacOS / goog. One of the two will be used. Which one is undefined.

+5
source share
1 answer

Here is a snippet to prevent warnings from appearing in the console: https://github.com/thoughtbot/capybara-webkit/issues/157 .

Capybara::Webkit.configure do |config| config.block_unknown_urls # <--- this configuration would be lost if you didn't use .merge below end class WebkitStderrWithQtPluginMessagesSuppressed IGNOREABLE = Regexp.new( [ 'CoreText performance', 'userSpaceScaleFactor', 'Internet Plug-Ins', 'is implemented in bo' ].join('|') ) def write(message) if message =~ IGNOREABLE 0 else puts(message) 1 end end end Capybara.register_driver :webkit_with_qt_plugin_messages_suppressed do |app| Capybara::Webkit::Driver.new( app, Capybara::Webkit::Configuration.to_hash.merge( # <------ maintain configuration set in Capybara::Webkit.configure block stderr: WebkitStderrWithQtPluginMessagesSuppressed.new ) ) end Capybara.javascript_driver = :webkit_with_qt_plugin_messages_suppressed 

While this works to hide messages, I believe that the correct way to fix them is to prevent plugins from ever downloading from loading. But I did not understand how to do this with Capybara and webkit.

+5
source

All Articles