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

Unable to Add Featured Items to Collections – 413 Error #11238

Closed
ofahimIQSS opened this issue Feb 7, 2025 · 12 comments
Closed

Unable to Add Featured Items to Collections – 413 Error #11238

ofahimIQSS opened this issue Feb 7, 2025 · 12 comments
Assignees
Labels
FY25 Sprint 17 FY25 Sprint 17 (2025-02-12 - 2025-02-26) GREI Re-arch Issues related to the GREI Dataverse rearchitecture Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q1 Not related to any specific Q1 feature SPA These changes are required for the Dataverse SPA Type: Bug a defect

Comments

@ofahimIQSS
Copy link
Contributor

Description:
Unable to add Featured Items to the Root Collection or any collection. Upon attempting to add multiple items, images, and descriptions, the system displays an undefined message, and the save action fails.

Steps to Reproduce:

  1. Navigate to http://localhost:8000/spa/collections
  2. Click on Edit > Featured Items
  3. Add 10 items
  4. Add images and descriptions to all items
  5. Click Publish

Expected Behavior
The system should successfully save the Featured Items and update the collection.

Actual Behavior
An undefined message appears
The save action does not complete
In the network console, a 413 Error (Request Entity Too Large) is observed

See Video and screenshot below:
IQSS/dataverse-frontend#596 (comment)
IQSS/dataverse-frontend#596 (comment)

@g-saracca
Copy link
Contributor

@ofahimIQSS could be helpful to know the accumulated size of the ten files you attach to the featured items or the size of each file. Many thanks!

@ofahimIQSS
Copy link
Contributor Author

ofahimIQSS commented Feb 7, 2025

Couldn't add a zip file here so just added all the images I used to test with:

Image

Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image

@GPortas GPortas transferred this issue from IQSS/dataverse-frontend Feb 10, 2025
@g-saracca g-saracca added Type: Bug a defect SPA These changes are required for the Dataverse SPA Size: 3 A percentage of a sprint. 2.1 hours. Original size: 3 SPA.Q1 Not related to any specific Q1 feature labels Feb 11, 2025
@GPortas GPortas moved this to SPRINT READY in IQSS Dataverse Project Feb 12, 2025
@g-saracca g-saracca moved this from SPRINT READY to This Sprint 🏃‍♀️ 🏃 in IQSS Dataverse Project Feb 12, 2025
@cmbz cmbz added the FY25 Sprint 17 FY25 Sprint 17 (2025-02-12 - 2025-02-26) label Feb 12, 2025
@sekmiller sekmiller moved this from This Sprint 🏃‍♀️ 🏃 to In Progress 💻 in IQSS Dataverse Project Feb 19, 2025
@sekmiller sekmiller self-assigned this Feb 19, 2025
@sekmiller
Copy link
Contributor

curl -H "X-Dataverse-key:27987dd2-8ae1-4b6d-b3f8-78a2ccfcad4d" \ -X PUT \ -F "id=0" -F "id=0" -F "id=0" -F "id=0" -F "id=0" -F "id=0" -F "id=0" -F "id=0" -F "id=0" -F "id=0" -F "id=0" -F "id=0" -F "id=0" -F "id=0" -F "id=0" -F "id=0" -F "id=0" -F "id=0" -F "id=0" -F "id=0" \ -F "content=Content 1" -F "content=Content 2" -F "content=Content 3" -F "content=Content 4" -F "content=Content 5" -F "content=Content 6" -F "content=Content 7" -F "content=Content 8" -F "content=Content 9" -F "content=Content 10" -F "content=Content 11" -F "content=Content 12" -F "content=Content 13" -F "content=Content 14" -F "content=Content 15" -F "content=Content 16" -F "content=Content 17" -F "content=Content 18" -F "content=Content 19" -F "content=Content 20"\ -F "displayOrder=1" -F "displayOrder=2" -F "displayOrder=3" -F "displayOrder=4" -F "displayOrder=5" -F "displayOrder=6" -F "displayOrder=7" -F "displayOrder=8" -F "displayOrder=9" -F "displayOrder=10" -F "displayOrder=11" -F "displayOrder=12" -F "displayOrder=13" -F "displayOrder=14" -F "displayOrder=15" -F "displayOrder=16" -F "displayOrder=17" -F "displayOrder=18" -F "displayOrder=19" -F "displayOrder=20"\ -F "fileName=Screen Shot 2025-01-16 at 10.34.06 AM.png" \ -F "fileName=Screen Shot 2025-01-16 at 3.16.00 PM.png" \ -F "fileName=DV-DataTable.png" \ -F "fileName=Screen Shot 2024-10-30 at 10.26.50 AM.png" \ -F "fileName=Screen Shot 2024-10-29 at 10.49.57 AM.png" \ -F "fileName=Screen Shot 2024-10-29 at 10.52.58 AM.png" \ -F "fileName=Seventeen Closer.png" \ -F "fileName=Screen Shot 2023-01-27 at 3.23.51 PM.png" \ -F "fileName=Screen Shot 2022-08-10 at 4.41.42 PM.png" \ -F "fileName=Screen Shot 2022-07-25 at 4.04.01 PM.png" \ -F "fileName=StudyDescriptionDDI.png" \ -F "fileName=DV-DataTable.png" \ -F "fileName=Screen Shot 2025-02-20 at 10.24.58 AM.png" \ -F "fileName=Screen Shot 2025-02-20 at 10.25.22 AM.png" \ -F "fileName=Screen Shot 2025-02-20 at 10.36.39 AM.png" \ -F "fileName=Screen Shot 2025-02-20 at 10.36.16 AM.png" \ -F "fileName=Screen Shot 2025-02-20 at 10.43.12 AM.png" \ -F "fileName=Screen Shot 2025-02-20 at 10.41.39 AM.png" \ -F "fileName=Screen Shot 2025-02-20 at 10.52.14 AM.png" \ -F "fileName=Screen Shot 2025-02-20 at 10.51.37 AM.png" \ -F "keepFile=false" -F "keepFile=false" -F "keepFile=false" -F "keepFile=false" -F "keepFile=false" -F "keepFile=false" -F "keepFile=false" -F "keepFile=false" -F "keepFile=false" -F "keepFile=false" -F "keepFile=false" -F "keepFile=false" -F "keepFile=false" -F "keepFile=false" -F "keepFile=false" -F "keepFile=false" -F "keepFile=false" -F "keepFile=false" -F "keepFile=false" -F "keepFile=false"\ -F "file=@Screen Shot 2025-01-16 at 10.34.06 AM.png" \ -F "file=@Screen Shot 2025-01-16 at 3.16.00 PM.png" \ -F "[email protected]" \ -F "file=@Screen Shot 2024-10-30 at 10.26.50 AM.png" \ -F "file=@Screen Shot 2024-10-29 at 10.49.57 AM.png" \ -F "file=@Screen Shot 2024-10-29 at 10.52.58 AM.png" \ -F "file=@Seventeen Closer.png" \ -F "file=@Screen Shot 2023-01-27 at 3.23.51 PM.png" \ -F "file=@Screen Shot 2022-08-10 at 4.41.42 PM.png" \ -F "file=@Screen Shot 2022-07-25 at 4.04.01 PM.png" \ -F "[email protected]" \ -F "[email protected]" \ -F "file=@Screen Shot 2025-02-20 at 10.24.58 AM.png" \ -F "file=@Screen Shot 2025-02-20 at 10.25.22 AM.png" \ -F "file=@Screen Shot 2025-02-20 at 10.36.39 AM.png" \ -F "file=@Screen Shot 2025-02-20 at 10.36.16 AM.png" \ -F "file=@Screen Shot 2025-02-20 at 10.43.12 AM.png" \ -F "file=@Screen Shot 2025-02-20 at 10.41.39 AM.png" \ -F "file=@Screen Shot 2025-02-20 at 10.52.14 AM.png" \ -F "file=@Screen Shot 2025-02-20 at 10.51.37 AM.png" \ "http://localhost:8080/api/dataverses/root/featuredItems"

@sekmiller
Copy link
Contributor

sekmiller commented Feb 20, 2025

I've gotten up to 20 items without failing. All of the png files are large - approaching the 1M limit. Way larger than what was failing for Omer

@g-saracca
Copy link
Contributor

Hi @sekmiller , I was able to reproduce this with 2 featured items only, one image was 772kb and the other one 896kb. See screenshot below from HTTPie.
Image

Did you try to call the get featured items endpoint after that and verify that you receive the featured items data like:

{
  "status": "OK",
  "data": [
    {
      "id": 5,
      "content": "Item 1",
      "imageFileName": "pic1.jpg",
      "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/5",
      "displayOrder": 0
    }
  ]
}

If you don't receive an imageFileName and imageFileUrl it is because the file was not uplodaded, check that the fileName matches the actual file name when calling the update endpoint.

@sekmiller
Copy link
Contributor

{ "status": "OK", "data": [ { "id": 148, "content": "Content 1", "imageFileName": "Screen Shot 2025-01-16 at 10.34.06 AM.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/148", "displayOrder": 1 }, { "id": 149, "content": "Content 2", "imageFileName": "Screen Shot 2025-01-16 at 3.16.00 PM.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/149", "displayOrder": 2 }, { "id": 150, "content": "Content 3", "imageFileName": "DV-DataTable.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/150", "displayOrder": 3 }, { "id": 151, "content": "Content 4", "imageFileName": "Screen Shot 2024-10-30 at 10.26.50 AM.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/151", "displayOrder": 4 }, { "id": 152, "content": "Content 5", "imageFileName": "Screen Shot 2024-10-29 at 10.49.57 AM.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/152", "displayOrder": 5 }, { "id": 153, "content": "Content 6", "imageFileName": "Screen Shot 2024-10-29 at 10.52.58 AM.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/153", "displayOrder": 6 }, { "id": 154, "content": "Content 7", "imageFileName": "Seventeen Closer.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/154", "displayOrder": 7 }, { "id": 155, "content": "Content 8", "imageFileName": "Screen Shot 2023-01-27 at 3.23.51 PM.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/155", "displayOrder": 8 }, { "id": 156, "content": "Content 9", "imageFileName": "Screen Shot 2022-08-10 at 4.41.42 PM.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/156", "displayOrder": 9 }, { "id": 157, "content": "Content 10", "imageFileName": "Screen Shot 2022-07-25 at 4.04.01 PM.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/157", "displayOrder": 10 }, { "id": 158, "content": "Content 11", "imageFileName": "StudyDescriptionDDI.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/158", "displayOrder": 11 }, { "id": 159, "content": "Content 12", "imageFileName": "DV-DataTable.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/159", "displayOrder": 12 }, { "id": 160, "content": "Content 13", "imageFileName": "Screen Shot 2025-02-20 at 10.24.58 AM.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/160", "displayOrder": 13 }, { "id": 161, "content": "Content 14", "imageFileName": "Screen Shot 2025-02-20 at 10.25.22 AM.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/161", "displayOrder": 14 }, { "id": 162, "content": "Content 15", "imageFileName": "Screen Shot 2025-02-20 at 10.36.39 AM.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/162", "displayOrder": 15 }, { "id": 163, "content": "Content 16", "imageFileName": "Screen Shot 2025-02-20 at 10.36.16 AM.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/163", "displayOrder": 16 }, { "id": 164, "content": "Content 17", "imageFileName": "Screen Shot 2025-02-20 at 10.43.12 AM.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/164", "displayOrder": 17 }, { "id": 165, "content": "Content 18", "imageFileName": "Screen Shot 2025-02-20 at 10.41.39 AM.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/165", "displayOrder": 18 }, { "id": 166, "content": "Content 19", "imageFileName": "Screen Shot 2025-02-20 at 10.52.14 AM.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/166", "displayOrder": 19 }, { "id": 167, "content": "Content 20", "imageFileName": "Screen Shot 2025-02-20 at 10.51.37 AM.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/167", "displayOrder": 20 }, { "id": 168, "content": "Content 21", "imageFileName": "Screen Shot 2025-02-20 at 11.18.13 AM.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/168", "displayOrder": 21 }, { "id": 169, "content": "Content 22", "imageFileName": "Screen Shot 2025-02-20 at 11.17.51 AM.png", "imageFileUrl": "http://localhost:8080/api/access/dataverseFeaturedItemImage/169", "displayOrder": 22 } ] }

@sekmiller
Copy link
Contributor

22 files successful. And if I try the image url I get the file displaying correctly.

@sekmiller
Copy link
Contributor

Image

And these are the sizes of the files

@g-saracca
Copy link
Contributor

I tried again with .png files and still failing, strange..
Could this be you having a different configuration from what it is on beta environment?
I say this because normally errors like 413 Request Entity Too Large are related to the server incoming requests size limit configuration.

@sekmiller
Copy link
Contributor

Omer is now reporting that he can no longer replicate this error

@ekraffmiller
Copy link
Contributor

ekraffmiller commented Feb 25, 2025

Steve asked me to try this and I was able to replicate the error in my local environment. I added this screen shot to 10 items: (it's 329 K)
Image

The error I got seems to be coming from nginx, not the Dataverse API:

Image

Image

@sekmiller
Copy link
Contributor

This is an issue with a setting in the dockerized environment. Updating a config file ( client_max_body_size 20M; to our nginx.conf file) fixes it. Closing

@github-project-automation github-project-automation bot moved this from In Progress 💻 to Done 🧹 in IQSS Dataverse Project Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FY25 Sprint 17 FY25 Sprint 17 (2025-02-12 - 2025-02-26) GREI Re-arch Issues related to the GREI Dataverse rearchitecture Original size: 3 Size: 3 A percentage of a sprint. 2.1 hours. SPA.Q1 Not related to any specific Q1 feature SPA These changes are required for the Dataverse SPA Type: Bug a defect
Projects
Status: Done 🧹
Development

No branches or pull requests

5 participants