Forcecode won't deploy file on save after a while
Closed this issue · 9 comments
Describe the bug
It's hard to say when but it happens a lot when Forcecode stops deploying files into SF, which requires exiting VSC and re-enter for Forcecode to start deploying again upon cmd+s
This issue started a few months ago.
To Reproduce
Steps to reproduce the behavior:
I guess usually when working on the same file for a few minutes, suddenly something breaks.
Expected behavior
When I click CMD+S (or ctrl+s for windows) the record is saved locally and Forcecode is queueing the file for uploading to Salesforce.
Desktop (please complete the following information):
- OS: Mac
- VSCode version 1.42.1
- ForceCode Version 3.22.3
Additional context
This issue happens to our entire team. the workaround we are using is to use "SFDX deploy" instead.
Hi, @Mos-6 , Funny that your describe that issue, i'm having the same bug over and over again.. as a salesforce developer i'm finding myself restarting VS code 5-10 times each day due to saving issues (auto save and 'Compile and save' from Force-code menu).
It'll be great i know this bug going to get fixed.
Much appreciated.
Netanel.
Same happening here, my team has lots of silent deploys errors, very dangerous. Code is locally saved and versioned, but when they test the edit it is not on the server.
We're somehow able to reproduce the issue.
-
Make a small change and save a file. For example, insert a space and hit Ctrl+S. This will trigger a new ForceCode "Running task" and "Save history" row.
-
Repeat the previous step for 10-15 times on the same file. Repeat until you see and error on the lower right screen:
-
Now, if you try to edit and save the file one more time, you see that it is saved locally but not on the server: there's no Running task or Save history row added. This doesn't happen when saving other files.
As per my understanding this happens because of an error in the saveService
while accessing the presave array. Not sure why the file does not exists on that index:
this.preSaveFiles[fileIndex].saving
I am going to release a new version, the only thing that has changes is updating the dependencies, but I am unable to reproduce this with this new release. Please let me know if you are still facing the issue when you are updated to version 3.22.4
Just updated to 3.22.4, unfortunately the issue is not fixed.
Please let us know what kind of information do you need and how we can retrieve them (eg. logging?).
Edit: shared a video on slack with the issue reproduced
This should be fixed in 3.22.5. Can one of you confirm, once you've been updated to the newer version?
Thank you for your support @daishi4u .
That sequence of steps does not generate errors with version 3.22.5. Asked the dev team to alert me in case they face similar errors after the extension update.
You can close the case in the meanwhile.
Thanks @ctinghino I'll go ahead and close out the issue and will be keeping my eye out for comments here later down the road. Feel free to comment on this issue later if the issue resurfaces and I'll reopen it.
I am having this issue frequently but not sure how to reproduce.
I work in a huge LWC with thousands of lines and I mainly work just on this file for days. Every day I need to restart my VS at least 5 times to fix that.
But even that I got issues, because at the first restart, when I try to save it keeps saving but never completes/fails. So I need to restart again and then save it. Now it will give me a merge error and I can get back to work.
This issue still persist and wasn't fixed. please reopen.