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

JWT Error on docker deployment #5402

Open
trading-bl opened this issue Dec 23, 2024 · 1 comment
Open

JWT Error on docker deployment #5402

trading-bl opened this issue Dec 23, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@trading-bl
Copy link

Bug Description

╭─ Traceback (most recent call last)─╮             
                             │ /app/.venv/lib/python3.12/site-pac │             
                             │ kages/langflow/services/auth/utils │             
                             │ .py:119 in get_current_user_by_jwt │             
                             │                                    │             
                             │   116 │   try:                     │             
                             │   117 │   │   with warnings.catch_ │             
                             │   118 │   │   │   warnings.simplef │             
                             │ ❱ 119 │   │   │   payload = jwt.de │             
                             │       algorithms=[settings_service │             
                             │   120 │   │   user_id: UUID = payl │             
                             │   121 │   │   token_type: str = pa │             
                             │   122 │   │   if expires := payloa │             
                             │                                    │             
                             │ /app/.venv/lib/python3.12/site-pac │             
                             │ kages/jose/jwt.py:144 in decode    │             
                             │                                    │             
                             │   141 │   try:                     │             
                             │   142 │   │   payload = jws.verify │             
                             │   143 │   except JWSError as e:    │             
                             │ ❱ 144 │   │   raise JWTError(e)    │             
                             │   145 │                            │             
                             │   146 │   # Needed for at_hash ver │             
                             │   147 │   algorithm = jws.get_unve

Reproduction

  1. Deploy the latest by following the docker install of langflow. Set the host at 0.0.0.0. Error in the docker logs.

Expected behavior

  1. No JWT error. Possibly the token is hardcoded.

Who can help?

No response

Operating System

Ubuntu Linux 22.04 AMD

Langflow Version

v1.1.1

Python Version

None

Screenshot

No response

Flow File

No response

@trading-bl trading-bl added the bug Something isn't working label Dec 23, 2024
Copy link

dosubot bot commented Dec 23, 2024

Hey @trading-bl! 👋 I'm here to help you with any bugs, questions, or contributions. Let's tackle this JWT error together while we wait for a human maintainer.

The JWT error you're encountering during the Docker deployment of Langflow could be due to several reasons related to JWT decoding. Here are some potential causes and solutions:

  1. Secret Key Configuration: Ensure that the SECRET_KEY is correctly set in your environment variables or configuration files. The secret key is crucial for decoding the JWT, and if it's missing or incorrect, it will lead to a JWTError [1].

  2. Algorithm Mismatch: Verify that the algorithm specified in your settings matches the one used to sign the JWT. The default algorithm is "HS256", but if there's a mismatch, it could cause decoding errors [1].

  3. Token Expiration: Check if the token has expired. The ACCESS_TOKEN_EXPIRE_SECONDS setting determines the token's validity period. If the token is expired, it will not be valid for authentication [2].

  4. Malformed Token: Ensure that the token being used is correctly formatted and not corrupted. A malformed token can lead to decoding issues.

  5. Docker Environment Variables: Double-check that all necessary environment variables for JWT configuration are correctly set in your Docker deployment. This includes the secret key and any other relevant settings.

If the issue persists, reviewing the Docker setup and ensuring all configurations are correctly applied might help resolve the problem.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant