Closed gorbunkov closed 5 days ago
Cannot reproduce on Windows 10 and Chrome 127.0.6533.120. Need to check on MacOS and Ubuntu.
Tested on Ubuntu on original project: Jmix version: 2.2.3 Jmix Studio plugin version: 2.3.0-241 IntelliJ version: IntelliJ IDEA 2024.1.5 (Community Edition)
Tested on Ubuntu on IJ IDEA 233: 1) Jmix version: 2.2.3 Jmix Studio plugin version: 2.3.SNAPSHOT6711-233 IntelliJ version: IntelliJ IDEA 2023.3.7 (Community Edition) 2) Jmix version: 2.3.1 Jmix Studio plugin version: 2.3.SNAPSHOT6711-233 IntelliJ version: IntelliJ IDEA 2023.3.7 (Community Edition)
Tested on Ubuntu on IJ IDEA 241: 1) Jmix version: 2.2.3 Jmix Studio plugin version: 2.3.SNAPSHOT6714-241 IntelliJ version: IntelliJ IDEA 2024.1.5 (Community Edition) 2) Jmix version: 2.3.1 Jmix Studio plugin version: 2.3.SNAPSHOT6714-241 IntelliJ version: IntelliJ IDEA 2024.1.5 (Community Edition)
Tested on Mac-Mini: 1) Jmix version: 2.3.999-SNAPSHOT Jmix Studio plugin version: 2.3.2-233 IntelliJ version: IntelliJ IDEA 2023.3.7 (Community Edition) 2) Jmix version: 2.3.999-SNAPSHOT Jmix Studio plugin version: 2.3.SNAPSHOT6674-242 IntelliJ version: IntelliJ IDEA 2024.2 RC (Community Edition)
The PDF file is loads correctly - Ok.
This is still not solved. But I cannot figure out what is exact cause of this Chrome behavior. I see you did some testing, but I still have problem with it. Now I am on latest version 2.3.4 and Chrome Version 130.0.6723.58 (Official Build) (64-bit) and it is still present. Another user of my jmix app confirmed it to me also (linux mint, chrome) and I believe @gorbunkov was able to simulate it too, that is why this issue exists.
Reproduced in Chrome v131.0.6778.86. The Jmix downloader creates a file in the temporary directory during the process and deletes it after the 'view' or 'download.' The problem is that Chrome sends a second request for this file (PDF), but it has already been deleted.
It is necessary to check the opening of PDF in different browsers
Tested on: Jmix version: 2.4.999-SNAPSHOT Jmix Studio plugin version: 2.5.SNAPSHOT6966-243 IntelliJ version: IntelliJ IDEA 2024.3 (Community Edition)
The downloaded file has valid length.
Environment
Jmix version: 2.2.3
Bug Description
NullPointerException appears when users try to download the PDF file from the Chrome PDF viewer.
See forum topic.
Steps To Reproduce
Create a screen that downloads a PDF file using the
Downloader
bean, for example:Run the application, and initiate the downloading.
The PDF file will be opened in Chrome browser.
Try to download the file using the button in Chrome PDF viewer:
Current Behavior
An exception will be thrown and the file with 0 bytes size will be downloaded.
It looks like Chrome tries to access downloader controller multiple times: when it opens the document for preview and when the download button in the viewer is clicked.
Expected Behavior
File dowloaded successfully.
Sample Project
pdf-download.zip