12

Since the IDE and DevConsole was updated to use the Tooling API is sometimes run into situation where I cannot do a Save on a class change anymore. The Force.com IDE is giving no error at all and is hanging forever while the Dev Console tells me:

Unable to patch container member.: This container member belongs to a container that currently has an unfinished save request with deploymentId=1drd00000009nwy. You may not modify any members in this container until it completes.: Metadata Container ID

I have no idea why that happens and how to resolve it. As a workaround I save my changes using the old-fashioned Web-UI.

16

Try to cancel the save, refresh the console, or both. To cancel the save, right click on the tab and click "Cancel Save". You can also click on the "Progress" tab on the bottom and click "Cancel All Deployments". The Progress tab gives you information on the status of the deploy, but if you are getting that error, it is probably because the save is never coming back.

Why might the save not come back?

The Tooling API save is asynchronous, and does not allow for 2 saves of the same entity to happen at the same time. When this happens, it means one of the following.

1) The server is under heavy load, and it is taking a while to pick up your save. Unfortunately, there isn't much that can be done about this one, except maybe canceling the request and trying again.

2) Something bad happened on the server and it is stuck in the save state. There are save guards to prevent this; the job should be switched to the FAILED state and the dev console should be notified. If it doesn't, it is a bug and you may never know an error happened without contacting Salesforce. The best thing to do is to just cancel the request if it takes too long and try again.

3) It finished but the dev console does not think it finished. The dev console gets notified by the Streaming API. There is a chance that the message didn't make it or never got sent, or the dev console session was refreshing when it came back. Another bug and more rare, but this one is a little easier to figure out by queuing for the status field of container deploy request in the dev console. Refreshing the console will fix this issue, or possibly canceling the save.

Similar to this question/solution: Failed to create deployment: This container has a save in progress with deploymentId=[YOUR-DEPLOYMENT-ID]

  • None of this really helps. It just explains the flaws of the design, how can this be fixed? My deployment is stuck due to this issue, none of the suggestions have helped. – CommonCoreTawan Feb 12 '17 at 12:27
3

I am working in a pre-release sandbox, and was unable to correct the state of the file save using the above options that Thomas laid out. Since my class was only used in a few places, and I need to keep moving, I opted to:

1) Save my changes into an external text editor

2) Close the developer console window

3) Create a new class with a similar name using my saved changes

4) change the references to match the newly created class

5) Delete the old class

6) Rename everything back.

This worked like a charm, since the process was locked thinking that it was saving when, it actually was not saving - the process seemed to be out of sync.

I hope this info helps someone else.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.