osx - Fail to load NPAPI plugin in Google Chrome on Mac OS X -


I try to successfully load Google Chrome (6.0.401.1 Dev) on Mac OS X without loading a NPIPI plugin I am away I am working around NPS example here.

On GCC windows on Mac and VC ++ 2008, I managed to run it on Mac OS X and Firefox on Safari and Firefox and Google Chrome on Windows, but not on Google Chrome in Mac OS X.

While trying to debug Google Chrome on Mac OS X, it seemed that the plug-in is loaded on Google Chrome startup (and immediately dealloded-unloading), but without actually having the plugin By checking any symbol within or by calling any function. It seems that for every plug-in, though.

In addition, while loading a page with an embed tag for plug-in, Google Chrome did not even have to load the plug-in and there was no function called (NP_GetEntryPoints too) ) Google Chrome also does not output any error messages, it simply does not load the plugin. I'm not sure that because of Google Chrome I have been caught using different processes, but I have all the switches like - no-sandbox , - tried single process and - plugin-startup-dialog (which coincidentally does not work at all on Mac OS X). I also made sure that the structure of binary matches (i.e. 32-bit for Google Chrome).

Do anyone have similar problems?

"itemprop =" text ">

I The problem of further investigation is that the Localized.r of npsimple is only a list of MIME types in the ID 128 entry, and it is considered to be a MIME type / file extension pair WebKit and Geeko apparently do not have the file entry entry to the last entry , But Chromium does not.

There are two ways of working your plugin in Chromium for Mac:

  1. New information to declare a mime type is the best way of plist style, which is described in the "Registering Your Plugin" section; It is supported by Firefox 3.5+, Safari, and Chrome; You can leave the resource as a fallback for browsers.

  2. If you want to use only resources, you can add an empty file extension by changing the MIME declaration In the entry line Localized.r:

    "Application / X-Wide-AppLice-ef", ""

Keep in mind that on some browsers (Including Chromium) is likely to abandon support for the old resource-based method in the near future, so I strongly encourage going to Option 1.

(Of course this is a bug in Chromium that does not handle it, but it's a great way to do it by other browsers, but after being degraded by this method, and it actually deploys any There is no problem with the plugin, it is unlikely to be very bad.)


Comments