Announcement

Collapse
No announcement yet.

Broken docker installation after attempted upgrade: cannot locate tcpdf-config.php

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Broken docker installation after attempted upgrade: cannot locate tcpdf-config.php

    Hello-

    I am running EspoCRM on Docker via Portainer using Docker Compose. I've been running it for a while without problems. Active version was 8.0.6, which had been upgraded successfully from prior verisons. I'm using the standard container build- espocrm/espocrm, not with any other specific builds (nginx/fpm/etc). It had been working fine until this AM when I went through to upgrade my docker apps.

    My DB is external - it's it's ownVM, not part of my compose build. Data drive is external as well (points to SAN).

    I didn't alter the compose file or anything else- just stopped/removed runing containers requested a pull of the lates image and restart the stack.


    The containers all restart but don't serve pages. The logs show failed upgrade attempts from 8.0.6 -> 8.1.4. Accessing the site also logs an error.

    In each case the error log is the same: php cannot find a vendor-supplied file:tcpdf-config.php


    PHP Fatal error: Uncaught Error: Failed opening required '/var/www/html/vendor/composer/../../application/Espo/Resources/defaults/tcpdf-config.php' (include_path='/var/www/html') in /var/www/html/vendor/composer/autoload_real.php:53
    Stack trace:
    #0 /var/www/html/vendor/composer/autoload_real.php(36): composerRequire81e67dd04e1d26db73a6b9676f976909('6 18029bee273295...', '/var/www/html/v...')
    #1 /var/www/html/vendor/autoload.php(25): ComposerAutoloaderInit81e67dd04e1d26db73a6b9676f97 6909::getLoader()
    #2 /var/www/html/bootstrap.php(33): require_once('/var/www/html/v...')
    #3 /var/www/html/rebuild.php(30): include('/var/www/html/b...')
    #4 {main}
    thrown in /var/www/html/vendor/composer/autoload_real.php on line 53

    And no, it's not there. It was in the 8.0.6 tag, but removed 8.1.

    Well after messing around for a bit I need to get back to work so I try to at least pin the container version to my existing version by specifying espocrm/espocrm:8.0.6 explicitly in my compose file. But it still doesn't work- complaining with the same error.

    What options do I have? My CRM is completely down.

    Nothing inside the container works - rebuild.php throws the same error.


    So now I'm a bit confused- I've specified a container build to use that should have that file- but I'm still getting the same error. I tried specifying the 8.1 container as well to go one point release at a time, but still get the same error.

    Given that I'm using a external filesystem pointing to /var/www/html, same as in the docker compose file example in the installation instructions, container replacements are not wiping out the application directory. (I don't want it to- I'd lose my uploaded files). I don't clearly understand how this docker container is built and why we'd be keeping the entire application filesystem outside the container rather than just the user data directory.


    ​Thanks.​

  • #2
    Hi skorvek,

    When testing the EspoCRM upgrading (from v8.0.6 to v8.1.5), no such errors were identified. Everything went successfully and without difficulties, with the options of using the default PDF engine of both Tcpdf and Dompdf.

    Do I understand correctly that you exclusively used espocrm/espocrm:latest image on a regular basis? Was the server working properly at the time of the last upgrade? Has the network connection been interrupted?

    Also, please tell me, are there any code changes or code customizations in your instance?

    For now, I can recommend trying to install the following extension via CLI: https://github.com/yurikuzn/ext-tcpdf
    Instructions for working with extensions via CLI can be found here: https://docs.espocrm.com/administrat...nds/#extension

    Also, you can try changing pdfEngine parameter in your instance configuration file ({ESPO_ROOT}/data/config.php) to Dompdf.​

    Comment

    Working...
    X