Skip to content
Advertisement

Azure function deployment failed: “Malformed SCM_RUN_FROM_PACKAGE when uploading built content”

I have two Azure accounts. And I tried to deploy the same function to these two accounts (to the function apps). The deployment to the 1st account – successful, but to the 2nd account – failed.

The only big difference between the two accounts is that I do not have direct access to the resource group that the 2nd account’s function app uses (I have access to the resource group at the 1st account). May it be the reason why I can’t deploy the program to the function app at the 2nd account?

Deploy output of the function app at the 1st account:

14:14:13 <func_name_1>: Starting deployment...
14:14:15 <func_name_1>: Creating zip package...
14:14:16 <func_name_1>: Zip package size: 597 kB
14:14:16 <func_name_1>: Fetching changes.
14:14:17 <func_name_1>: Cleaning up temp folders from previous zip deployments and extracting pushed zip file /tmp/zipdeploy/4c187dd4-7c93-41fb-939d-e2b4640f0cfe.zip (0.57 MB) to /tmp/zipdeploy/extracted
14:14:20 <func_name_1>: Updating submodules.
14:14:21 <func_name_1>: Preparing deployment for commit id '1a1eb1d0a9'.
14:14:21 <func_name_1>: Repository path is /tmp/zipdeploy/extracted
14:14:21 <func_name_1>: Running oryx build...
14:14:21 <func_name_1>: Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.7 -p packagedir=.python_packages/lib/site-packages
14:14:22 <func_name_1>: Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
14:14:22 <func_name_1>: You can report issues at https://github.com/Microsoft/Oryx/issues
14:14:22 <func_name_1>: Oryx Version: 0.2.20201015.1, Commit: 1a35fbce482b20b71290f3a837a3469803ce4b44, ReleaseTagName: 20201015.1
14:14:22 <func_name_1>: Build Operation ID: |WfYnvmAN2UQ=.793dc238_
14:14:22 <func_name_1>: Repository Commit : 1a1eb1d0a94943658cbb12b225071125
14:14:22 <func_name_1>: Detecting platforms...
14:14:23 <func_name_1>: Detected following platforms:
14:14:23 <func_name_1>:   python: 3.7.12
14:14:23 <func_name_1>: Version '3.7.12' of platform 'python' is not installed. Generating script to install it...
14:14:23 <func_name_1>: Warning: An outdated version of python was detected (3.7.12). Consider updating.
14:14:23 <func_name_1>: Versions supported by Oryx: https://github.com/microsoft/Oryx
14:14:23 <func_name_1>: Source directory     : /tmp/zipdeploy/extracted
14:14:23 <func_name_1>: Destination directory: /home/site/wwwroot
14:14:23 <func_name_1>: Downloading and extracting 'python' version '3.7.12' to '/tmp/oryx/platforms/python/3.7.12'...
14:14:24 <func_name_1>: Downloaded in 1 sec(s).
14:14:24 <func_name_1>: Verifying checksum...
14:14:24 <func_name_1>: Extracting contents...
14:14:27 <func_name_1>: Done in 4 sec(s).
14:14:28 <func_name_1>: Python Version: /tmp/oryx/platforms/python/3.7.12/bin/python3.7
14:14:28 <func_name_1>: Running pip install...
14:14:55 <func_name_1>: [13:14:55+0000] Successfully built psycopg2
14:14:55 <func_name_1>: [13:14:55+0000] Installing collected packages: azure-functions, numpy, six, python-dateutil, pytz, pandas, chardet, urllib3, idna, certifi, requests, pycparser, cffi, cryptography, PyJWT, msal, sqlalchemy, psycopg2, azure-core, isodate, oauthlib, requests-oauthlib, msrest, azure-storage-blob, pyasn1, pyasn1-modules, cachetools, rsa, google-auth, google-auth-oauthlib, pyarrow, setuptools, pydata-google-auth, protobuf, google-crc32c, google-resumable-media, googleapis-common-protos, grpcio, grpcio-status, google-api-core, proto-plus, pyparsing, packaging, google-cloud-core, google-cloud-bigquery, pandas-gbq
14:15:11 <func_name_1>: [13:15:11+0000] Successfully installed PyJWT-1.7.1 azure-core-1.22.1 azure-functions-1.9.0 azure-storage-blob-12.9.0 cachetools-5.0.0 certifi-2021.10.8 cffi-1.15.0 chardet-3.0.4 cryptography-3.4.6 google-api-core-2.5.0 google-auth-2.6.0 google-auth-oauthlib-0.5.0 google-cloud-bigquery-2.31.0 google-cloud-core-2.2.2 google-crc32c-1.3.0 google-resumable-media-2.3.0 googleapis-common-protos-1.55.0 grpcio-1.44.0 grpcio-status-1.44.0 idna-2.10 isodate-0.6.1 msal-1.8.0 msrest-0.6.21 numpy-1.19.1 oauthlib-3.2.0 packaging-21.3 pandas-1.1.0 pandas-gbq-0.16.0 proto-plus-1.20.3 protobuf-3.19.4 psycopg2-2.8.5 pyarrow-6.0.1 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.21 pydata-google-auth-1.3.0 pyparsing-3.0.7 python-dateutil-2.8.2 pytz-2021.3 requests-2.24.0 requests-oauthlib-1.3.1 rsa-4.8 setuptools-60.9.3 six-1.16.0 sqlalchemy-1.3.23 urllib3-1.25.10
14:15:11 <func_name_1>: WARNING: You are using pip version 20.2.3; however, version 22.0.3 is available.
14:15:11 <func_name_1>: You should consider upgrading via the '/tmp/oryx/platforms/python/3.7.12/bin/python3.7 -m pip install --upgrade pip' command.
14:15:11 <func_name_1>: Done in 43 sec(s).
14:15:11 <func_name_1>: Copying files to destination directory '/home/site/wwwroot'...
14:15:15 <func_name_1>: Done in 4 sec(s).
14:15:15 <func_name_1>: Removing existing manifest file
14:15:15 <func_name_1>: Creating a manifest file...
14:15:16 <func_name_1>: Manifest file created.
14:15:16 <func_name_1>: Done in 52 sec(s).
14:15:16 <func_name_1>: Running post deployment command(s)...
14:15:16 <func_name_1>: Triggering recycle (preview mode disabled).
14:15:16 <func_name_1>: Linux Consumption plan has a 1.5 GB memory limit on a remote build container.
14:15:16 <func_name_1>: To check our service limit, please visit https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale#service-limits
14:15:16 <func_name_1>: Creating placeholder blob for linux consumption function app...
14:15:16 <func_name_1>: SCM_RUN_FROM_PACKAGE placeholder blob scm-latest-<func_name_1>.zip located
14:15:16 <func_name_1>: Writing the artifacts to a squashfs file
14:15:28 <func_name_1>: Parallel mksquashfs: Using 1 processor
14:15:28 <func_name_1>: Creating 4.0 filesystem on /home/site/artifacts/functionappartifact.squashfs, block size 131072.
14:15:31 <func_name_1>: [==================-                                           ] 2800/9135  30%
14:16:02 <func_name_1>: [====================/                                         ] 3000/9135  32%
14:16:07 <func_name_1>: [=============================================================] 9135/9135 100%
14:16:07 <func_name_1>: Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
14:16:07 <func_name_1>:     compressed data, compressed metadata, compressed fragments, compressed xattrs
14:16:07 <func_name_1>:     duplicates are removed
14:16:07 <func_name_1>: Filesystem size 75358.45 Kbytes (73.59 Mbytes)
14:16:07 <func_name_1>:     29.67% of uncompressed filesystem size (253949.91 Kbytes)
14:16:07 <func_name_1>: Inode table size 84814 bytes (82.83 Kbytes)
14:16:07 <func_name_1>:     29.29% of uncompressed inode table size (289612 bytes)
14:16:07 <func_name_1>: Directory table size 84397 bytes (82.42 Kbytes)
14:16:07 <func_name_1>:     36.16% of uncompressed directory table size (233373 bytes)
14:16:07 <func_name_1>: Number of duplicate files found 521
14:16:07 <func_name_1>: Number of inodes 8873
14:16:07 <func_name_1>: Number of files 8006
14:16:07 <func_name_1>: Number of fragments 773
14:16:07 <func_name_1>: Number of symbolic links  0
14:16:07 <func_name_1>: Number of device nodes 0
14:16:07 <func_name_1>: Number of fifo nodes 0
14:16:07 <func_name_1>: Number of socket nodes 0
14:16:07 <func_name_1>: Number of directories 867
14:16:07 <func_name_1>: Number of ids (unique uids + gids) 1
14:16:07 <func_name_1>: Number of uids 1
14:16:07 <func_name_1>:     root (0)
14:16:07 <func_name_1>: Number of gids 1
14:16:07 <func_name_1>:     root (0)
14:16:07 <func_name_1>: Uploading built content /home/site/artifacts/functionappartifact.squashfs for linux consumption function app...
14:16:09 <func_name_1>: Resetting all workers for <func_name_1>.azurewebsites.net
14:16:09 <func_name_1>: Deployment successful.
14:16:28 <func_name_1>: Syncing triggers...
14:16:33 <func_name_1>: Querying triggers...
14:16:35 <func_name_1>: No HTTP triggers found.

Deploy output of the function app at the 2nd account:

16:38:30 <func_name_2>: Starting deployment...
16:38:33 <func_name_2>: Creating zip package...
16:38:34 <func_name_2>: Zip package size: 597 kB
16:38:35 <func_name_2>: Fetching changes.
16:38:36 <func_name_2>: Cleaning up temp folders from previous zip deployments and extracting pushed zip file /tmp/zipdeploy/edc7f1e2-d15f-4e62-ad4a-abe9993f4fbe.zip (0.57 MB) to /tmp/zipdeploy/extracted
16:38:38 <func_name_2>: Updating submodules.
16:38:39 <func_name_2>: Preparing deployment for commit id '87613accff'.
16:38:39 <func_name_2>: Repository path is /tmp/zipdeploy/extracted
16:38:39 <func_name_2>: Running oryx build...
16:38:39 <func_name_2>: Command: oryx build /tmp/zipdeploy/extracted -o /home/site/wwwroot --platform python --platform-version 3.7 -p packagedir=.python_packages/lib/site-packages
16:38:41 <func_name_2>: Operation performed by Microsoft Oryx, https://github.com/Microsoft/Oryx
16:38:41 <func_name_2>: You can report issues at https://github.com/Microsoft/Oryx/issues
16:38:41 <func_name_2>: Oryx Version: 0.2.20201015.1, Commit: 1a35fbce482b20b71290f3a837a3469803ce4b44, ReleaseTagName: 20201015.1
16:38:41 <func_name_2>: Build Operation ID: |y5J5WXgD8ag=.a9990db3_
16:38:41 <func_name_2>: Repository Commit : 87613accff174b0189b03a7e7bd5845c
16:38:41 <func_name_2>: Detecting platforms...
16:38:43 <func_name_2>: Detected following platforms:
16:38:43 <func_name_2>:   python: 3.7.12
16:38:43 <func_name_2>: Version '3.7.12' of platform 'python' is not installed. Generating script to install it...
16:38:44 <func_name_2>: Warning: An outdated version of python was detected (3.7.12). Consider updating.
16:38:44 <func_name_2>: Versions supported by Oryx: https://github.com/microsoft/Oryx
16:38:44 <func_name_2>: Source directory     : /tmp/zipdeploy/extracted
16:38:44 <func_name_2>: Destination directory: /home/site/wwwroot
16:38:44 <func_name_2>: Downloading and extracting 'python' version '3.7.12' to '/tmp/oryx/platforms/python/3.7.12'...
16:38:45 <func_name_2>: Downloaded in 1 sec(s).
16:38:45 <func_name_2>: Verifying checksum...
16:38:45 <func_name_2>: Extracting contents...
16:38:51 <func_name_2>: Done in 7 sec(s).
16:38:51 <func_name_2>: Python Version: /tmp/oryx/platforms/python/3.7.12/bin/python3.7
16:38:51 <func_name_2>: Running pip install...
16:39:22 <func_name_2>: [15:39:22+0000] Successfully built psycopg2
16:39:22 <func_name_2>: [15:39:22+0000] Installing collected packages: six, chardet, urllib3, certifi, idna, requests, azure-core, azure-functions, oauthlib, requests-oauthlib, isodate, msrest, pycparser, cffi, cryptography, azure-storage-blob, cachetools, pyasn1, pyasn1-modules, rsa, google-auth, protobuf, googleapis-common-protos, google-api-core, google-auth-oauthlib, pyparsing, packaging, proto-plus, python-dateutil, google-crc32c, google-resumable-media, google-cloud-core, grpcio, google-cloud-bigquery, google-cloud-bigquery-storage, grpcio-status, PyJWT, msal, numpy, pytz, pandas, pyarrow, setuptools, pydata-google-auth, pandas-gbq, psycopg2, SQLAlchemy
16:39:40 <func_name_2>: [15:39:40+0000] Successfully installed PyJWT-1.7.1 SQLAlchemy-1.3.23 azure-core-1.22.1 azure-functions-1.9.0 azure-storage-blob-12.9.0 cachetools-5.0.0 certifi-2021.10.8 cffi-1.15.0 chardet-3.0.4 cryptography-3.4.6 google-api-core-2.5.0 google-auth-2.6.0 google-auth-oauthlib-0.4.6 google-cloud-bigquery-2.31.0 google-cloud-bigquery-storage-2.12.0 google-cloud-core-2.2.2 google-crc32c-1.3.0 google-resumable-media-2.2.1 googleapis-common-protos-1.54.0 grpcio-1.44.0 grpcio-status-1.44.0 idna-2.10 isodate-0.6.1 msal-1.8.0 msrest-0.6.21 numpy-1.19.1 oauthlib-3.2.0 packaging-21.3 pandas-1.1.0 pandas-gbq-0.16.0 proto-plus-1.20.3 protobuf-3.19.4 psycopg2-2.8.5 pyarrow-6.0.1 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.21 pydata-google-auth-1.3.0 pyparsing-3.0.7 python-dateutil-2.8.2 pytz-2021.3 requests-2.24.0 requests-oauthlib-1.3.1 rsa-4.8 setuptools-60.9.3 six-1.16.0 urllib3-1.25.10
16:39:40 <func_name_2>: WARNING: You are using pip version 20.2.3; however, version 22.0.3 is available.
16:39:40 <func_name_2>: You should consider upgrading via the '/tmp/oryx/platforms/python/3.7.12/bin/python3.7 -m pip install --upgrade pip' command.
16:39:40 <func_name_2>: Done in 49 sec(s).
16:39:40 <func_name_2>: Copying files to destination directory '/home/site/wwwroot'...
16:39:46 <func_name_2>: Done in 6 sec(s).
16:39:46 <func_name_2>: Removing existing manifest file
16:39:46 <func_name_2>: Creating a manifest file...
16:39:46 <func_name_2>: Manifest file created.
16:39:46 <func_name_2>: Done in 62 sec(s).
16:39:47 <func_name_2>: Running post deployment command(s)...
16:39:50 <func_name_2>: Triggering recycle (preview mode disabled).
16:39:53 <func_name_2>: Linux Consumption plan has a 1.5 GB memory limit on a remote build container.
16:39:54 <func_name_2>: To check our service limit, please visit https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale#service-limits
16:39:54 <func_name_2>: Creating placeholder blob for linux consumption function app...
16:39:54 <func_name_2>: Malformed SCM_RUN_FROM_PACKAGE when uploading built content.
16:40:19 <func_name_2>: Deployment failed.

The function app on the second account was just created before deployment process. I tried to deploy it to another function app on the same account – same error.

I’ve also tried the ways that have been mentioned in here.

I ran the command to the function app at the 2nd account:

func azure functionapp publish <func_name_2> --build remote

The output was: output of --build remote The function app was created 2 days ago. Could this be caused if the resource group creation date was before the aforementioned August 1st, 2019? (I don’t know the date of resource group creation)

Then, I ran the command:

func azure functionapp publish <func_name_2> --build local

I got the error: outpu of --build local As for me there’s no sense in this error because this program deploys on the funcion app at the 1st account.

PS: Configurations on both function apps on both accounts are the same.

Any hints how to solve this problem are welcome.

Advertisement

Answer

The issue was in function app creation.

  • Deployment doesn’t work for function app that have been created through Azure Portal.
  • Deployment works for function app that have been created through Visual Studio Code.

*parameters were set the same for both options.

But i’m still interested in the reason why this difference of function app creation happens.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement