Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

Firefox only downloads PDF successfully first time after cache clear

  • 2 trả lời
  • 0 gặp vấn đề này
  • 33 lượt xem
  • Trả lời mới nhất được viết bởi brendan8

more options

I'm developing a PHP Symfony based website powered by nginx-full 1.18.0-6ubuntu14.4, one of the functions is to allow people to download a PDF invoice.

When it fails Firefox shows an alert "Downloading (Failed) The browser application closed unexpectedly."

On my linux desktop; when I use Chromium 114.0.5735.198 this functions works 100% of the time. when I use Firefox 114.0.2 (64-bit) the PDF download only works ONCE after that the download never completes and I'm left with a partial/corrupted 75.7KiB file named filename.Br-neZWO.pdf.part etc.

I have discovered that if I clear the firefox cache I can perform one successful download again. or I can restart Nginx and again Firefox will perform one successful download again.

I've tried altering many Nginx settings, cache, gzip, sendfile etc with no effect. It might be Nginx related but it does not effect Chrome at all which is why I've started this ticket.

Any help in debugging this would be greatly appreciated.

I'm developing a PHP Symfony based website powered by nginx-full 1.18.0-6ubuntu14.4, one of the functions is to allow people to download a PDF invoice. When it fails Firefox shows an alert "Downloading (Failed) The browser application closed unexpectedly." On my linux desktop; when I use Chromium 114.0.5735.198 this functions works 100% of the time. when I use Firefox 114.0.2 (64-bit) the PDF download only works ONCE after that the download never completes and I'm left with a partial/corrupted 75.7KiB file named filename.Br-neZWO.pdf.part etc. I have discovered that if I clear the firefox cache I can perform one successful download again. '''or''' I can restart Nginx and again Firefox will perform one successful download again. I've tried altering many Nginx settings, cache, gzip, sendfile etc with no effect. It might be Nginx related but it does not effect Chrome at all which is why I've started this ticket. Any help in debugging this would be greatly appreciated.

Giải pháp được chọn

SOLVED: In our code there was a missing "exit" after download function. Chrome was obviously more tolerant for some reason. Specifically after dompdf download function ( $dompdf->stream() ) we added exit; which made all the difference.

Đọc câu trả lời này trong ngữ cảnh 👍 0

Tất cả các câu trả lời (2)

more options

I should of also mentioned the problem persists even using safe-mode so its not extension related.

more options

Giải pháp được chọn

SOLVED: In our code there was a missing "exit" after download function. Chrome was obviously more tolerant for some reason. Specifically after dompdf download function ( $dompdf->stream() ) we added exit; which made all the difference.

Được chỉnh sửa bởi brendan8 vào