Cannot locate jwt package in app_check.py after updating to firebase-admin-python V6.0.0
envgap__firebase__firebase-admin-python-653
01 / FAILURE SIGNATURE
As reported upstream
Error: While importing 'api', an ImportError was raised:
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
d7772f97a7974ee7973343e782d38a15de5dcfa3- Manifest
setup.py- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
firebase/firebase-admin-python #653 · read the original issue
### [REQUIRED] Step 2: Describe your environment
* Operating System version: MacOS 10.15.7
* Firebase SDK version: `V6.0.0`
* Firebase Product: `app_check`
* Python version: 3.7.9
* Pip version: 22.1.2
### [REQUIRED] Step 3: Describe the problem
Updated to V6.0.0 and attempted to run my development server within Flask and encountered the following errors:
```
Error: While importing 'api', an ImportError was raised:
Traceback (most recent call last):
File "/Users/kdfriedman/Desktop/curate-ai-python-api/env/lib/python3.7/site-packages/flask/cli.py", line 218, in locate_app
__import__(module_name)
File "/Users/kdfriedman/Desktop/curate-ai-python-api/api/api.py", line 2, in <module>
from auth import validate_auth, validate_app
File "/Users/kdfriedman/Desktop/curate-ai-python-api/api/auth.py", line 2, in <module>
from service.firebase import verify_auth_token, verify_app_token
File "/Users/kdfriedman/Desktop/curate-ai-python-api/api/service/firebase.py", line 2, in <module>
from firebase_admin import credentials, auth, firestore, app_check
File "/Users/kdfriedman/Desktop/curate-ai-python-api/env/lib/python3.7/site-packages/firebase_admin/app_check.py", line 18, in <module>
import jwt
ModuleNotFoundError: No module named 'jwt'
```
After attempting to install the jwt package to fix the issue, a new error occurred:
```
Error: While importing 'api', an ImportError was raised:
Traceback (most recent call last):
File "/Users/kdfriedman/Desktop/curate-ai-python-api/env/lib/python3.7/site-packages/flask/cli.py", line 218, in locate_app
__import__(module_name)
File "/Users/kdfriedman/Desktop/curate-ai-python-api/api/api.py", line 2, in <module>
from auth import validate_auth, validate_app
File "/Users/kdfriedman/Desktop/curate-ai-python-api/api/auth.py", line 2, in <module>
from service.firebase import verify_auth_token, verify_app_token
File "/Users/kdfriedman/Desktop/curate-ai-python-api/api/service/firebase.py", line 2, in <module>
from firebase_admin import credentials, auth, firestore, app_check
File "/Users/kdfriedman/Desktop/curate-ai-python-api/env/lib/python3.7/site-packages/firebase_admin/app_check.py", line 19, in <module>
from jwt import PyJWKClient, ExpiredSignatureError, InvalidTokenError
ImportError: cannot import name 'PyJWKClient' from 'jwt' (/Users/kdfriedman/Desktop/curate-ai-python-api/env/lib/python3.7/site-packages/jwt/__init__.py)
```
#### Steps to reproduce:
I updated to V6 of the SDK and immediately encountered this issue. When I attempted to install the jwt package, a different error occurred.
#### Relevant Code:
```
import firebase_admin
from firebase_admin import credentials, auth, firestore, app_check
import os
# Initialize the default app
ENV_KEYS = {
"CREDS_GO_HERE"
}
CREDENTIALS = credentials.Certificate(ENV_KEYS)
firebase_app = firebase_admin.initialize_app(CREDENTIALS)
verify_app_token = app_check.verify_token
```
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]