Oryx icon indicating copy to clipboard operation
Oryx copied to clipboard

Unable to Build and Deploy Job Azure Static Web Apps CI/CD

Open Nikhil-Sahu106 opened this issue 2 years ago • 4 comments

Bug Report

Run Azure/static-web-apps-deploy@v1 with: azure_static_web_apps_api_token: *** repo_token: *** action: upload app_location: / /usr/bin/docker run --name db27971f0231e40f1898d9ab0eaca2842_0e4e87 --label 08450d --workdir /github/workspace --rm -e INPUT_AZURE_STATIC_WEB_APPS_API_TOKEN -e INPUT_REPO_TOKEN -e INPUT_ACTION -e INPUT_APP_LOCATION -e INPUT_API_LOCATION -e INPUT_OUTPUT_LOCATION -e INPUT_API_BUILD_COMMAND -e INPUT_APP_ARTIFACT_LOCATION -e INPUT_APP_BUILD_COMMAND -e INPUT_ROUTES_LOCATION -e INPUT_SKIP_APP_BUILD -e INPUT_CONFIG_FILE_LOCATION -e INPUT_SKIP_API_BUILD -e INPUT_PRODUCTION_BRANCH -e INPUT_DEPLOYMENT_ENVIRONMENT -e INPUT_IS_STATIC_EXPORT -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e GITHUB_STEP_SUMMARY -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/Final_project_FRT/Final_project_FRT":"/github/workspace" 08450d:b27971f0231e40f1898d9ab0eaca2842 DeploymentId: 2cee8cd0-7f6c-48a5-807c-4d0566d0b5f2

App Directory Location: '/' was found. No Api directory specified. Azure Functions will not be created. Looking for event info Starting to build app with Oryx Azure Static Web Apps utilizes Oryx to build both static applications and Azure Functions. You can find more details on Oryx here: https://github.com/microsoft/Oryx ---Oryx build logs---

Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx You can report issues at https://github.com/Microsoft/Oryx/issues

Oryx Version: 0.2.20220323.2, Commit: a7f6e2eb2eb42b5c2283d25131ef1f097480015e, ReleaseTagName: 20220323.2

Build Operation ID: |PwGHCuzPH/0=.a2f81646_ Repository Commit : 905dd6dce5e06f585c76cd2c74a052d48b411073

Detecting platforms... Could not detect any platform in the source directory. Error: Could not detect the language from repo.

---End of Oryx build logs--- Oryx was unable to determine the build steps. Continuing assuming the assets in this folder are already built. If this is an unexpected behavior please contact support. Finished building app with Oryx Failed to find a default file in the app artifacts folder (/). Valid default files: index.html,Index.html. If your application contains purely static content, please verify that the variable 'app_location' in your workflow file points to the root of your application. If your application requires build steps, please validate that a default file exists in the build output directory.

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/ Exiting

  • At what date and time did you most recently experience the problem?

  • Where did you experience the problem? E.g. Azure Web Apps, Azure Functions, Azure Container Registry, or offline use.

  • If your repo is publicly available please share its URL:

  • What happened?

  • What did you expect or want to happen?

  • How can we reproduce it?

  • Do you have log output? Please include between the backticks:


Nikhil-Sahu106 avatar Jun 01 '22 06:06 Nikhil-Sahu106

Hi @Nikhil-Sahu106, Oryx couldn't detect which platform the app is using, could you please share more information about your app, like which platform it is? Is App Directory Location pointing to right path?

qianz2 avatar Jun 01 '22 21:06 qianz2

We're having a similar problem while deploying a static web app using Azure Devops CI/CD. This is my console output when i enable verbose logging; We're using Deploy Azure Static Web App (Preview) task (0.* Preview version)

******************************************************************************
Starting: deploy static web app
******************************************************************************
==============================================================================
Task         : Deploy Azure Static Web App
Description  : [PREVIEW] Build and deploy an Azure Static Web App
Version      : 0.203.0
Author       : Microsoft Corporation
Help         : https://aka.ms/swadocs
==============================================================================
[command]/usr/bin/bash /home/azureuser/myagent/_work/_tasks/AzureStaticWebApp_18aad896-e191-4720-88d6-8ced4806941a/0.203.0/launch-docker.sh
stable: Pulling from appsvc/staticappsclient
Digest: sha256:c1fac5b3c048bc93533acf15079a926497d091e6a9e961e7ac878eb2679fe677
Status: Image is up to date for mcr.microsoft.com/appsvc/staticappsclient:stable
/opt/oryx/benv: line 32:     8 Done                    set
         9 Segmentation fault      | grep -i '^dynamic_install_root_dir='

detaybey avatar Jun 09 '22 11:06 detaybey

We're having a similar problem while deploying a static web app using Azure Devops CI/CD. This is my console output when i enable verbose logging; We're using Deploy Azure Static Web App (Preview) task (0.* Preview version)

******************************************************************************
Starting: deploy static web app
******************************************************************************
==============================================================================
Task         : Deploy Azure Static Web App
Description  : [PREVIEW] Build and deploy an Azure Static Web App
Version      : 0.203.0
Author       : Microsoft Corporation
Help         : https://aka.ms/swadocs
==============================================================================
[command]/usr/bin/bash /home/azureuser/myagent/_work/_tasks/AzureStaticWebApp_18aad896-e191-4720-88d6-8ced4806941a/0.203.0/launch-docker.sh
stable: Pulling from appsvc/staticappsclient
Digest: sha256:c1fac5b3c048bc93533acf15079a926497d091e6a9e961e7ac878eb2679fe677
Status: Image is up to date for mcr.microsoft.com/appsvc/staticappsclient:stable
/opt/oryx/benv: line 32:     8 Done                    set
         9 Segmentation fault      | grep -i '^dynamic_install_root_dir='

Hi detaybey,

Are you seeing same error message in Oryx logs as below? Detecting platforms... Could not detect any platform in the source directory. Error: Could not detect the language from repo.

qianz2 avatar Jun 09 '22 19:06 qianz2

No, we see this segmentation error; should I open another ticket for this?

/opt/oryx/benv: line 32:     8 Done                    set
         9 Segmentation fault      | grep -i '^dynamic_install_root_dir='

detaybey avatar Jun 09 '22 21:06 detaybey

We're closing this issue due to its age. If this is still impacting you please open a new issue and simply link back to this one.

simonjj avatar Jan 11 '24 20:01 simonjj