Bug #25155
closedResources upload over 8 MB show error in log and not in UI
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
Updated by Vincent MEMBRÉ 5 months ago
- Target version changed from 8.1.6 to 8.1.7
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)
Updated by Clark ANDRIANASOLO 4 months ago
- Status changed from New to In progress
- Assignee set to Clark ANDRIANASOLO
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
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
Updated by Clark ANDRIANASOLO 4 months ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|f866ced169f46c8588776533e6a4a7d36be0b111.
Updated by Clark ANDRIANASOLO 3 months ago
- File clipboard-202409181213-elpzb.png clipboard-202409181213-elpzb.png added
- File clipboard-202409181214-2g3yw.png clipboard-202409181214-2g3yw.png added
- Fix check changed from To do to Error - Blocking
In Chrome the error is showing successfully :
But in Firefox we still get a network error message :
Updated by Clark ANDRIANASOLO 3 months ago
- Fix check changed from Error - Blocking to Checked
Checked with #25488
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.