Skip to content

[BUG][Web browser editor] Error message: "Deployed failed: Type Error: Failed to fetch" when I try publish my application with too large csv data file #623

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

Open
YauhenBichel opened this issue Apr 5, 2025 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@YauhenBichel
Copy link

YauhenBichel commented Apr 5, 2025

Describe the bug

  1. I uploaded csv file with size 16.3 MB. I loaded df and sql query. Preview works fine.
  2. I created an organization and generated API key
  3. I clicked Publish and set my API key.
  4. I can see the error message "Deployed failed: Type Error: Failed to fetch"
  5. I opened dev tool to check what is in console.
  6. I can see the error in PyodideService.ts:543: "Request Entity Too Large"
  7. When I decreased the size of csv file to less than 1 MB, then I saw the message that my app was published successfully and I could find the app in my packages as published

Actual behavior:
User Interface error message: "Deployed failed: Type Error: Failed to fetch"

Image

Expected behavior:
User interface error message: "the csv file is too large. Please verify the size of file. Max size of file is "

To Reproduce
Steps to reproduce the behavior:

  1. Go to left menu and click upload csv file with size >= 16.3 MB
  2. Click on hello.py and load dataframe
  3. Generate API Key and click Publish
  4. See error "Deployed failed: Type Error: Failed to fetch"

Expected behavior
A clear and concise description of error related to size of uploaded csv file

Screenshots
Please see attached screenshot
Image

Environment:

  • OS: macOS
  • Browser: chrome
  • Version: Version 134.0.6998.166 (Official Build) (arm64)

Additional context
The same behavior I deploy using CLI app

.venv(base) yauhenbichel@Jenyas-MacBook-Pro test_large_file % preswald deploy --target structured
Starting production deployment... 🚀
Enter your GitHub username: YauhenBichel
Enter your Structured Cloud API key: xxxxxxxxxxxx
❌ Deployment failed: 413 Client Error: Request Entity Too Large for url: https://deployer.preswald.com/deploy
Deployment failed: Production deployment failed: 413 Client Error: Request Entity Too Large for url: https://deployer.preswald.com/deploy ❌
Image
@YauhenBichel YauhenBichel added the bug Something isn't working label Apr 5, 2025
@YauhenBichel YauhenBichel changed the title [BUG] [BUG] Error message: "Deployed failed: Type Error: Failed to fetch" when I try publish my application with too large csv data file Apr 5, 2025
@YauhenBichel YauhenBichel changed the title [BUG] Error message: "Deployed failed: Type Error: Failed to fetch" when I try publish my application with too large csv data file [BUG][Web browser editor] Error message: "Deployed failed: Type Error: Failed to fetch" when I try publish my application with too large csv data file Apr 5, 2025
@avyuktsoni0731
Copy link

@YauhenBichel How large would your CSV file be? This error sometimes happens when you've unexpectedly modified the pyproject.toml file, or have not made a new import named [data.weatherhistory_csv] in your case, in the preswald.toml file.

@avyuktsoni0731
Copy link

@YauhenBichel How large would your CSV file be? This error sometimes happens when you've unexpectedly modified the pyproject.toml file, or have not made a new import named [data.weatherhistory_csv] in your case, in the preswald.toml file.

By this I mean, number of rows.

@YauhenBichel
Copy link
Author

YauhenBichel commented Apr 6, 2025

Hi @avyuktsoni0731

I wrote the size of file in steps to reproduce
The size is 16.3 MB

The kaggle reference to dataset is https://www.kaggle.com/datasets/muthuj7/weather-dataset/data

The number of rows 96454

Image

@YauhenBichel
Copy link
Author

YauhenBichel commented Apr 6, 2025

@YauhenBichel How large would your CSV file be? This error sometimes happens when you've unexpectedly modified the pyproject.toml file, or have not made a new import named [data.weatherhistory_csv] in your case, in the preswald.toml file.

By this I mean, number of rows.

I updated my toml file by adding a new dataset.
With reference to preswald, a new dataset should be in preswals.toml

My changes work well by decreasing the size of dataset less than 1 MB
My changes are in preswald.toml file

[data.weatherhistory_csv]
type = "csv"
path = "data/weatherHistory.csv"

[data.sample_csv]
type = "csv"
path = "data/sample.csv"

@YauhenBichel
Copy link
Author

YauhenBichel commented Apr 6, 2025

I checked nginx settings

	client_max_body_size 1024M;

1024 MB should be fine, I beleive

Image

@YauhenBichel
Copy link
Author

Maybe the issue is related to limit of file size in a request

https://cloud.google.com/run/quotas#networking_limits

Maximum HTTP/1 request size | 32 MiB if using HTTP/1 server. No limit if using HTTP/2 server.

@YauhenBichel
Copy link
Author

YauhenBichel commented Apr 6, 2025

Maybe, the issue is related to reading response by chunks

Image

@Dextron04
Copy link

I'll fork it and try to look for a solution

@starrylight90
Copy link

@Dextron04 @YauhenBichel Did you find a solution yet?
I tried the same, gives me 413 request entity too large. I uploaded my zip (1.32 Mb) containing hello.py, preswald.toml, data/<data_file.csv> and images/<two images files, one ico and one png>, it still gave me 413 in postman.

Please advise

@shivam-singhal
Copy link
Member

Hi all, we're looking into this issue - the supported file size should be much larger, but for some reason caps out at around 1MB

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

6 participants