jgraph / docker-drawio

Dockerized draw.io based on whichever is the most secure image at the time.
GNU General Public License v3.0
1.48k stars 359 forks source link

Gitlab (self-hosted) storage unknown error no logs #149

Closed johanlundberg-iver closed 6 months ago

johanlundberg-iver commented 7 months ago

I have created an application in Gitlab with the following settings:

I click open from gitlab -> Authorize -> Get to the gitlab authorization page and click Authorize -> Gets redirected to drawio and the screen just says "Error, unknown error".

No output is written in the pod when this occurs other than:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".                                                                                                                      
SLF4J: Defaulting to no-operation (NOP) logger implementation                                                                                                                         
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

If I check network calls with dev tools in the browser when I click Open from gitlab this happens:

I tried manually editing the index.html file to include my URLs in the connect-src self section at line 225 and it shows up in the browser when viewing the source but makes no difference.

I am running Safari and Chrome as browsers with the same problem in both.

I have mounted my custom keystore with trusted cacerts to: /opt/java/openjdk/lib/security/cacerts. I can also validate with keytool that they are in place in the store. I am running the latest version of the image. I have not configured any TLS settings for the drawio container itself, letting the ingress handle TLS.

Any way to enable more verbose logging to help me figure out the actual error?

johanlundberg-iver commented 6 months ago

I solved the issue by creating my own image and adding my Gitlab url to connect-src in the entrypoint script which populates PreConfig.js. Suggested fix is that the value of the url variable gets populated in PreConfig.js (line 19 in docker-entrypoint.sh).