PlatformException(error, Promise was rejected with a value of 'undefined'.,null, null)

v5.5.104 with the same error after migrating via ZIP file.
PDFs are created via PhantomJS wit the API key.

After NN hours, here is the solution:
the PDFs are stored in the public/storage folder. If the Web server is unable to write there, you will get empty PDF files via ‘Download’ or the error mentioned.

sudo chmod -R g+w public/storage
sudo chgrp -R www-data public/storage

Also, storage should be webserver-writable, so

sudo chmod -R g+w storage
sudo chgrp -R www-data storage

Please adjust the www-data to the group your www server is running.

1 Like