0

I've created a sample react website and trying to deploy the static website to Azure Storage using Visual Studio Code.

This is the reference I've used to create and deploy static website: https://learn.microsoft.com/en-us/shows/docs-azure/deploy-static-website-to-azure-from-visual-studio-code

However visual studio is unable to deploy the static website. It throws error: AzCopy Transfer: "Failed". Check the output window for a list of incomplete transfers.

The error in the output window shows: Proxy Authentication Required

Put "https://strtestmka.blob.core.windows.net/$web/index.html?se=2022-08-19T03%3A39%3A34Z&sig=-REDACTED-&sp=rwl&srt=co&ss=bf&sv=2019-07-07&timeout=901": Proxy Authentication Required

Can anyone help to find the issue?

Below is the error log:

Successfully created resource group "strtestmka".
Creating storage account "strtestmka" in location "West US" with sku "Standard_LRS"...
Successfully created storage account "strtestmka".
Deploying to static website "/subscriptions/xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/resourceGroups/strtestmka/providers/Microsoft.Storage/storageAccounts/strtestmka/$web"
Querying Azure... Method: listBlobsFlat blobContainerName: "$web" prefix: ""
Uploading from "c:\RnD\demo-react-static-app\build" to "$web"
Failed transfer(s):
    https://strtestmka.blob.core.windows.net/$web/robots.txt?se=2022-08-19T03%3A39%3A34Z&sig=%2FIMa%2FNJzYyvQ8l%2BbNUaMqVuoydsUnaEk7qwfHhsLJLk%3D&sp=rwl&srt=co&ss=bf&sv=2019-07-07
    https://strtestmka.blob.core.windows.net/$web/static/js/787.01d64d4f.chunk.js.map?se=2022-08-19T03%3A39%3A34Z&sig=%2FIMa%2FNJzYyvQ8l%2BbNUaMqVuoydsUnaEk7qwfHhsLJLk%3D&sp=rwl&srt=co&ss=bf&sv=2019-07-07
    https://strtestmka.blob.core.windows.net/$web/logo192.png?se=2022-08-19T03%3A39%3A34Z&sig=%2FIMa%2FNJzYyvQ8l%2BbNUaMqVuoydsUnaEk7qwfHhsLJLk%3D&sp=rwl&srt=co&ss=bf&sv=2019-07-07
    https://strtestmka.blob.core.windows.net/$web/index.html?se=2022-08-19T03%3A39%3A34Z&sig=%2FIMa%2FNJzYyvQ8l%2BbNUaMqVuoydsUnaEk7qwfHhsLJLk%3D&sp=rwl&srt=co&ss=bf&sv=2019-07-07
    https://strtestmka.blob.core.windows.net/$web/asset-manifest.json?se=2022-08-19T03%3A39%3A34Z&sig=%2FIMa%2FNJzYyvQ8l%2BbNUaMqVuoydsUnaEk7qwfHhsLJLk%3D&sp=rwl&srt=co&ss=bf&sv=2019-07-07
    https://strtestmka.blob.core.windows.net/$web/static/css/main.073c9b0a.css.map?se=2022-08-19T03%3A39%3A34Z&sig=%2FIMa%2FNJzYyvQ8l%2BbNUaMqVuoydsUnaEk7qwfHhsLJLk%3D&sp=rwl&srt=co&ss=bf&sv=2019-07-07
    https://strtestmka.blob.core.windows.net/$web/static/js/main.3b949683.js.map?se=2022-08-19T03%3A39%3A34Z&sig=%2FIMa%2FNJzYyvQ8l%2BbNUaMqVuoydsUnaEk7qwfHhsLJLk%3D&sp=rwl&srt=co&ss=bf&sv=2019-07-07
    https://strtestmka.blob.core.windows.net/$web/manifest.json?se=2022-08-19T03%3A39%3A34Z&sig=%2FIMa%2FNJzYyvQ8l%2BbNUaMqVuoydsUnaEk7qwfHhsLJLk%3D&sp=rwl&srt=co&ss=bf&sv=2019-07-07
    https://strtestmka.blob.core.windows.net/$web/static/js/main.3b949683.js?se=2022-08-19T03%3A39%3A34Z&sig=%2FIMa%2FNJzYyvQ8l%2BbNUaMqVuoydsUnaEk7qwfHhsLJLk%3D&sp=rwl&srt=co&ss=bf&sv=2019-07-07
    https://strtestmka.blob.core.windows.net/$web/static/css/main.073c9b0a.css?se=2022-08-19T03%3A39%3A34Z&sig=%2FIMa%2FNJzYyvQ8l%2BbNUaMqVuoydsUnaEk7qwfHhsLJLk%3D&sp=rwl&srt=co&ss=bf&sv=2019-07-07
    https://strtestmka.blob.core.windows.net/$web/static/media/logo.6ce24c58023cc2f8fd88fe9d219db6c6.svg?se=2022-08-19T03%3A39%3A34Z&sig=%2FIMa%2FNJzYyvQ8l%2BbNUaMqVuoydsUnaEk7qwfHhsLJLk%3D&sp=rwl&srt=co&ss=bf&sv=2019-07-07
    https://strtestmka.blob.core.windows.net/$web/static/js/main.3b949683.js.LICENSE.txt?se=2022-08-19T03%3A39%3A34Z&sig=%2FIMa%2FNJzYyvQ8l%2BbNUaMqVuoydsUnaEk7qwfHhsLJLk%3D&sp=rwl&srt=co&ss=bf&sv=2019-07-07
    https://strtestmka.blob.core.windows.net/$web/favicon.ico?se=2022-08-19T03%3A39%3A34Z&sig=%2FIMa%2FNJzYyvQ8l%2BbNUaMqVuoydsUnaEk7qwfHhsLJLk%3D&sp=rwl&srt=co&ss=bf&sv=2019-07-07
    https://strtestmka.blob.core.windows.net/$web/static/js/787.01d64d4f.chunk.js?se=2022-08-19T03%3A39%3A34Z&sig=%2FIMa%2FNJzYyvQ8l%2BbNUaMqVuoydsUnaEk7qwfHhsLJLk%3D&sp=rwl&srt=co&ss=bf&sv=2019-07-07
    https://strtestmka.blob.core.windows.net/$web/logo512.png?se=2022-08-19T03%3A39%3A34Z&sig=%2FIMa%2FNJzYyvQ8l%2BbNUaMqVuoydsUnaEk7qwfHhsLJLk%3D&sp=rwl&srt=co&ss=bf&sv=2019-07-07
Log file: file:///c%3A/Users/demo/.azcopy/xxxxxx-xxxx-xxxx-xxxx-xxxxxxx.log```
Azhar
  • 107
  • 12
  • I have followed the same link which you have provided and able to deploy the app without any issues - [OutPut](https://i.stack.imgur.com/ap5rz.png) – Harshitha Aug 16 '22 at 09:51
  • What is the storage account extension version you have installed ? – Harshitha Aug 16 '22 at 09:58
  • @HarshithaV the version of storage account extension is ```v0.12.1``` – Azhar Aug 16 '22 at 10:08
  • Try with the latest version and check once – Harshitha Aug 16 '22 at 10:09
  • With the VS code I'm currently using, the latest version of storage account is v0.12.1 only. – Azhar Aug 16 '22 at 10:23
  • However, I was also getting same error when uploading the files using Storage Explorer. And to fix that I had to **Disable AzCopy Proxy Usage** in the Storage Explorer. Is there a way to 'Disable AzCopy Proxy Usage' in VS Code? – Azhar Aug 16 '22 at 10:26
  • In VS Code Extensions, search for `Toggle Proxy` and Install. – Harshitha Aug 16 '22 at 10:55
  • Toggle Proxy extension toggles the http proxy item in settings.json on and off. – Harshitha Aug 16 '22 at 11:01
  • In settings.json, add ```{ "http.proxyStrictSSL": false, "files.autoSave":" afterDelay" }``` – Harshitha Aug 16 '22 at 11:01
  • 1
    Refer HTTPS_PROXY and [Configure proxy settings](https://learn.microsoft.com/en-us/azure/storage/common/storage-ref-azcopy-configuration-settings#configure-proxy-settings) – Harshitha Aug 16 '22 at 11:07

1 Answers1

1

I have followed the same workaround which you have provided and able to deploy Azure Static WebApp to Azure Storage Account without any issues.

enter image description here

enter image description here enter image description here

The current Storage Account version installed in my VSCode Extension is 0.142. Try to update the Storage account version to the latest

Is there a way to 'Disable AzCopy Proxy Usage' in VS Code?

AzCopy makes use of a http proxy.

As per this Doc Toggle Proxy is used to enable or disable http proxy

  • In VSCode => File => Preferences => Settings, you will have an option to set proxy environment variables
  • In Search bar search with proxy keyword,

enter image description here

  • In settings.json , add the below settings
{ 
 "http.proxyStrictSSL": false, 
 "files.autoSave":" afterDelay" 
}
Harshitha
  • 3,784
  • 2
  • 4
  • 9
  • Thankyou! However it is not working for me as well as for my team in the Org. The issue seems to be with the proxy authentication. And the Toggle proxy is also not able to disable the proxy. – Azhar Aug 17 '22 at 11:01
  • After adding ```HTTPS_PROXY=dummy.invalid``` & ```NO_PROXY=*``` in the Environment variable, it bypassed the proxy and the website was then deployed to the Azure Storage. – Azhar Aug 18 '22 at 11:20