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

Railway install: No ability to create global variables #4186

Open
MLorneSmith opened this issue Oct 17, 2024 · 1 comment
Open

Railway install: No ability to create global variables #4186

MLorneSmith opened this issue Oct 17, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@MLorneSmith
Copy link

Bug Description

After the one-click install of Langflow on Railway (latest version), I can't seem to create any global variables. Getting the following error:
'Error creating variable
Fernet key must be 32 url-safe base64-encoded bytes'

Reproduction

  1. Install latest version of Langflow on railway
  2. Attempt to create a global variable

Expected behavior

I expect to be able to create a variable

Who can help?

No response

Operating System

Railway environment

Langflow Version

1.0.19

Python Version

None

Screenshot

No response

Flow File

No response

@MLorneSmith MLorneSmith added the bug Something isn't working label Oct 17, 2024
Copy link

dosubot bot commented Oct 17, 2024

Hey there, @MLorneSmith! I'm here to help you with any bugs, questions, or contributions you might have. Let's tackle this together!

I found a similar issue regarding the error message "Fernet key must be 32 url-safe base64-encoded bytes" when trying to create a global variable in Langflow version 1.0.19 on Railway. To resolve this error, ensure that the SECRET_KEY used in the get_fernet function is properly formatted. You can use the add_padding function to ensure the key is valid:

def add_padding(s):
    padding_needed = 4 - len(s) % 4
    return s + "=" * padding_needed

In the get_fernet function, use this add_padding function to ensure the SECRET_KEY is valid:

def get_fernet(settings_service=Depends(get_settings_service)):
    SECRET_KEY = settings_service.auth_settings.SECRET_KEY.get_secret_value()
    padded_secret_key = add_padding(SECRET_KEY)
    fernet = Fernet(padded_secret_key)
    return fernet

Make sure the SECRET_KEY is correctly set in your settings. If necessary, generate a new key using Fernet.generate_key() and update your settings with this new key [1].

To continue talking to Dosu, mention @dosu.

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

2 participants