5 / 5
Dec 2023

Hello,
following these instructions (https://github.com/EGroupware/egroupware/tree/master/doc/docker/development1) I installed the EGroupware development container and started it. After login, the page hangs.

image

Output from Browser developer tools:

Loading module from “http://192.168.2.65:8080/egroupware/api/js/jsapi/egw.min.js?” was blocked because of a disallowed MIME type (“text/html”).
index.php
Loading failed for the module with source “http://192.168.2.65:8080/egroupware/api/js/jsapi/egw.min.js?”. index.php:130:15509
Uncaught TypeError: window.egw_ready is undefined
    <anonymous> http://192.168.2.65:8080/egroupware/notifications/js/notificationajaxpopup.js?1702064681:19
    <anonymous> http://192.168.2.65:8080/egroupware/notifications/js/notificationajaxpopup.js?1702064681:950

Output from docker:

/dev$ docker logs -f egroupware-nginx 2>&1 | sed "s/PHP message/\\$(echo -e '\n\r')PHP message/g"

2023/12/08 22:55:49 [error] 22#22: *4 FastCGI sent in stderr: "
PHP message: PHP Deprecated:  Replicating claims as headers is deprecated and will removed from v4.0. Please manually set the header if you need it replicated. in /var/www/egroupware/vendor/lcobucci/jwt/src/Builder.php on line 352;
PHP message: PHP Deprecated:  Using integers for registered date claims is deprecated, please use DateTimeImmutable objects instead. in /var/www/egroupware/vendor/lcobucci/jwt/src/Builder.php on line 169;
PHP message: PHP Deprecated:  Using integers for registered date claims is deprecated, please use DateTimeImmutable objects instead. in /var/www/egroupware/vendor/lcobucci/jwt/src/Builder.php on line 169;
PHP message: PHP Deprecated:  Using integers for registered date claims is deprecated, please use DateTimeImmutable objects instead. in /var/www/egroupware/vendor/lcobucci/jwt/src/Builder.php on line 169;
PHP message: PHP Deprecated:  Not specifying the signer and key to Builder#getToken() is deprecated. Please move the arguments from Builder#sign() to Builder#getToken(). in /var/www/egroupware/vendor/lcobucci/jwt/src/Builder.php on line 524" while reading response header from upstream, client: 192.168.2.150, server: _, request: "GET /egroupware/index.php?cd=yes HTTP/1.1", upstream: "fastcgi://172.19.0.9:9000", host: "192.168.2.65:8080", referrer: "http://192.168.2.65:8080/egroupware/login.php?phpgw_forward=%252Findex.php%253Fcd%253Dyes"

OS: ubuntu server 22.04
What am I doing wrong and how can I fix it?
Regards, Axel

  • created

    Dec '23
  • last reply

    Dec '23
  • 4

    replies

  • 690

    views

  • 2

    users

  • 1

    link

Hello Axel,

seems the JavaScript is not build (correct).

There are multiple ways to build the JavaScript for EGroupware:

  1. run it in the container, which contains the necessary software (nodeJS and npm):
docker exec -it egroupware bash
cd /var/www/egroupware
npm run build
  1. run it outside container by hand, you need NodeJS and NPM installed, we currently use NodeJS 20
cd /var/www/egroupware # or whereever your EGroupware sources are installed
npm run build
  1. run it outside container via your IDE, you need NodeJS and NPM installed, we currently use NodeJS 20
    In PHP Storm for example open the npm tab and start the build:watch job to automatically rebuild the JavaScript whenever you change a TypeScript or JavaScript file.

Ralf

Hello Ralf,
your solution fixed it. A small hint for others with the same problem:
I tried option 1., run it in the container.

docker exec -it egroupware bash
cd /var/www/egroupware
npm run build

This was the output:

EGroupware@23.1.20230228 build
rollup -c
sh: 1: rollup: not found

So i had to install the node modules first:

npm i

And than call

npm run build

again!
Thank you Ralf!
Regards, Axel

Normally we use ./install-cli.php to update a developer installation, it runs:

  • git pull in all git directories
  • composer install
  • npm install
  • npm run build
  • grunt

Ralf

In the developer install the sources are in a host, in my case Mac OS, accessible volume.
I have NodeJS installed on the host / Mac and PHP Storm accesses the sources directly on the host.
Then I can run npm run build:watch directly in the IDE:

Whenever I edit a TypeScript or JavaScript file, or run git pull, the JavaScript is automatically rebuild.
I only have to reload the browser, to test or debug it …

Ralf