{"id":1749,"date":"2023-03-08T16:53:07","date_gmt":"2023-03-08T16:53:07","guid":{"rendered":"https:\/\/thecloudmarathoner.com\/?p=1749"},"modified":"2023-03-13T13:03:41","modified_gmt":"2023-03-13T13:03:41","slug":"my-troubleshooting-steps-with-the-azure-bicep-insert-and-system-path-errors","status":"publish","type":"post","link":"https:\/\/thecloudmarathoner.com\/index.php\/2023\/03\/08\/my-troubleshooting-steps-with-the-azure-bicep-insert-and-system-path-errors\/","title":{"rendered":"Troubleshooting steps with the Azure Bicep Insert and system path errors"},"content":{"rendered":"\n<p>Hello Cloud Marathoners!<\/p>\n\n\n\n<p>I have been getting a strange error on the Azure Bicep Insert functionality on my laptop, while it was working as expected on my work laptop.<\/p>\n\n\n\n<p>Thus, I started to compare Azure Bicep versions and extension plugin versions on VS Code. Even though, both have the same versions, I was getting the following errors: <\/p>\n\n\n\n<h4 class=\"wp-block-heading\">ChainedTokenCredential failed due to an unhandled exception<\/h4>\n\n\n\n<p>&#8220;Caught exception fetching resource: The ChainedTokenCredential failed due to an unhandled exception: Azure CLI authentication failed due to an unknown error. See the troubleshooting guide for more information.&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"578\" height=\"280\" src=\"\/wp-content\/uploads\/2023\/02\/image-7.png\" alt=\"\" class=\"wp-image-1755\" srcset=\"\/wp-content\/uploads\/2023\/02\/image-7.png 578w, \/wp-content\/uploads\/2023\/02\/image-7-300x145.png 300w\" sizes=\"auto, (max-width: 578px) 85vw, 578px\" \/><\/figure>\n\n\n\n<p>After a couple of hours of troubleshooting, I was getting a different error: <\/p>\n\n\n\n<p>&#8220;Caught exception fetching resource: The ChainedTokenCredential failed due to an unhandled exception: Azure PowerShell authentication failed due to an unknown error. See the troubleshooting guide for more information.&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"563\" height=\"286\" src=\"\/wp-content\/uploads\/2023\/02\/image-8.png\" alt=\"\" class=\"wp-image-1756\" srcset=\"\/wp-content\/uploads\/2023\/02\/image-8.png 563w, \/wp-content\/uploads\/2023\/02\/image-8-300x152.png 300w\" sizes=\"auto, (max-width: 563px) 85vw, 563px\" \/><\/figure>\n\n\n\n<p>I was not sure what was wrong, and thus I opened a <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/Azure\/bicep\/issues\/9911\" target=\"_blank\">GitHub issue on Azure\/Bicep<\/a>. Link to the issue: <a href=\"https:\/\/github.com\/Azure\/bicep\/issues\/9911\">https:\/\/github.com\/Azure\/bicep\/issues\/9911<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Not an Authentication issue<\/h4>\n\n\n\n<p>First thing first, I have eliminated the possibility of Azure authentication not working on my VS Code, by running the following commands and seeing the results:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"340\" src=\"\/wp-content\/uploads\/2023\/02\/image-10.png\" alt=\"\" class=\"wp-image-1762\" srcset=\"\/wp-content\/uploads\/2023\/02\/image-10.png 833w, \/wp-content\/uploads\/2023\/02\/image-10-300x122.png 300w, \/wp-content\/uploads\/2023\/02\/image-10-768x313.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Issues that helped to dig for a fix<\/h4>\n\n\n\n<p>I was seeing an error: &#8220;The system cannot find the path specified.&#8221;. This was in my Windows Command Prompt and PowerShell consoles.<\/p>\n\n\n\n<p>Here are the screenshots of the errors that I was seeing:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"476\" height=\"142\" src=\"\/wp-content\/uploads\/2023\/02\/image-4.png\" alt=\"\" class=\"wp-image-1750\" srcset=\"\/wp-content\/uploads\/2023\/02\/image-4.png 476w, \/wp-content\/uploads\/2023\/02\/image-4-300x89.png 300w\" sizes=\"auto, (max-width: 476px) 85vw, 476px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"808\" height=\"243\" src=\"\/wp-content\/uploads\/2023\/02\/image-5.png\" alt=\"\" class=\"wp-image-1751\" srcset=\"\/wp-content\/uploads\/2023\/02\/image-5.png 808w, \/wp-content\/uploads\/2023\/02\/image-5-300x90.png 300w, \/wp-content\/uploads\/2023\/02\/image-5-768x231.png 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Resolving path issues<\/h4>\n\n\n\n<p>First, I checked all my paths in Environment Variables on my Windows laptop, and there were 1-2 unresolved paths that I removed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"629\" src=\"\/wp-content\/uploads\/2023\/02\/image-9-1024x629.png\" alt=\"\" class=\"wp-image-1758\" srcset=\"\/wp-content\/uploads\/2023\/02\/image-9-1024x629.png 1024w, \/wp-content\/uploads\/2023\/02\/image-9-300x184.png 300w, \/wp-content\/uploads\/2023\/02\/image-9-768x472.png 768w, \/wp-content\/uploads\/2023\/02\/image-9.png 1140w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Cleanup of the Registry AutoRun<\/h4>\n\n\n\n<p>The next step was removing any Auto Run values that I may have in Win Registry.<br>This last step was helpful to resolve all the errors on Windows Command Prompt and PowerShell.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"613\" height=\"222\" src=\"\/wp-content\/uploads\/2023\/02\/image-6.png\" alt=\"\" class=\"wp-image-1753\" srcset=\"\/wp-content\/uploads\/2023\/02\/image-6.png 613w, \/wp-content\/uploads\/2023\/02\/image-6-300x109.png 300w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h4 class=\"wp-block-heading\">In Summary<\/h4>\n\n\n\n<p>At the end of the troubleshooting and after a couple of hours of banging my head into the wall, I was happy that the Path and &#8220;ChainedTokenCredential failed&#8221; issues had been resolved.  <\/p>\n\n\n\n<p>Thank you for reading my post and I hope this post has helped you to troubleshoot the issues that you may have.<\/p>\n\n\n\n<p>If your issue is still not resolved after following my post, please reach back to me.<\/p>\n<div class=\"pvc_clear\"><\/div><p id=\"pvc_stats_1749\" class=\"pvc_stats all  \" data-element-id=\"1749\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p><div class=\"pvc_clear\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Hello Cloud Marathoners! I have been getting a strange error on the Azure Bicep Insert functionality on my laptop, while it was working as expected on my work laptop. Thus, I started to compare Azure Bicep versions and extension plugin versions on VS Code. Even though, both have the same versions, I was getting the &hellip; <a href=\"https:\/\/thecloudmarathoner.com\/index.php\/2023\/03\/08\/my-troubleshooting-steps-with-the-azure-bicep-insert-and-system-path-errors\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Troubleshooting steps with the Azure Bicep Insert and system path errors&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,2,55],"tags":[],"class_list":["post-1749","post","type-post","status-publish","format-standard","hentry","category-azure-bicep","category-infrastructure-as-code-iac","category-troubleshooting"],"_links":{"self":[{"href":"https:\/\/thecloudmarathoner.com\/index.php\/wp-json\/wp\/v2\/posts\/1749","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thecloudmarathoner.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thecloudmarathoner.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thecloudmarathoner.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thecloudmarathoner.com\/index.php\/wp-json\/wp\/v2\/comments?post=1749"}],"version-history":[{"count":7,"href":"https:\/\/thecloudmarathoner.com\/index.php\/wp-json\/wp\/v2\/posts\/1749\/revisions"}],"predecessor-version":[{"id":1778,"href":"https:\/\/thecloudmarathoner.com\/index.php\/wp-json\/wp\/v2\/posts\/1749\/revisions\/1778"}],"wp:attachment":[{"href":"https:\/\/thecloudmarathoner.com\/index.php\/wp-json\/wp\/v2\/media?parent=1749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thecloudmarathoner.com\/index.php\/wp-json\/wp\/v2\/categories?post=1749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thecloudmarathoner.com\/index.php\/wp-json\/wp\/v2\/tags?post=1749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}