locked
App Uninstalling Event Handler - Error RRS feed

  • Question

  • I have added code to support adding event receivers to a SharePoint (HOSTWEB) list whenever the app is installed or uninstalled. The installing part works fine and, while debugging, I can see the event receivers are attached to the list. The uninstall part is not working as expected. I am getting the following error whenever I F5 DEBUG:

    Error occurred in deployment step 'Uninstall app for SharePoint': Your app handles the uninstalling app event. Ensure that the Windows Azure Cloud Web Service project is deployed to the emulator prior to uninstalling the app.

    No search across the Web resulted in anything. This is a Provider-Hosted O365 app.

    Thanks in advance!

    Wednesday, April 24, 2013 9:03 PM

Answers

  • Hi markcq,

    This is a known issue with uninstalling apps already on the site. As a workaround, please try setting your app's "Handle App Uninstalling" property to "False" before you F5, and then from the app project's context menu, run the "Retract..." command. This should unblock the retraction of the app during F5, after which you can re-enable handling of the uninstalling events.

    Thanks,
    Saint.

    Thursday, April 25, 2013 5:27 AM

All replies

  • Hi markcq,

    This is a known issue with uninstalling apps already on the site. As a workaround, please try setting your app's "Handle App Uninstalling" property to "False" before you F5, and then from the app project's context menu, run the "Retract..." command. This should unblock the retraction of the app during F5, after which you can re-enable handling of the uninstalling events.

    Thanks,
    Saint.

    Thursday, April 25, 2013 5:27 AM
  • that fixes the immediate issue but does not solve the problem. If I disable handling the "App Uninstalling" event, I can't handle the event. How do I handle the event AND make that error go away? 
    Thank you.

    Doug Haining

    Tuesday, October 8, 2013 9:02 PM
  • Even I am facing the same issue. did you find the resolution for this ?

    Thanks,

    Dhaval Shah

    http://kalashnikovtechnoblogs.blogspot.in/

    Sunday, December 29, 2013 8:27 AM
  • I have the same issue, and just saying "Don't handle the Uninstalling event" is not a solution for development.

    I need to remove some remote event receiver registrations in the HOST web; I won't be able to remove these any other way.

    It's worth noting that a proper deploy - rather than an F5-debug deploy - works, but it means you can't debug the uninstalling event (at least, not that I can see), and you keep having to turn the "Handle App Uninstalling" flag on and off for F5-Deploy and release.

    EDIT: And I also found that Retracting the solution and re-enabling handling of the uninstalling event did not unblock the retraction during F5. Re-enabling the handling of the uninstalling event causes the problem to recur.
    • Edited by Andy Burns Wednesday, January 8, 2014 4:31 PM
    Wednesday, January 8, 2014 4:22 PM