question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to deploy a linux typescript functionapp

See original GitHub issue

Not entirely sure if this is where I should write the issue. Technically not an issue of the action, but perhaps an underlying azure platform issue.

When I build and deploy my typescript functionapp, the deploy succeeds, but the function app is totally messed up. Here’s what I’ve found.

  1. Github action logs indicate deployment was successful:
##[Initialize]
##[ValidateParameter]
##[ValidateAzureResource]
Using SCM credential for authentication, GitHub Action will not perform resource validation.
Sucessfully acquired app settings from function app (SCM)!
##[PreparePublishContent]
Will directly deploy ./app/app.zip as function app content
Will use api/zipdeploy to deploy (scm credential)
##[PublishContent]
Setting SCM_DO_BUILD_DURING_DEPLOYMENT in Kudu container to false
Update using Client.updateAppSettingViaKudu
Response with status code 204
App setting SCM_DO_BUILD_DURING_DEPLOYMENT propagated to Kudu container
Setting ENABLE_ORYX_BUILD in Kudu container to false
Update using Client.updateAppSettingViaKudu
Response with status code 204
App setting ENABLE_ORYX_BUILD propagated to Kudu container
Package deployment using ZIP Deploy initiated.
Deploy logs can be viewed at https://app.scm.azurewebsites.net/api/deployments/<xxxxxx>/log
Successfully deployed web package to App Service.
Successfully updated deployment History at https://app.scm.azurewebsites.net/api/deployments/<xxxx>
  1. When I navigate to the function app and click on functions, no functions are present
  2. When I click on files, I can see the root files are there (host.json, package.json)
  3. When I go to the storage area and download the zip file and try to expand it, it fails saying it is an unsupported format (I’m on a mac).

If I switch over to use azure function core tools and use that to publish the function, it works without issue.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:22 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
msjonkercommented, Feb 4, 2022

Any updates on this? This is still not working for me for a Linux Consumption plan. I looked at the deployment logs before they disappeared and it seemed like the package that was being generated was pretty much empty:

[
{
"log_time": "2022-02-04T16:07:16.9978325Z",
"id": "31b3af1d-20ea-4b58-a418-4f7c988de6a1",
"message": "Updating submodules.",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.0134877Z",
"id": "bbf0cc66-63ae-4fed-8af5-8234f1f589f9",
"message": "Preparing deployment for commit id 'b3f4b15561'.",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.0359987Z",
"id": "297ece82-a18a-4681-9e15-eeb8d84e5418",
"message": "Skipping build. Project type: Run-From-Zip",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.0422714Z",
"id": "a3a03f29-8284-4cf4-ada8-8064b6b87893",
"message": "Skipping post build. Project type: Run-From-Zip",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.0502608Z",
"id": "e2a64ef0-5821-4c34-9692-51e0abf6f461",
"message": "Triggering recycle (preview mode disabled).",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.0664468Z",
"id": "d923d1f6-4a2f-4b4f-81e5-1a83c5cf5e1a",
"message": "Linux Consumption plan has a 1.5 GB memory limit on a remote build container.",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.0734525Z",
"id": "2ae17507-d475-4f3a-8cbd-1e2373000ae2",
"message": "To check our service limit, please visit https://docs.microsoft.com/en-us/azure/azure-functions/functions-scale#service-limits",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.0821008Z",
"id": "99a518d3-95e5-43ad-bb35-26f669d0b2c0",
"message": "Creating placeholder blob for linux consumption function app...",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.0997534Z",
"id": "0ce238a2-d8a0-4ab2-be5b-cd22023ddcf4",
"message": "SCM_RUN_FROM_PACKAGE placeholder blob scm-latest-ecobomwatcher.zip located",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.1057247Z",
"id": "816349e6-c683-485f-ac42-49359d0d806d",
"message": "Writing the artifacts to a squashfs file",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.1659998Z",
"id": "26103e9e-fd1f-4ace-8da2-1a53426bb449",
"message": "Parallel mksquashfs: Using 1 processor",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.1744005Z",
"id": "566882c9-58ac-4480-9c57-f5cc5a6b6a5a",
"message": "Creating 4.0 filesystem on /home/site/artifacts/functionappartifact.squashfs, block size 131072.",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.1833495Z",
"id": "3729eed2-ca71-4426-a0ac-93ee70097761",
"message": "",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.190678Z",
"id": "e1ec86cc-f0c2-4c19-9c09-3a122f335ba5",
"message": "",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.2016159Z",
"id": "e7ac7616-2066-490a-aa87-adfb0e674cc5",
"message": "Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.2093207Z",
"id": "7bf90d4d-8565-43bb-bac1-ef23d9863993",
"message": "\tcompressed data, compressed metadata, compressed fragments, compressed xattrs",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.2189798Z",
"id": "f639c3a8-ea96-4aed-ad30-6ffb809bc344",
"message": "\tduplicates are removed",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.2277637Z",
"id": "6e65dc2b-e5c5-4136-be98-441006152482",
"message": "Filesystem size 0.15 Kbytes (0.00 Mbytes)",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.2378792Z",
"id": "1c82c898-eaaf-456f-850e-e59d2ff6cd6d",
"message": "\t99.37% of uncompressed filesystem size (0.15 Kbytes)",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.2463653Z",
"id": "2855aab0-de0c-4690-a430-0bfd86898ab9",
"message": "Inode table size 29 bytes (0.03 Kbytes)",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.2548971Z",
"id": "20b97709-7cdf-42ae-b0d8-7b8175869109",
"message": "\t85.29% of uncompressed inode table size (34 bytes)",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.2644421Z",
"id": "57d4bbf8-64d8-45c3-8db1-65808eadfb2d",
"message": "Directory table size 0 bytes (0.00 Kbytes)",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.2732689Z",
"id": "e7eff988-6992-4b78-8885-4529ae3445e9",
"message": "\t-nan% of uncompressed directory table size (0 bytes)",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.284831Z",
"id": "293e52cd-24f4-47d4-a0d6-18a841f40374",
"message": "Number of duplicate files found 0",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.291847Z",
"id": "ca99d6b4-b70e-46d2-ae7d-c85c7dc05f31",
"message": "Number of inodes 1",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.3046664Z",
"id": "f5a6db01-4f42-4a0b-b0c3-926744f7c6b4",
"message": "Number of files 0",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.3142598Z",
"id": "6daaa039-50e9-4611-bd6b-fcb9b0cac3f8",
"message": "Number of fragments 0",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.3231269Z",
"id": "39bbc32c-c1ee-4666-87e3-58b1fc921568",
"message": "Number of symbolic links  0",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.3368433Z",
"id": "515da8c8-e37a-4b18-a63e-472d059ffc6f",
"message": "Number of device nodes 0",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.3478393Z",
"id": "8a9d8519-d7ff-41ca-b34e-8813214dfe88",
"message": "Number of fifo nodes 0",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.3565519Z",
"id": "eb1498e0-1326-44e5-b92f-8b0eb4fc9016",
"message": "Number of socket nodes 0",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.3648414Z",
"id": "7d6b12e5-132a-4179-a653-23520f99a629",
"message": "Number of directories 1",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.3778286Z",
"id": "afffaf2c-6613-494c-866f-8641ffdbd76f",
"message": "Number of ids (unique uids + gids) 1",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.38708Z",
"id": "3bb81def-fd8e-4c2c-9148-689cdcddb7f0",
"message": "Number of uids 1",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.4016453Z",
"id": "d3eb7c0e-d2f2-474e-96e7-2937ed506622",
"message": "\troot (0)",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.4097643Z",
"id": "72ce700f-4b49-4e0b-bf13-44b1384f9aaf",
"message": "Number of gids 1",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.4182818Z",
"id": "4a6f4297-1df4-4a8b-a556-0780f62e1e77",
"message": "\troot (0)",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.432016Z",
"id": "d5eb450d-a23b-400a-96d6-6bcd106d7320",
"message": "Uploading built content /home/site/artifacts/functionappartifact.squashfs for linux consumption function app...",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:18.9686341Z",
"id": "f2e4f669-44c5-492d-97be-d13e44c882f9",
"message": "Resetting all workers for ecobomwatcher.azurewebsites.net",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:19.1086735Z",
"id": "05b5fa79-3f48-42e4-bc3e-74f1893cf235",
"message": "Updating /home/data/SitePackages/packagename.txt with deployment 20220204160713.zip",
"type": 0,
"details_url": null
},
{
"log_time": "2022-02-04T16:07:19.1398571Z",
"id": "5daea888-5c29-4da9-8961-bf9aad492882",
"message": "Deployment successful.",
"type": 0,
"details_url": null
}
]

To get around this issue, I resorted to zipping my project myself and then deploying the zip using:

az functionapp deployment source config-zip -g <resource_group> -n <app_name> --src <zip_file_path>

This works great.

2reactions
rubengarciamcommented, Mar 24, 2021

GitHub actions fails for me too. I have tried all the options listed above but none of them seem to work.

Stopping it first before deploying as listed in Azure/functions-action#26 didn’t work either.

The original GitHub Workflow created by Azure:

# Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy Node.js project to Azure Function App - app

on:
  push:
    branches:
      - master
  workflow_dispatch:

env:
  AZURE_FUNCTIONAPP_PACKAGE_PATH: '.' # set this to the path to your web app project, defaults to the repository root
  NODE_VERSION: '14.x' # set this to the node version to use (supports 8.x, 10.x, 12.x)

jobs:
  build-and-deploy:
    runs-on: windows-latest
    steps:
    - name: 'Checkout GitHub Action'
      uses: actions/checkout@master

    - name: Setup Node ${{ env.NODE_VERSION }} Environment
      uses: actions/setup-node@v1
      with:
        node-version: ${{ env.NODE_VERSION }}

    - name: 'Resolve Project Dependencies Using Npm'
      shell: bash
      run: |
        pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
        npm install
        npm run build --if-present
        npm run test --if-present
        popd

    - name: 'Run Azure Functions Action'
      uses: Azure/functions-action@v1
      id: fa
      with:
        app-name: 'app'
        slot-name: 'production'
        package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
        publish-profile: ${{ secrets.AzureAppService_PublishProfile }}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to deploy fresh Azure Function to Linux app
I'm trying to deploy a newly created Azure Function to a linux Azure Function app. For some reason this keeps failing, even though...
Read more >
Work with Azure Functions Core Tools | Microsoft Learn
Deploys your Linux function app as a custom Docker container to a Kubernetes cluster. Before you publish. Important. You must have the Azure...
Read more >
Typescript Build for Function app failing on Pipelines with "/bin ...
I am trying to setup a CI build for an Azure function app using Typescript. I set up the YAML using the "Node.js...
Read more >
azure-functions-core-tools - npm
Deploying a function to AKS using ACR. Using the configuration options an Azure Function app can also be deployed to a AKS (Azure...
Read more >
Publish Azure Functions code with Terraform
This post focuses on how you can publish code to a function app ... Code for Linux/Windows + Consumption/Premium configurations in Github.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found