Skip to content
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

azure function app error: Runtime dependency PyGObject is missing, Linux Module ‘gi’ not found #12152

Closed
glarose13 opened this issue Jun 22, 2020 · 5 comments
Assignees
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that

Comments

@glarose13
Copy link

Sharing information on experience with azure-identity 1.4.0b5

  • Package Name: azure-identity
  • Package Version: 1.4.0b5
  • Operating System: Linux
  • Python Version: 3.7

Describe the bug
Execution of python 3.7 azure function app with storage queue trigger -> text file processing method, created expected output, but showed trace error of Runtime dependency PyGObject missing, Linux model 'gi' missing. The function app application settings included only AzureWebJobsStorage and STORAGE_BLOB_URL values.

Error
2020-06-15 20:49:38.928
Runtime dependency of PyGObject is missing. Depends on your Linux distro, you could install it system-wide by something like: sudo apt install python3-gi python3-gi-cairo gir1.2-secret-1 If necessary, please refer to PyGObject's doc: https://pygobject.readthedocs.io/en/latest/getting_started.html Traceback (most recent call last): File "/home/site/wwwroot/.python_packages/lib/site-packages/msal_extensions/libsecret.py", line 21, in import gi # https://github.com/AzureAD/microsoft-authentication-extensions-for-python/wiki/Encryption-on-Linux ModuleNotFoundError: No module named 'gi'

To Reproduce
Steps to reproduce the behavior:

  1. in vs code create new project with azure queue storage trigger template
  2. see int.py Copy

Expected behavior
With missing function app application setting values would have expected trace error messages referencing missing credentials.
Output created as expected, however error prevented further deployment.
see trace error message

Additional context
After switching to azure-identity == 1.3.1 the issue with credentials became obvious in trace error messages.
Adding AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET to function app application setting, error was resolved.

With 1.4.05b, the "Runtime dependency PyGObject missing and Linux model 'gi'" error message, expected output created and trace info "Executed 'Functions.TextQueue' (Succeeded, Id=898731fa-c983-4b37-b281-644a55a9f5a9)" was interpreted as pointing away from credentials issue.

@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jun 22, 2020
@kaerm kaerm added Azure.Identity Client This issue points to a problem in the data-plane of the library. labels Jun 22, 2020
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Jun 22, 2020
@kaerm
Copy link
Contributor

kaerm commented Jun 22, 2020

@glarose13 thanks for reporting this, cc: @chlowell can you take a look at this

@chlowell
Copy link
Member

Output created as expected, however error prevented further deployment.

Do you mean you didn't continue because you were concerned something was wrong, or that your deployment failed due to the error?

That log output comes from a dependency, msal-extensions, which we use to implement an optional feature. In azure-identity we anticipate and handle the error but msal-extensions logs that message all the same. Your code doesn't use the optional feature, so it's safe to ignore the error. We may be able to avoid logging it in some more cases. In the meantime you can avoid it by pre-emptively disabling the feature:

DefaultAzureCredential(exclude_shared_token_cache_credential=True)

@glarose13
Copy link
Author

thank you @chlowell, yes did not continue as I was concerned something wrong that could have future unexpected impact on production. will test with disabling feature. thank you for the quick response and the helpful description of the log output.

@erfannariman
Copy link

Were you able to solve this @glarose13? I have the same issue. Weird part is that we have been deploying functions quite a while and this error pops up since the last couple of days.

@chlowell
Copy link
Member

chlowell commented Aug 4, 2021

As described above, this is a log message emitted by a dependency azure-identity uses to implement an optional feature (which isn't useful in typical Azure Functions apps). The message doesn't indicate anything wrong with your application so you can safely ignore it or filter it out with with Python's logging module. A future version of the dependency will not log this message (AzureAD/microsoft-authentication-extensions-for-python#93).

@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

4 participants