Error while removing snap

Hello ,

My snap looks like below:

name: lenovo-wwan-dpr
version: …

confinement: strict
base: core20

grade: stable


daemon: oneshot
- xx
command: bin/X1

command: bin/X2
- xxx

When i try removing snap after installing, I am always getting below error:

-> error: snap “lenovo-wwan-dpr” has “service-control” change in progress
Just for information: Binary x1 is launching Binary X2.

Do , i need to add some attributes to fix it. Any information regarding this will be helpful.
Thank you !!

Can you attach the output of snap changes ? Specifically, there should be a change that is in Doing state, please attach the output of snap change <id> of that change as well.

Thank you for your comments.

271 Done today at 15:27 JST today at 15:27 JST Install “lenovo-wwan-dpr” snap from file “lenovo-wwan-dpr_1.0.2-wwan-dpr_amd64.snap”
272 Done today at 15:28 JST today at 15:28 JST Connect lenovo-wwan-dpr:modem-manager to snapd:modem-manager
273 Done today at 15:28 JST today at 15:28 JST Connect lenovo-wwan-dpr:hardware-observe to snapd:hardware-observe
274 Doing today at 15:28 JST - Running service command

Yes , i can see Doing . Is there a way , i can forcefully remove snap ?
command snap change <id> doesnot work for me like snap change <274> or snap change 274

So if you run snap change 274 there’s no output? Can you check the journal maybe? Running sudo journalctl --since 15:28 should produce sufficient output.

No output but using ‘snap tasks 274’ , i can see below:
Status Spawn Ready Summary
Doing today at 15:28 JST - Run service command “start” for services [“wwan-dpr”] of snap “lenovo-wwan-dpr”

To test my modification locally , I have executed below commands:

  1. snap install -dangerous lenovo-wwan-dpr-.xxxx.snap
  2. snap connect lenovo-wwan:hardware-observe
  3. snap connect lenovo-wwan:modem-manager
  4. snap start lenovo-wwan-dpr

You can run snap abort 274 to abort the change and then you should be able to remove the snap. FWIW I would look into why the service cannot be started. Probably inspecting the journal will help.

Still i was unable to remove snap. I saw binary running . So , i killed process as i have mentioned below and then it worked.

I found that binary i.e ‘/snap/lenovo-wwan-dpr/x1/bin/X2’ was running . So , i just kill the process by check id using ‘ps -ef’. After than i can remove snap . So , its working now.

Thank you for supporting on this issue