theonedev/onedev · critical · RuntimeException
internal error
Error message
internal error
What it means
The message 'internal error' is produced by rethrowing a caught FileUploadException or IOException from the NuGet publish handler as a RuntimeException with the exception as cause. The client sees a 500-style internal error indicating the uploaded package stream could not be read or parsed, with the root cause (disk I/O, multipart parse failure, network truncation) attached.
Source
Thrown at server-plugin/server-plugin-pack-nuget/src/main/java/io/onedev/server/plugin/pack/nuget/NugetPackHandler.java:330
packBlobs.add(nupkgBlob);
pack.setData(new NugetData(data.getNupkgBlobSha256Hash(), snupkgBlob.getSha256Hash(),
data.getMetadata()));
packService.createOrUpdate(pack, packBlobs, false);
response.setStatus(SC_CREATED);
}
}));
} catch (ParseException e) {
logger.warn("Package version is not a SemVer v2 compatible version");
throw new ClientException(SC_BAD_REQUEST);
} finally {
FileUtils.deleteFile(tempFile);
}
} else {
throw new ClientException(SC_BAD_REQUEST);
}
} catch (FileUploadException | IOException e) {
throw new RuntimeException(e);
}
} else if (isDelete) {
if (pathSegments.isEmpty()) {
logger.warn("Package id is missing");
throw new ClientException(SC_BAD_REQUEST);
}
var name = pathSegments.get(0);
pathSegments = pathSegments.subList(1, pathSegments.size());
if (pathSegments.isEmpty()) {
logger.warn("Package version is missing");
throw new ClientException(SC_BAD_REQUEST);
}
var version = pathSegments.get(0);
LockUtils.run(getLockName(projectId, name), () -> transactionService.run(() -> {
var project = checkProject(projectId, true);
var pack = packService.findByNameAndVersion(project, TYPE, name, version);
if (pack != null) {View on GitHub (pinned to d44925c47c)
Solutions
- Inspect the OneDev server log for the RuntimeException's cause to identify the underlying FileUploadException/IOException.
- Retry the push; for flaky connections use a resumable/robust network path or run the push from the same network as the server.
- Increase proxy/upload size limits (nginx client_max_body_size, container max POST size) for large .nupkg files.
- Verify server disk space and write permissions on the servlet temp directory used for upload staging.
- Confirm the push uses the standard NuGet push protocol against the OneDev NuGet source rather than a hand-crafted upload.
Example fix
// before — nginx truncating large uploads client_max_body_size 10m; // after client_max_body_size 500m;
Defensive patterns
Strategy: try-catch
Validate before calling
# Check upload size limits and server reachability before pushing
SIZE=$(stat -c%s *.nupkg)
LIMIT=$((500*1024*1024))
if [ "$SIZE" -gt "$LIMIT" ]; then echo "Package exceeds 500MB upload limit"; exit 1; fi
curl -fsS -o /dev/null "${ONDEV_URL}/nuget/${PROJECT}/index.json" || { echo 'NuGet source unreachable'; exit 1; } Try / catch
try {
dotnet nuget push pkg.nupkg -s $ONDEV_SOURCE -k $TOKEN;
} catch {
echo "Push failed with internal error; check OneDev server log for the FileUploadException/IOException cause (truncated upload, disk space, temp dir permissions).";
} Prevention
- Raise proxy and servlet upload size limits for large .nupkg files.
- Monitor server disk space and temp directory permissions.
- Retry pushes on flaky networks; inspect server logs for the root cause.
- Push with standard NuGet clients to guarantee well-formed multipart bodies.
When it happens
Trigger: PUT push where reading the multipart upload or temp file throws FileUploadException or IOException — e.g. malformed multipart body, interrupted connection, or disk failure while staging the temp .nupkg.
Common situations: Large packages exceeding a proxy's body size limit and getting cut off mid-upload; flaky network between CI and OneDev; servlet container temp directory permissions or full disk causing temp file writes to fail; a non-NuGet client POSTing a malformed body to the push endpoint.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06).
Data as JSON: /api/errors/55f38cbb95714e8b.
Report an issue: GitHub.