-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to Generate or Preview Invoices - Page Stuck in Loading Stat #384
Comments
I get the same error message. The LOG says that I cannot access the .jpg because it does not exist. but that is not true. the file exists, the user and access rights are also correct. Traceback with variables (most recent call last): |
I have got the same issue, the file does not exist for me tho, here is the stack trace: |
thats is the code snippet:
from = https://github.com/frappe/frappe/blob/develop/frappe/core/doctype/file/utils.py analyzing this code it seems to me that first it checks if the value received exists, if it is different from an empty string, and does not start with "/files" or "/private/files", then it will check the existence of the file in the db, and if it doesn't exist, it will create a new one. It seems to me that the attacked image is not in the database and the function tries to overwrite it, generating an error. sorry for the english from the google translator |
Hello, thank you for your feedback, here are the files:
Please note that this is a new setup |
The error seems to be simpler than it seems, perhaps Python is unable to access the file's destination url. see that the function first checks if it is a url, after that it uses a function to search for the path (or url) of the file. How are your files being served? Do you have a system (eg nginx)? Can you somehow access the image via the url? As you said, this is a clean installation so I'm going to disregard that there is any app permissions setting preventing access. It will be useful to know how you did the entire process and if you have any configuration to deploy. one thing I also noticed is that @MiDOZ url starts with ./mtech.local and @RaySolo starts with /erpdev.lan, maybe thats a folder name in www, if is possible to remove this subpath, try it |
It's actually very weird, I have two different sites hosted on two different ports, both in production. System.com - Print designer layout and preview with error on MT-Sales-Invoice mtech.local designer + preview original design preview error too Error when clicking PDF download mtech.local when clicking on PDF download.txt The paths in the db are considering the root folder is the site folder. |
@MiDOZ as you can see in the error you have incorrect wkhtmltopdf version. please install correct version using instructions shared in error or in FAQ No 1. https://github.com/frappe/print_designer?tab=readme-ov-file#faq |
@maharshivpatel I installed the correct version now, but I'm presented with another error:
|
To isolate the problem, I replaced the routine get_pdf() within pdf.py, in which wkhtmltopdf is called, with a routine that works with puppeteer. The problem disappeared. The form previously created with print designer could be displayed. |
I am facing an issue while generating and previewing invoices in Frappe. Whenever I try to generate an invoice that is designed using print designer or access the preview, the page enters a loading state and eventually shows an error. However, the error logs do not display any related information, making it difficult to debug the issue.
Sna.mp4
I am using Print Designer Version:
The api request for generating the pdf is getting failed :
I would appreciate any guidance on how to troubleshoot or resolve this issue. Is there a way to enable more detailed logging to capture what’s going wrong? Or are there known issues or fixes for this behavior in the current version?
Thank you for your support!
The text was updated successfully, but these errors were encountered: