Project

General

Profile

Actions

Bug #25155

closed

Resources upload over 8 MB show error in log and not in UI

Added by Elaad FURREEDAN 5 months ago. Updated 3 months ago.

Status:
Released
Priority:
N/A
Category:
Web - Technique editor
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
I was bothered the first time
User visibility:
Infrequent - complex configurations | third party integrations
Effort required:
Medium
Priority:
6
Name check:
To do
Fix check:
Checked
Regression:
No

Description

If we try to upload a file over 8Mb in the file manager in technique editor, it generates an error notification without any information.
In the webapp logs we can see exception raised :

2024-07-16 08:52:32+0000 ERROR net.liftweb.http.LiftRules - Exception being returned to browser when processing /secure/api/resourceExplorer/toto_hello/1.0/ncf_techniques
org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (4327145850) exceeds the configured maximum (8388608)
>-at org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.<init>(FileUploadBase.java:1007)
>-at org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:334)
>-at org.apache.commons.fileupload.servlet.ServletFileUpload.getItemIterator(ServletFileUpload.java:152)
>-at net.liftweb.http.provider.servlet.HTTPRequestServlet$$anon$1.<init>(HTTPRequestServlet.scala:139)
>-at net.liftweb.http.provider.servlet.HTTPRequestServlet.extractFiles(HTTPRequestServlet.scala:129)
>-at net.liftweb.http.Req$.$anonfun$apply$14(Req.scala:479)
>-at net.liftweb.http.AvoidGAL.thunk$lzycompute(Req.scala:365)
>-at net.liftweb.http.AvoidGAL.thunk(Req.scala:365)
>-at net.liftweb.http.Req$.$anonfun$apply$26(Req.scala:516)
>-at net.liftweb.http.Req.x$46$lzycompute(Req.scala:983)
>-at net.liftweb.http.Req.x$46(Req.scala:979)

The problem here is that we want to know in the UI with a clear error message that the problem is that the file is too big.


Files

clipboard-202409181213-elpzb.png (24 KB) clipboard-202409181213-elpzb.png Clark ANDRIANASOLO, 2024-09-18 12:13
clipboard-202409181214-2g3yw.png (22.7 KB) clipboard-202409181214-2g3yw.png Clark ANDRIANASOLO, 2024-09-18 12:14

Subtasks 1 (0 open1 closed)

Bug #25488: Resource upload with file too big cause network error in firefoxReleasedRaphael GAUTHIERActions
Actions #1

Updated by Vincent MEMBRÉ 5 months ago

  • Target version changed from 8.1.6 to 8.1.7
Actions #2

Updated by François ARMAND 4 months ago

  • Subject changed from Resources upload over 8 MB generate error to Resources upload over 8 MB show error in log and not in UI
  • Description updated (diff)
Actions #3

Updated by Clark ANDRIANASOLO 4 months ago

  • Status changed from New to In progress
  • Assignee set to Clark ANDRIANASOLO
Actions #4

Updated by Clark ANDRIANASOLO 4 months ago

In Google Chrome, the error is passed from the API result as a 500 error with the server details in development mode (not JSON response).
But in Firefox, the error is rather a connection error between client and server, with a NS_ERROR_NET_RESET code, which does not even result in reading the server response (likely because the server is terminating the connection early and Firefox does not specifically like it).

We want a common JSON from the server with a 413 (Request entity too large) error code on both browsers and as a user notification

Actions #5

Updated by Clark ANDRIANASOLO 4 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Clark ANDRIANASOLO to François ARMAND
  • Pull Request set to https://github.com/Normation/rudder/pull/5828
Actions #6

Updated by Clark ANDRIANASOLO 4 months ago

  • Status changed from Pending technical review to Pending release

Updated by Clark ANDRIANASOLO 3 months ago

In Chrome the error is showing successfully :

But in Firefox we still get a network error message :

Actions #8

Updated by Clark ANDRIANASOLO 3 months ago

  • Subtask #25488 added
Actions #9

Updated by Clark ANDRIANASOLO 3 months ago

  • Fix check changed from Error - Blocking to Checked

Checked with #25488

Actions #10

Updated by Vincent MEMBRÉ 3 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 8.1.7 which was released today.

Actions

Also available in: Atom PDF