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

An error has occured while fetching types (VM instance GCP) #1518

Closed
MS-Kinguin opened this issue Mar 13, 2024 · 5 comments
Closed

An error has occured while fetching types (VM instance GCP) #1518

MS-Kinguin opened this issue Mar 13, 2024 · 5 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@MS-Kinguin
Copy link

Describe the bug
I've been attempting to deploy Langflow on a virtual machine following the guidelines outlined in the official GitHub documentation. Despite successfully reaching the stage where Langflow appears to be running, I encounter an error (as depicted in the attached screenshot) when trying to access the application via a web browser. The issue seems unrelated to external connections, as verified by the successful deployment and accessibility of a basic HTTP server on the same environment. This issue persists across various setups, including Ubuntu 22.04, Debian 11 and 12, and I've also experimented with different versions of Langflow. Could there be an underlying problem I'm missing, or are there any additional steps I could undertake to rectify this?

Browser and Version

  • Google Chrome
  • Version 122.0.6261.112

To Reproduce
Steps to reproduce the behavior:

  1. Follow the deployment from Github:
    https://github.com/logspace-ai/langflow/blob/dev/GCP_DEPLOYMENT.md
  2. Open the browser and navigate to http:https://[VM's external IP]:7860.
  3. The Langflow UI loads but displays an error message: "an error has occurred while fetching types."

Screenshots
error_langflow

Additional context

  • Firewall settings have been checked and configured to allow traffic on the relevant ports (from the script).
  • Port checks reveal that the Langflow service is listening on the intended port.
  • I have also attempted running a simple Python HTTP server on the same VM, which worked correctly and was accessible, indicating that the VM and network settings are likely correct.

I think the deployment script is really outdated (last commit was 7 month ago) because, for example it's trying to launch lagflow with the following command:

langflow --host 0.0.0.0 --port 7860

Copy link

dosubot bot commented Mar 13, 2024

Hey there, @MS-Kinguin! Great to see you back around here, diving into the depths of Langflow. Let's crack this nut together.

Based on the information you've provided, the error message "an error has occurred while fetching types" could be due to several factors. Here are some potential causes and steps to resolve the issue:

  1. Outdated Dependencies: If the deployment script is outdated, it might not be installing the correct versions of dependencies required by the Langflow application. This can lead to compatibility issues, especially if the application relies on specific versions of libraries to fetch types.

    Resolution: Update the deployment script to ensure that it installs the correct versions of all dependencies. This might involve updating the versions specified in a requirements.txt file or a similar dependency management file.

  2. Database Migration Issues: The error could be related to the application's backend not being able to fetch types due to database schema inconsistencies. This can happen if there have been changes to the database schema that are not reflected in the current state of the database on the VM.

    Resolution: Run any pending database migrations. Check the documentation or migration scripts of the Langflow application to see how to apply database migrations.

  3. Configuration Issues: The application's configuration might not be correctly set up, especially if the deployment script is outdated. This can include incorrect environment variables, missing configuration files, or incorrect settings within those files.

    Resolution: Review and update the application's configuration based on the latest version of the application's documentation. Ensure that all required environment variables and configuration files are correctly set up.

  4. Network Issues: If the application relies on external services to fetch types (e.g., a remote API), network issues could prevent the application from accessing these services.

    Resolution: Verify the VM's network connectivity and ensure that it can reach any external services the application depends on. Check firewall rules and network policies to ensure they allow the required traffic.

  5. Compatibility Issues with the VM Environment: The VM environment might not be fully compatible with the application or its dependencies, especially if significant updates have been made to the application or its runtime environment since the deployment script was last updated.

    Resolution: Ensure that the VM's operating system and runtime environment (e.g., Python version, database server version) are compatible with the latest requirements of the Langflow application. Update the VM environment as necessary.

These are speculative solutions based on the provided context. For a more accurate diagnosis, it would be necessary to have access to logs, error messages in detail, and information about the deployment script and the application's dependencies.

Regarding the specific dependencies and their versions required by the Langflow application, you can find them in the package.json file in the dev branch of the repository.

The exact command used to start the Langflow application in the deployment script is: langflow run --host 0.0.0.0. This can be found in the docker-compose.yml file in the dev branch of the repository.

I hope this helps! If you have any more questions or need further clarification, feel free to ask.

Sources

About Dosu

This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added bug Something isn't working documentation Improvements or additions to documentation labels Mar 13, 2024
@MS-Kinguin
Copy link
Author

I've seen on discord that it's worth to mention @genome21 who was the GCP architect that implemented it.

@4wmarketplace
Copy link

Same error here: #1508 (comment)

@wasubire
Copy link

Getting the same error on a Proxmox VM running debian 12. Both LXC and VM returning the same error

image

@4wmarketplace
Copy link

Found the problem: the login page tried to write a cookie but since it has the secure attribute and langflow ran on http it didn't save it, therefore the subsequent call to whoami failed (403 forbidden) because the cookie was empty.
I solved it with an nginx reverse proxy that runs in https and with the generation of a local certificate.

@dosubot dosubot bot added the stale label Jun 13, 2024
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 20, 2024
@dosubot dosubot bot removed the stale label Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants