-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't upload to simple HTML to SWA using swa deploy
command
#591
Comments
Hi @doggy8088, Related to #514 |
The workaround doesn't works. swa deploy --verbose=silly --env production --app-name aaabbccc -R ProjectDemo --app-location . Welcome to Azure Static Web Apps CLI (1.0.3)
Getting config file options from swa-cli.config.json...
Config file does not exist at G:\Projects\aa\swa-cli.config.json
Deploying front-end files from folder:
G:\Projects\aa
No deployment token found. Trying interactive login...
Checking Azure session...
Executing authenticateWithAzureIdentity
- details:
- tenantId: 76275315-7a75-*****
- clientId: <undefined>
- clientSecret: <undefined>
- useKeychain: true
Keychain is enabled
Executing swaCliPersistencePlugin
Executing before cache access plugin
Machine ID: <hidden>
Invoking crypto service
Getting credentials
Getting credentials from native keychain
Getting keychain reference
isKeychainEnabled: true
KeychainCache: undefined
Attempting to load native keychain
Got native keychain reference
Got native keychain reference
Got credentials from native keychain: <hidden>
Credentials found in native keychain
Credentials is chunked. Reading all chunks...
Got all chunks successfully
Credentials: <hidden>
Decrypting credentials
Decrypted credentials: <hidden>
Credentials content: <hidden>
Credentials: <hidden>
Before cache access plugin. Done.
Executing after cache access plugin
Machine ID: <hidden>
Invoking crypto service
Did TokenCacheContext cache changed: false
After cache access plugin. Done.
✔ Successfully logged into Azure!
Selected tenant: 76275315-7a75-*****
Selected subscription: f906b2b8-b243-*****
Project credentials:
- subscriptionId: f906b2b8-b243-*****
- tenantId: 76275315-7a75-*****
- clientId: <undefined>
- clientSecret: <undefined>
Login successful
Checking project "aaabbccc" settings...
Only one project found. Trying to use it if the name matches...
Static site found!
- staticSite:
- id: /subscriptions/f906b2b8-b243-*****/resourceGroups/ProjectDemo/providers/Microsoft.Web/staticSites/aaabbccc
- name: aaabbccc
- location: Central US
- type: Microsoft.Web/staticSites
- tags:
- sku:
- name: Free
- tier: Free
- defaultHostname: red-island-0b1abb210.2.azurestaticapps.net
- repositoryUrl:
- branch:
- customDomains:
- privateEndpointConnections:
- stagingEnvironmentPolicy: Enabled
- allowConfigFileUpdates: true
- contentDistributionEndpoint: https://content-dm1.infrastructure.2.azurestaticapps.net
- keyVaultReferenceIdentity: SystemAssigned
- userProvidedFunctionApps:
- provider: None
- enterpriseGradeCdnStatus: Disabled
Project settings:
- resourceGroupName: ProjectDemo
- staticSiteName: aaabbccc
- subscriptionId: f906b2b8-b243-*****
✔ Successfully setup project!
No swa-cli.config.json file found. Skipping saving project settings.
Deployment token provided via remote configuration
- deploymentToken: <hidden>
Deploying to environment: production
Trying to read workflow config with values:
- appLocation: G:\Projects\aa
- outputLocation: G:\Projects\aa
- apiLocation: <undefined>
No workflow config folder found at G:\Projects\aa\.github\workflows
Validating user workflow config (BEFORE):
- appLocation: G:\Projects\aa
- outputLocation: G:\Projects\aa
- apiLocation: <undefined>
Validating user workflow config (AFTER):
- appLocation: G:\Projects\aa
- apiLocation: <undefined>
- outputLocation: G:\Projects\aa
No staticwebapp.config.json found in current project
Deploying project to Azure Static Web Apps...
Fetching release metadata for version: stable. Please wait...
- version: stable
- buildId: 1.0.020981
- publishDate: 2022-09-29T17:37:34.4094014Z
- files:
- linux-x64:
- url: https://swalocaldeploy.azureedge.net/downloads/1.0.020981/linux/StaticSitesClient
- sha: e55db21d0720a12098804559152303e66846bdd94c13a30b30be29a0fc9ae366
- win-x64:
- url: https://swalocaldeploy.azureedge.net/downloads/1.0.020981/windows/StaticSitesClient.exe
- sha: 4e4eb72aef26641e236c24929c822500e956bda099ca78054112cadf20261107
- osx-x64:
- url: https://swalocaldeploy.azureedge.net/downloads/1.0.020981/macOS/StaticSitesClient
- sha: e0f2ae7ec297510a1b3b9332c0dc0dd962a51adb8ea13cd4f3746d79fc24a7e9
Local client binary is up to date. Skipping download.
Deploying using C:\Users\user\.swa\deploy\1.0.020981\StaticSitesClient.exe@1.0.020981
Deploying using the following options:
- env:
- SWA_CLI_DEBUG: silly
- SWA_RUNTIME_WORKFLOW_LOCATION: <undefined>
- SWA_RUNTIME_CONFIG_LOCATION: <undefined>
- SWA_RUNTIME_CONFIG: <undefined>
- SWA_CLI_VERSION: 1.0.3
- SWA_CLI_DEPLOY_DRY_RUN: false
- SWA_CLI_DEPLOY_BINARY: C:\Users\user\.swa\deploy\1.0.020981\StaticSitesClient.exe@1.0.020981
- DEPLOYMENT_ACTION: upload
- DEPLOYMENT_PROVIDER: SwaCli
- REPOSITORY_BASE: G:\Projects\aa
- SKIP_APP_BUILD: true
- SKIP_API_BUILD: true
- DEPLOYMENT_TOKEN: <hidden>
- APP_LOCATION: G:\Projects\aa
- API_LOCATION: <undefined>
- CONFIG_FILE_LOCATION: <undefined>
- VERBOSE: true
ℹ DeploymentId: f55b13d0-93fe-43b7-8f46-de5cb090b5b6
ℹ
ℹ Verbose logging enabled
ℹ Build timeout not specified, defaulting to 15 minutes
ℹ App Directory Location: 'G:\Projects\aa' was found.
ℹ Looking for event info
ℹ Could not get event info. Proceeding
ℹ Skipping step to build G:\Projects\aa with Oryx
ℹ No Api directory specified. Azure Functions will not be created.
ℹ Could not find staticwebapp.config.json file.
ℹ Didn't find Oryx manifest file under location: G:\Projects\aa\ss-oryx\app-manifest\oryx-manifest.toml
ℹ Determined default file to be: index.html
ℹ Either no Api directory was specified, or the specified directory was not found. Azure Functions will not be created.
ℹ Zipping App Artifacts
ℹ App Zip will be created from directory: G:\Projects\aa
ℹ
ℹ For further information, please visit the Azure Static Web Apps documentation at https://docs.microsoft.com/en-us/azure/static-web-apps/
ℹ If you believe this behavior is unexpected, please raise a GitHub issue at https://github.com/azure/static-web-apps/issues/ |
@doggy8088 can you please try again by moving your
Then re-run the command:
Please note the flag |
@manekinekko It works. So I can't use |
Thanks @doggy8088 , we're closing this issue. |
Thanks @Reshmi-Sriram! That did it for me. Sad to see that this "known bug" hasn't been fixed in ~2 years though :/ |
Before filing this issue, please ensure you're using the latest CLI by running
swa --version
and comparing to the latest version on npm.Are you accessing the CLI from the default port
:4280
?--port
) and accessing the CLI from that port:4280
ℹ️ NOTE: Make sure to enable debug logs when running any
swa
commands using--verbose=silly
Describe the bug
A clear and concise description of what the bug is.
I'm trying to upload HTMLs to the SWA. But nothing will be uploaded.
To Reproduce
Steps to reproduce the behavior:
mkdir aa
cd aa
echo 'Hello world' > index.html
swa login
Upload files
The SWA is actually not uploaded. I can't see any error on my Terminal screen.
Expected behavior
I expected to upload files successfully.
Screenshots
See above.
Desktop (please complete the following information):
10.0.19043.2130
Additional context
Even I added
--verbose log
, but I still can't see more logs. Is there any way to debug swa-cli?The text was updated successfully, but these errors were encountered: