jongpie / NebulaLogger

The most robust observability solution for Salesforce experts. Built 100% natively on the platform, and designed to work seamlessly with Apex, Lightning Components, Flow, Process Builder & integrations.
https://nebulalogger.com
MIT License
679 stars 160 forks source link

Unable to uninstall unlocked package #735

Closed stephenpstanley closed 2 weeks ago

stephenpstanley commented 3 weeks ago

Package Edition of Nebula Logger

Unlocked Package

Package Version of Nebula Logger

v4.13.14

New Bug Summary

I have managed to get both the Managed and unlocked package installed in an org and I want to remove the unlocked version. When trying to install it, I get this list of issues. These are no jobs scheduled that I can find that refer to the package Apex classes not any sharing rules that related to the objects.

How can I delete the package so all my logs can be in just one place? image

stephenpstanley commented 3 weeks ago

Some of the issues were because there were some custom APEX classes that were using the unlocked package, but now that they have all been removed, I'm getting this image

stephenpstanley commented 3 weeks ago

I thought it might because of some (unlikely) dependency between unlocked package and managed package but maybe not. Even having uninstalled the managed package, I still can't uninstall the unlocked package. I'm still getting the dependency issues above

stephenpstanley commented 3 weeks ago

...and for some reason, the dependency violations list has just grown longer image

jongpie commented 3 weeks ago

@stephenpstanley this is definitely strange, I don't think I've seen this behavior before, and those specific errors are all.... interesting 😅

Let me know what you find - I'm not 100% sure what else could be causing this, but hopefully we can figure this out.

stephenpstanley commented 3 weeks ago

I ended up taking a pragmatic approach so no longer have the problem. I deleted all the packages Tabs and deactivated and deleted all the Lightning Pages in the package I did a destructive deployment which got rid of the LWC that it was complaining about but I couldn't get rid of the APEX class(es) that way as they had other dependencies. In the end I edited the classes in a sandbox, removed all the code except one line for test coverage and created a test class that exercised that line. I then deployed that to production using a change set and did a destructive deployment on that. Once I'd done that I was able to delete the package.

Answers to your thoughts.

jongpie commented 3 weeks ago

@stephenpstanley thanks for all of the context - it sounds like you had to go through a lot of hassle to work around this. I'm still not sure what would have caused this issue, I frequently test in orgs that have both the unlocked & managed package installed without any issues, and I've never heard of anyone else encountering these issues before.

My thought is that this is probably an issue on the Salesforce side (and not an issue with Nebula Logger itself), all of the metadata referenced in those errors is part of Nebula Logger's metadata that should be removed anyway. I'm going to keep it open for now & will try to look into this a bit more to see if I can recreate those errors. But since you were able to workaround the problem, I'll eventually close this issue if I'm not able to reproduce it.

If you run into any other issues, please let me know!

stephenpstanley commented 3 weeks ago

I shouldn’t sweat it too much - there are probably more important things to work on

it sounds like a real outlier and isn’t causing me problems any more.

jongpie commented 3 weeks ago

@stephenpstanley sounds good, I appreciate that - I'll spend a few minutes trying to recreate the issue (just to see if I can), but if I can't, I'll close this out.

jongpie commented 2 weeks ago

@stephenpstanley I did some more testing with the unlocked package to try to reproduce this, and unfortunately wasn't able to do so. I'll go ahead and close this for now & mark it as wontfix, but if you/anyone else runs into this again, I can reopen it & look into it further.