Version Control Errors Not Logged - "An unknown error has occurred. Check the diagnostic log for details"
See original GitHub issueIf git errors out while trying to deploy a site that is setup for continuous deployment you get a very vague message in the deployment log which states:
"An unknown error has occurred. Check the diagnostic log for details."
But there does not seem to be any other indication of what is wrong.
Repro steps.
I’ve run into this in a number of different ways, but the following is one of the ways it can happen (and the only one I know how to easily reproduce):
- Setup a project that has another project as a git submodule.
- Add an additional commit or to the submodule, but do not pull the newer versions of the project into the main project yet.
- Within SCM navigate to your repository folder:
D:\site\reposository
- Run the following command from SCM: git submodule update --remote
This will manually update the sub-project to the latest version, and put it “ahead” of what should really be in the main project based on source control.
- Make a change to the main project and return those changes. This should trigger a deploy.
NOTE: The project will error out without any indication of what went wrong besides the “An unknown error occurred”.
This appears to happen because git will spit an error when trying to update the submodule (Since the submodule is already to a version later than what it should be).
This kind of makes sense that it should stop the deploy, but it seems it should also at least log something so that someone can manually fix it.
Project structures.
You should be able to reproduce this with the Dev Branch: https://github.com/securityvoid/azure-bug/tree/dev
The log/error given by the failure.
"An unknown error has occurred. Check the diagnostic log for details."
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (4 by maintainers)
Hey Ji,
Long time ago for me now, so give me a day to boot my memory and I’ll see if I can remember what I did.
Looking at your log files however, looks like the issue is with the purge step??
Cheers, Sanjay
On Fri, 19 Aug 2022, 02:04 Fangrou JI, @.***> wrote:
Hi here, Any news about this topic? I got the same issue. My Azure Function runs on a standard App Service Plan, I checked CPU & Memory Percentages during the deployment but all metrics was OK. So I don’t think it’s related to limited CPU quota.
I connected to instance with ssh and checked the log file under
~/LogFiles/kudu/deployment
, there are 2 log files:Running pip install...
without any errorAn unknown error has occurred. Check the diagnostic log for details.
But I don’t know where could I found “diagnostic log”.I also checked the log files under
~/LogFiles/kudu/trace
, I see 6 xml files created during the deployment time:I searched the keywords i.e. error, failed inside those xml files, the only match was found in
2022-08-18T14-23-33_8ac792_002_GET_api-deployments_pending.xml
:But it’s not clear what was the cause and how to fix this issue.