NPAPI plugin problems in Windows 7 - javascript

I have a NPAPI plugin which I have written and been using for some time with Firefox 3.x with no problems.
The object is defined as follows -
<object class="someClass" id="pluginobj" type="application/x-plugintype"></object>
I then call methods on it using the following format -
if( document.getElementById("pluginobj") != null )
{
document.getElementById("pluginobj").someMethod(someParams));
}
This is how I understand it should be done and has always worked fine. However, I recently installed this same plugin on a Windows 7 machine (with the same version of Firefox) and it now fails to find the functions defined in the plugin, so I get the following error -
Error: document.getElementById("pluginobj").someMethod is not a function
Nothing has changed at all within the plugin, this errors occurs for any method that is called, not a particular one, and it still works fine on Windows XP machines with no problems.
Very confused! Could anyone help? Thanks.
Note: I've also tried logging inside my plugin and it appears it's not even getting in to the NP_Initialize and NP_GetEntryPoints methods.
I have seen some suggestions around that it could be to with dependencies and libraries being linked to the plugin, but i'm not sure what could be missing on win 7?
Dependency Walker is showing a error saying that the "side-by-side configuration information is incorrect"?

Are you linking to other DLL files from your npapi plugin? Windows 7 works differently in how it finds DLL files, though I don't know the details. The times I've seen this with plugins in the past the problem was that on windows 7 one of the dll files couldn't be found. You could try copying dependency dll files to your system32 directory (not permanently, just to see if that's the issue). I would expect that there it would be able to find it.
If that's the issue, I unfortunately am not certain how to fix it, but it might help.
Another possibility based on the side-by-side configuration issue thing is that your visual studio project is creating a manifest that is telling windows that it requires a specific version of one of the DLLs that isn't there on windows 7. See: http://buffered.io/2008/05/17/resolving-side-by-side-configuration-issues/
I think I've resolved that issue in plugins before by disabling the manifest. I'm not sure; I've never had this issue with the way that FireBreath generates npapi plugin dlls, so I haven't needed to worry about it in the last year. You might consider looking at FireBreath, which works on both IE and Firefox (activex and npapi) and has a very good community for tracking down issues like this.

Related

Polymer 2.0 webcomponents-loader.js is missing Edge polyfill

We currently updated a project from Polymer 1 to the Polymer 2/ hybrid version.
I know that webcomponents-hi-sd-ce.js is the polyfill for edge.
When testing the page on Microsoft Edge I now get an error indicating that webcomponents-hi-sd-ce.js.map could not be found (404).
The same error occurs when loading the project with webcomponents-lite.js
I couldn't find similar cases so I figured this might be a issue in Polymer 2. I tried importing the script directly by myself but that didn't help either.
I would appreciate if someone could help me out here or share his experience with a similar problem.
The exact error from Edge v.38:
HTTP500 + for some reason the file path is shown incorrect even though it is actually right in my folder.
https://..../bower_components/webcomponentsjs%20[synthetic:util/global]
Debugging the loader, I've found the following issue:
For each absent native platform feature (as determined by the loader) an acronym will be appended to the polyfill URL.
Unfortunately, for some combinations of features—-as with MS Edge—-the resulting path is unavailable.
This might have been resolved meanwhile, but I've moved on to just using webcomponents-lite (since we're only supporting Edge).
There seems to be an issue with webcomponentsjs (version ~1.0), that applies to webcomponents-loader and webcomponents-lite. It should work whenever you load the app with F12-Tools closed.
See https://github.com/PolymerElements/polymer-starter-kit/issues/1025 for details, especially July 27th's comment.
you should use the webcomponents-loader like so
<!-- Load polyfills; note that "loader" will load these async -->
<script src="bower_components/webcomponentsjs/webcomponents-loader.js"></script>
also a missing map file should actually be no problem as this is "just" used while debugging to see "readable" code instead of the compressed version.
also depending on your Edge version you may need to transpile your code to es5 using polymer build.

Breakpoints not hit in javascript files in Visual Studio

I am experiencing some weird behaviors when debugging my MVC Web Application. Some days I experience these issues, but other days everything works fine.
The breakpoints in my javascript files are not getting hit. I get the dreaded "The breakpoint will not currently be hit. No symbols have been loaded for this document." error.
The debugger will detach from the process without me clicking the Stop Debugging button.
I have tried everything I can think of including:
Refreshing the page in IE to force the browser to get the latest version of the javascript files.
Clean / Rebuild the application in Visual Studio
Close / Reopen Visual Studio
Delete all files from bin and obj folders and rebuild
Cleaned up all old sites from my IIS Express applicationhost.config file
Installed VS2013 Update 4
Deleted / Reinstalled VS2013
Removed / Added IE11
Installed VS2015. Same behavior as VS2013
Deleted all local project files and performed a "Get Latest" from TFS
I can manually attach the debugger to an iexplore process and then I'm able to debug that specific file, but it seems like there is a different iexplore instance for each javascript file. I end up having to guess which one to use for each javascript file. To top it off, the debugger keeps detaching in the middle of me trying to find the right process to attach to. It is nearly impossible, and definitely not feasible to try and debug this way.
Our solution is in TFS, we're using IS Express and the three other developers on our team have none of the problems I have. We all have the exact same hardware.
Another clue that might help is that we are using the OWIN functionality to connect to ACS for security. If I bypass authentication through OWIN / ACS I can step into the javascript. This, however, creates other problems since the code is expecting me to be authenticated. This is not an acceptable workaround and, again, the other developers on the team are using OWIN/ACS and do not have any problems.
I'm extremely frustrated and at a loss for how to go about figuring our what is wrong with my environment. Any help will be greatly appreciated.

Cordova cordova.plugins is undefined on win8 but not on iOS

I'm using the plugin fileopener2 and to use it, I must call cordova.plugins.fileopener2.open(...);
When I run this on iOS, everything works perfectly. However, when I run the app on win8, I get an error telling me that cordova.plugins is undefined. Also, I double checked that, after 'ondeviceready' is fired, I console.log the value of cordova.plugins and it indeed returns an undefined value. Can anyone point me as to how I can fix this issue?
For Cordova Windows8 applications (or all applications built with Visual Studio), if your plugin is a custom one (I would assume it's not part of the org.apache...), you have to manually add it. Go to the config file in your www through visual studio. You will see three tabs: Core/Custom/Installed. Go to Custom, go to your cordova project, then in the plugins, find your custom plugin and add the folder of the plugin and voila, it will work!
If you are running into a problem with the plugin not working for a specific platform but working correctly for other platforms, first verify the plugin supports that platform. If the platform is supported, you should contact the plugin author which can generally by done by filing an issue at their GitHub site.
Ex: https://github.com/pwlin/cordova-plugin-file-opener2/issues
Projects created using Visual Studio 2015 are standard Cordova CLI projects. They author may not have Visual Studio, but should be able to reproduce your problem using the command line if you provide them the Cordova version you used (4.3.0 is the default as of VS 2015 RC) and good repro code.

PhpStorm and JavaScript: I'm getting "Cannot find declaration to go to"

I'm playing with my simple NodeJS project in PhpStorm and suddenly the control-click navigation stopped working. When I click on a required file path, I just get message Cannot find declaration to go to. For example:
var Controller = require('./lib/Controller');
The file is definitely there as the program runs without problems. And if I control-click some global function or object (like "require" itself), the navigation works, the definition of the function/object is opened.
It affects now all my NodeJS/JavaScript projects. Is it possible that I simply disabled some kind of code analysis?
I have recently upgraded from PhpStorm 7 to EAP (to get grunt support) and then to 8.0.1. The problem appeared somewhere during the upgrades. I just can't tell exactly when.
The problem was that the NodeJS plugin was disabled and in my case marked as "incompatible" with current PhpStorm version. Apparently, NodeJS is necessary for navigation through require statements.
It wasn't possible to update the plugin for some reason, so I simply reinstalled it and the problem was fixed.

ASP.NET fails to detect IE10 causing _doPostBack is undefined JavaScript error

ASP.NET fails to detect IE10 causing the following error:
_doPostBack is undefined JavaScript error
or maintain FF5 scrollbar position.
There is a bug in the browser definition files that shipped with .NET 2.0 and .NET 4, namely that they contain definitions for a certain range of browser versions. But the versions for some browsers (like IE 10) aren't within those ranges any more. Therefore, ASP.NET sees them as unknown browsers and defaults to a down-level definition, which has certain inconveniences, like that it does not support features like JavaScript.
The fix available at http://support.microsoft.com/kb/2600100 for Win7 SP1, is not working for me. Please help me on this.
My working environment is:
.NET Framework 3.5 SP1, Windows Server 2003
Try installing the Browser Definition Files from NuGet http://nuget.org/packages/App_BrowsersUpdate into your project. Browser Definition files for ASP.NET 4 are compatible with ASP.NET 3.5, so you should be okay. You may have had an issue installing the hotfix you mentioned if you do not have the appropriate permissions on your machine.
if you continue to have this issue, there is a small code snippet you can add to your global.asax that will resolve the problem as a temporary workaround until you have your server(s) patched.
http://ronniediaz.com/2013/02/07/ie10-imagebutton-_dopostback-undefined-bug-with-update-panel-script-manager/
The KB 2600100 hotfix were replaced by Microsoft .NET Framework 4 Reliability Update 2 (KB2600217) http://support.microsoft.com/kb/2600217 - the documentation states that this update resolves 7 issues including two that you mentioned. But it seems that you need to use Microsoft .NET framework 4 instead of 3.5. If the KB 2600100 hotfix is not working, you might want to check IIS Server Manager to find out what .NET framework version is being used for running your web site.
First temp fix I applied to our websites is adding to the master pages.
But I don't want to force this mode for the rest of the sites lifetime, I want a decent solution. I removed the fix in the master page, installed hotfix from KB2600100, but problems didn't disappear.
Applied the script from Ronnie's link, that did the trick.
Still, I'm wondering why the hotfix didn't help.

Categories

Resources