I wrote my thesis using Overleaf back in February and now wanted to go back to create a LaTeX template for some friends who are going to start writing soon too.

Issue: After downloading the project zip and re-uploading the project again the project just stopped compiling. I did not do any changes to the documents, the old thesis project still compiles fine but the re-upload throws the following error:

NoPDF Error

This compile didn’t produce a PDF. This can happen if: There is an
unrecoverable LaTeX error. If there are LaTeX errors shown below or in
the raw logs, please try to fix them and compile again. The document
environment contains no content. If it’s empty, please add some
content and compile again. This project contains a file called
output.pdf. If that file exists, please rename it and compile again.

Emergency stop

<*> docclass.tex
*** (job aborted, no legal \end found)

  Here is how much of TeX's memory you used:  18 strings out of 477678
409 string characters out of 5829488  299848 words of memory out of
5000000  18915 multiletter control sequences out of 15000+600000 
469259 words of font info for 28 fonts, out of 8000000 for 9000  1141
hyphenation exceptions out of 8191  13i,0n,12p,94b,10s stack positions
out of 10000i,1000n,20000p,200000b,200000s !  ==> Fatal error
occurred, no output PDF file produced!

Some other threads suggested to move the \end{document} towards the top of the document to try to find out where the compile error occurs but even if I put it right after begin{document} it still generates the same error.

I assume therefore that the error might be somewhere in the configuration files. Could it be that Overleaf changed some versions and now my (relatively old) template isn't supported anymore while the old project still runs because of cached files?

I'm at a loss currently, the error messages are so cryptic and unspecific I really need some help.

the docclass.tex file it is referring to looks as follows and should be valid:

    final ]{scrreprt}
  • 2
    There is "This project contains a file called output.pdf. If that file exists, please rename it and compile again." When you downloaded and then reuploaded, did you upload the pdf? Overleaf doesn't want to overwrite a file you uploaded, so it won't create that file, which is what you need.
    – Teepeemm
    Commented Mar 13, 2023 at 18:31
  • There is no file called 'output.pdf' inside the folder structure, but a 'thesis.pdf' I tried deleting and recompiling and also uploading it completely new, having the thesis.pdf removed before the upload and in both cases the same error message occurs
    – deluroth
    Commented Mar 13, 2023 at 18:58
  • 1
    check your main document in the sidebar if you upload multiple files overleaf has to guess which is the main document Commented Mar 13, 2023 at 19:06
  • 2
    Do you see the same problem if you create a new project from your thesis in Overleaf by copying it? If so, it may be related to the fact that new projects get the most recent TeX Live version, while your original may be running on an older version: it's possible there's a change in TeX Live that is leading to this. If that sounds like a possibility, try changing the TeX Live version in the new project to be the same as in the old project. If you'd like a support team member to look at the issue, please contact [email protected]. Commented Mar 13, 2023 at 19:08
  • 2
    THANK YOU oh my goodness, the Tip from David helped. On reupload the main file wasn't selected properly. /Facepalm Things you forget to re-check when you dont work with this thing for a couple of weeks I guess. I'll submit an answer so people who run into a similar issue can find this thread
    – deluroth
    Commented Mar 13, 2023 at 19:22

1 Answer 1


When occuring such error and moving the \end{document} around to rule out compile errors at different points in your document, make sure to re-check that the correct main file is set up (Menu -> Main) and also try out older TexLive Versions from the dropdown to see if the template is still supported by an older version!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .