execute code on uninstall

1,497 views
Skip to first unread message

FM

unread,
Nov 30, 2010, 12:17:37 AM11/30/10
to Chromium-extensions
Hi I am trying to send a message to our server on an uninstall event.

I currently am using this code which is not working. The install
events are working correctly. And i find this scenario hard to debug
since the console output gets cleared and refreshed during this
process.

chrome.management.onUninstalled.addListener(function(id) {

if(localStorage[id] == "ourExtensionName") {
... some request....
}
});

any help is appreciated, thanks

Ben

unread,
Nov 30, 2010, 12:38:29 AM11/30/10
to FM, Chromium-extensions

FM

unread,
Nov 30, 2010, 1:15:14 AM11/30/10
to Chromium-extensions
Ok, im kinda already doing that. I am getting other extension's
uninstall events for sure, but I dont think I am getting my
extension's uninstall event, or for some reason chrome is killing the
request I am making to my server to register the uninstall.

Could either of those possibilities be true ? also does anyone know of
a better way to debug the uninstall event. Right now I have another
extension that just prints the console when it catches one of the
events. But i havent found a way to debug my own extensions uninstall
event ?

thanks

On Nov 29, 9:38 pm, Ben <benjo...@gmail.com> wrote:
> On Mon, 29 Nov 2010 23:17:37 -0600, FM <fm.produkti...@gmail.com> wrote:
> > Hi I am trying to send a message to our server on an uninstall event.
>
> > I currently am using this code which is not working. The install
> > events are working correctly. And i find this scenario hard to debug
> > since the console output gets cleared and refreshed during this
> > process.
>
> > chrome.management.onUninstalled.addListener(function(id) {
>
> >     if(localStorage[id] == "ourExtensionName") {
> >          ... some request....
> >     }
> > });
>
> > any help is appreciated, thanks
>
> See this thread[0] and, specifically, this message[1].
> (though, I'm not sure if they still apply to this case)
>
> [0]http://groups.google.com/a/chromium.org/group/chromium-extensions/bro...
> [1]http://groups.google.com/a/chromium.org/group/chromium-extensions/msg...
>
> --
> Ben

PhistucK

unread,
Nov 30, 2010, 3:02:43 AM11/30/10
to FM, Chromium-extensions
There is no way to track uninstall operations of your own extension with the current APIs.

You can try and use NPAPI and create a watching process that will ping the NPAPI plugin and once it does not ping anymore (and the Chromium browser is not active at all), it means that the extension was either disabled or uninstalled.
But NPAPI is C++ and seems like too much work just for uninstallation hooks\logging.

PhistucK



> Ben

--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


Antony Sargent

unread,
Nov 30, 2010, 6:59:09 PM11/30/10
to PhistucK, FM, Chromium-extensions
We have a request for this on file at http://crbug.com/19383 - you can "star" the bug to get updates. 
Reply all
Reply to author
Forward
0 new messages