Stock export from UI fails with session timeout/redirect to welcome page – workaround via API + curl #11071
-
|
Hi all, So, I'm running InvenTree version 1.1.6 (API version 421) in Docker mode on Ubuntu with Docker Desktop, using the official stable image (ghcr.io/inventree/inventree:stable). PostgreSQL backend, plugin support enabled. Server status shows one issue: Background Worker not running (INVE-W5). Here's the problem. When trying to export stock data from the Stock page using the built-in "Download Data" button (CSV or XLSX), the process starts, shows "process completed", but no file downloads. Instead, a new browser tab opens to the post-login welcome/home page. This happens consistently in Brave, with pop-up blockers disabled and other downloads working fine. After extensive troubleshooting, here’s what was discovered and the workaround that finally worked. Problems Encountered: -UI export is synchronous and slow → exceeds Django session timeout → mid-export the session expires → server redirects the download response to the login/welcome page instead of sending the file. Working Solution (CLI-based, bypasses all UI/session issues): -Use curl with basic auth to hit the API directly: This method is fast, reliable, and repeatable, no more timeouts or redirects. Questions for the Community: -Is the synchronous export timeout still a known limitation in 1.1.6? (I saw #6389 about moving exports to background tasks, any progress or ETA? The missing background worker might be related.) -Why does ?export=csv return JSON instead of CSV in the current stable Docker image? Are the CSV/XLSX renderers disabled or missing dependencies (e.g., openpyxl)? -Are there any plugins, report builders, or custom report templates the community recommends for easier, more intuitive stock/part reports (ideally with proper CSV/XLSX and background processing)? -Any config tweaks or simple fixes to get the background worker running and enable async exports? I'd love to hear if others on 1.1.x are seeing the same behavior and what solutions (plugins, custom reports, Docker env tweaks) you're using. The CLI method works great, but a smoother UI or plugin-based experience would be ideal for regular reporting. TYSMIA! P.S. I'm happy to share container logs, docker ps output, or more details if helpful. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
This sounds like you are not reading the right docs. Just deploying one instance of the image is not going to cut it, please read https://docs.inventree.org/en/stable/start/docker/ |
Beta Was this translation helpful? Give feedback.
This sounds like you are not reading the right docs. Just deploying one instance of the image is not going to cut it, please read https://docs.inventree.org/en/stable/start/docker/