Skip to content
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

Error 500 on custom module deployment. #502

Open
ViralAgency opened this issue Jun 15, 2024 · 2 comments
Open

Error 500 on custom module deployment. #502

ViralAgency opened this issue Jun 15, 2024 · 2 comments
Labels
Type: Bug Something isn't working

Comments

@ViralAgency
Copy link

ViralAgency commented Jun 15, 2024

Issue

Hi,
i have found another problem in this release. When i try to deploy my brand new custom module, i get error 500.
The error is trown in the compiled file sugar_grp1_yui.js on line 31:

                this.handleReadyState(f, g);
Here->    f.conn.send(a || ""); 
                if (this._isFormSubmit === true) {
                this.resetFormState();
                }

For some reason "a" variable is undefined and return error 500.

PHP Error log:
[2024-06-15 20:04:39] php.CRITICAL: Uncaught Error: Failed opening required '/var/www/html/cache/prod/Container142kVnn/getPropertyInfo_SerializerExtractorService.php' (include_path='/var/www/html/public/legacy/include/..:.:/usr/share/php') {"exception":"[object] (Error(code: 0): Failed opening required '/var/www/html/cache/prod/Container142kVnn/getPropertyInfo_SerializerExtractorService.php' (include_path='/var/www/html/public/legacy/include/..:.:/usr/share/php') at /var/www/html/cache/prod/Container142kVnn/App_KernelProdContainer.php:547)"} []
[2024-06-15 20:04:39] request.CRITICAL: Uncaught PHP Exception Error: "Failed opening required '/var/www/html/cache/prod/Container142kVnn/getPropertyInfo_SerializerExtractorService.php' (include_path='/var/www/html/public/legacy/include/..:.:/usr/share/php')" at /var/www/html/cache/prod/Container142kVnn/App_KernelProdContainer.php line 547 {"exception":"[object] (Error(code: 0): Failed opening required '/var/www/html/cache/prod/Container142kVnn/getPropertyInfo_SerializerExtractorService.php' (include_path='/var/www/html/public/legacy/include/..:.:/usr/share/php') at /var/www/html/cache/prod/Container142kVnn/App_KernelProdContainer.php:547)"} []
[2024-06-15 20:04:39] php.WARNING: Warning: require(/var/www/html/cache/prod/Container142kVnn/getApiPlatform_Action_ExceptionService.php): Failed to open stream: No such file or directory {"exception":"[object] (ErrorException(code: 0): Warning: require(/var/www/html/cache/prod/Container142kVnn/getApiPlatform_Action_ExceptionService.php): Failed to open stream: No such file or directory at /var/www/html/cache/prod/Container142kVnn/App_KernelProdContainer.php:547)"} []
[2024-06-15 20:04:39] php.CRITICAL: Uncaught Error: Failed opening required '/var/www/html/cache/prod/Container142kVnn/getApiPlatform_Action_ExceptionService.php' (include_path='/var/www/html/public/legacy/include/..:.:/usr/share/php') {"exception":"[object] (Error(code: 0): Failed opening required '/var/www/html/cache/prod/Container142kVnn/getApiPlatform_Action_ExceptionService.php' (include_path='/var/www/html/public/legacy/include/..:.:/usr/share/php') at /var/www/html/cache/prod/Container142kVnn/App_KernelProdContainer.php:547)"} []

Possible Fix

No response

Steps to Reproduce the Issue

1. Build a custom module
2. Deploy

Context

Im ' working on a dockerized installation of SuiteCRM.

Version

8.6.0

What browser are you currently using?

Chrome

Browser Version

125.0.6422.142 (Build ufficiale) (arm64)

Environment Information

PHP 8.2, MySql 8.0

Operating System and Version

Ubuntu 24.04

@ViralAgency ViralAgency added the Type: Bug Something isn't working label Jun 15, 2024
@chris001
Copy link
Contributor

Is it correct to say that the bitnami docker image is working without fatal or error, for custom module deployment?

Can you compare and show the differences in the dockerfiles ?

What is the text of the errors are logged, during the failed custom module deployment?

@ViralAgency
Copy link
Author

ViralAgency commented Jun 19, 2024

hi @chris001, thanks again for your support.

My dockerfile is:

FROM ubuntu:24.04

ENV UID=501
ENV GID=20

ENV TZ=Europe/Rome
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

RUN apt-get update
RUN apt -y upgrade
RUN apt-get install vim -y
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get install apache2 -y

RUN apt -y install ca-certificates apt-transport-https software-properties-common
RUN add-apt-repository ppa:ondrej/php
RUN apt-get -y update
RUN apt-get install -y php8.2 libapache2-mod-php8.2
RUN apt-get install -y php8.2-fpm libapache2-mod-fcgid
RUN apt-get install -y php8.2-mysql
RUN apt-get install -y php8.2-curl php8.2-intl php8.2-zip php8.2-imap php8.2-gd
RUN apt-get install -y slapd ldap-utils php-ldap php8.2-ldap php8.2-soap
RUN apt-get install -y php8.2-xdebug
RUN apt install -y php8.2-xml php8.2-mbstring
RUN apt install -y zlib1g-dev libxml2-dev acl

RUN apt-get update && apt-get install -y gnupg g++ procps openssl unzip libzip-dev libfreetype6-dev libpng-dev libjpeg-dev libicu-dev  libonig-dev libxslt1-dev \
    && echo 'alias sf="php bin/console"' >> ~/.bashrc

RUN a2enmod rewrite



RUN apt-get update && apt-get upgrade -y && \
    apt-get install -y nodejs \
    npm

RUN npm install -g @angular/cli
RUN npm install --global yarn

//Change id of user and group according host machine to prevent permission issues
RUN usermod -u $UID www-data 
RUN groupmod -g 23 dialout
RUN groupmod -g $GID www-data

WORKDIR /var/www/html

//ACL permissions
RUN HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\  -f1) \
    && setfacl -dR -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX /var/www/html \
    && setfacl -R -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX /var/www/html


COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer

CMD ["apachectl", "-D", "FOREGROUND"]


EXPOSE 80
EXPOSE 9000

I have tried too many times, too many different configurations, problem is still permissions between host machine and container on bind mounts. With Bitnami image no differences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants