Chrome plugin process - npapi plugin - plugins

I'm writing an npapi plugin in Qt. My plugin works perfectly on firefox and opera. The problem in chrome i guess is regarding the "process-per-plugin" setup. What happens is, when i first open a page, the plugin is injected and all works as per expected. But when i navigate from that page to another one, in the new page, the plugin seems to get injected but even its constructor isnt called.
To examine the issue, I tried killing my plugin process via the chrome task manager before i navigate to the new page. When i do this, the plugin works as expected in the 2nd page too. I'm unable to comprehend what is happening here. Any help would be appreciated.
Thanks

The creation and destruction of browser plugin depends on the browser. So if your constructor is not being called means that your plugin has not been destroyed. So you have to handle your object construction and destruction in plugin's window attached and window detached events.

Related

Chrome Devtools empty file-list

I need to inspect the website but my scripts are not listed.
I already tried to uninstalled chrome and resintalled it again.
If I pause javascript and trigger any javascript action it opens a VM-version of jquery but I need the real file, not the vm-loaded one.
Any idea?
A but or not?
Any workaround?
Following the discussion from the comments above, the issue was unrelated to the web app but the environment in which the Chrome instance was run in. It was likely a Chrome Extension or modified setting that caused this misbehaviour.
The resolution was to create a new Chrome Profile, since extensions and settings are not shared between profile instances. The next step may be to identify the particular extension or plugin at fault to avoid this happening again.

firebreath plugin refresh after update

I want to reload a plugin after update without restarting browser. I tried the mac version, it works fine, howeve, I need to change the plugin name for each version.
navigator.plugins.refresh(false);
http://www.firebreath.org/display/documentation/Deploying+and+updating+your+plugin?focusedCommentId=8585308#comment-8585308
In windows, I tried those steps and I couldn't make it work. Has anyone had any luck with this? Does anyone know what could be wrong?
"On Windows you even need to install it to a version-specific directory with a version-specific filename. Once the plugin is installed, you can try the following to reload the plugin in open browsers
<script>
var myplugin = "<object id=\"plugin\" type=\"application/x-foobar\"> </object>";
function onload(){ // Assuming this function put your plugin on the page in the first place
document.getElementById('pluginHere').innerHTML = myplugin;
}
function reload(){
document.getElementById('pluginHere').innerHTML = "";
document.getElementById('pluginHere').innerHTML = myplugin;
}
</script>
thanks alot.
This is a difficult trick that can go wrong in a lot of different ways. It's difficult for me to guess what might be going wrong specifically, particularly since you said "on windows", but you haven't specified what browser that is. All of the browsers work differently in subtle ways and IE and the others are completely different as far as this goes.
Things you could try:
use setTimeout to add a small delay between removing the plugin from the DOM and re-adding it
open about:plugins and then shift-refresh to see if it picks up the new version
Try different browsers and see what the behavior is
Use Process Monitor to monitor the queries of the registry and see when the registry keys are being accessed; use this to help plan your strategy.
Anyway, I hope some of that helps; I used to upgrade that way but it was too error prone and too prone to things changing with new browsers, so these days I just make the client restart their browser on upgrades. It saves a lot of hassle and lots of development time.
I use a signed CAB with MSI inside to load the plugin on internet explorer.
On the first time install I found that the plugin can be accessed from Javascript but events were not working.
When I looked at loaded plugins, the plugin was not loaded.
If I refreshed the page the plugin is loaded.
my solution was to add the following code from this stack overflow question
One time page refresh after first page load
This worked like a charm.

Waiting mouse cursor in my GWT application stays infinitely (only in Chrome, only in Production)

Could you please tell me why I have waiting mouse cursor in my gwt application as if page not fully loaded ? It doesn't happen on dev server. It only happens in production. Also it's happening in Chrome but doesn't in IE.
Link to my app is here.
Screenshot
I checked it again in Chrome, but for me no wait cursor is Displayed. But i think, your Google Chrome is trying to open the Google Translate Menu. For me it came quickly and the page loading stopped and the mouse was at normal position.
I prefer you try updating your chrome.
I have also checked the same in my co-workers Laptop and its working fine too.
If problem still persists, please use CCleaner Software and clear all Temporary files, Browser Cache, Recent files etc. Why because, GWT creates a lot of temporary files which may reduce your system performance. So after each cleaning, just restart the system also. I had few such resolutions recently.
I opened your link in Firefox and got the following error
ERROR: Possible problem with your *.gwt.xml module file. The compile
time user.agent value (safari) does not match the runtime user.agent
value (gecko1_8). Expect more errors
This is because, you have compiled your code for Webkit browsers only. If you have added a line as below in your gwt module xml file,
<define-property name="user.agent" values="ie6">
you may either remove it or you can add more browser support via this.

Debugging amf remote calls (from flex 4) in PHP Eclipse

I have installed and setup xdebug to debug php application. However I was wonder is it possible to debug the remote calls? I am using amfphp, I want to put break points and debug the code when the flex application calls the service. Is it possible? how to do it? Or Is there any way to simulate remote call called from flex 4 withing eclipse?
Thanks in Advance
[edit]
I have used xdebug pugin for firefox and chrome extension but both seems not working after I have installed them. Basically there is no hint/clue/document explaining how to use them, sadly. Can any one help?
Ok, I have downloaded https://addons.mozilla.org/en-US/firefox/addon/easy-xdebug/ for firefox and I had no clue on how to use it but I realized that I have removed the plugin bar which I usually disable/hide. I enabled that plug-in bar and it started appearing on the bottom of the browser and now i am able to debug :)
Any way I have found chrome extension as well https://chrome.google.com/webstore/detail/eadndfjplgieldjbigjakmdgkmoaaaoc but i yet to figure out how to enable that, because it says the extension button will appear in the context and I have no clue when that comes. May be when I set chrome as default browser and it will pick up when flex launches the app. let me see

NPRUNTIME plugin not loading in chrome,works fine with FF-3.6

I have modified my existing code to support npruntime to be used with FF-3.6 and above.
It loads and works perfectly fine with firefox 3.6 and above but chrome is not able to load the plugin (though its able to detect plugin) and gives "Missing Plugin" error.
anyone having clue about what can be the issue here ?
When you say that it can detect the plugin, do you mean it shows up in chrome://plugins? If so, is the MIME type you expect listed under its details?
The missing plugin error can show up if the plugin crashes during initialization, in addition to showing up if no plugin is found at all, so if everything looks right in chrome://plugins the next step would be to attach with a debugger during plugin initialization using the --plugin-startup-dialog flag.