NPAPI Plugin not loaded on chrome

后端 未结 2 1076
遥遥无期
遥遥无期 2021-01-16 13:02

I have a npapi plugin composed of a dll and manifest.json file. This npapi dll is detected as plugin on chrome ie it is listed on about:plugins page. However, when I invoke

相关标签:
2条回答
  • 2021-01-16 13:30

    With the information you have provided it is impossible to say for sure, but I would guess it is one of two things:

    1. Your plugin may have an external dependency that isn't being found. If you are linking to another library that requires a .DLL file (or if you're using /MD for the DLL version of the CRT) and the DLL can't be found when the browser tries to load the plugin DLL then your plugin will silently fail to load

    2. Your plugin DLL may be loading but then throwing an exception, incorrectly handling things, etc in such a way that the browser decides that it isn't a valid plugin. Most likely this isn't the case, since Chrome usually reports something like that as a crash, not a missing plugin. You can verify this, though, by starting Chrome with the command line argument --plugin-startup-dialog, which will cause a dialog with the pid to pop up before the plugin DLL is loaded. You can then attach a debugger and tell it to continue.

    OF those two, the first is by far the most common issue I see. You can troubleshoot it by getting Dependency Walker (depends.exe) and opening the DLL in-place to see what is missing. If you see ieshims.dll ignore it -- it always thinks that's missing, but finds it when the browser is running.

    More tips on debugging plugins can be found at http://npapi.com/x/MYAG and of course if you're not already I'd recommend using the FireBreath framework which solves most NPAPI problems you may run into for you.

    Good luck!

    0 讨论(0)
  • 2021-01-16 13:35

    You have to define MIME type in the plugin .rc file. Failing to do this prevent the plugin to load properly :

    VALUE "MIMEType", "application/myapp"

    0 讨论(0)
提交回复
热议问题