404 editor.worker.js in Web IDE by using relative url
Summary
This is my first issue here - I hope that everything is correct and I didn't find anything similar here.
Web IDE works, but the JavaScript module "editor.worker.js" produces 404 errors (seen with Firefox developer tools under network analysis).
Steps to reproduce
Gitlab CE docker image deployment with a relative URL defined as:
external_url 'https://{correct-TDL}/gitlab
Other settings are valid, because everything works fine.
Create new repository and open e.g. README.md with the Web IDE while Firefox Developer mode is enabled and Network analysis is enabled.
Example Project
Every project on Gitlab server. Use a new empty repository with a README.md file (see screenshot). gitlab-issue-relative-url
What is the current bug behavior?
404 on editor.worker.js because the URL request doesn't contain the correct relative URL:
https://{tdl-domain}/assets/webpack/editor.worker.js
Should be:
https://{tdl-domain}/gitlab/assets/webpack/editor.worker.js
What is the expected correct behavior?
Using the relative URL to accessing editor.worker.js and load the missing scripts.
Relevant logs and/or screenshots
Screenshot of Network analysis.
The 404 to editor.worker.js is displayed several times.
Output of checks
Wrong URL -> because the relative path is missing.
Results of GitLab environment info
Expand for output related to GitLab environment info
gitlab-rake gitlab:env:infoSystem information System: Current User: git Using RVM: no Ruby Version: 2.4.4p296 Gem Version: 2.7.6 Bundler Version:1.16.2 Rake Version: 12.3.1 Redis Version: 3.2.11 Git Version: 2.17.1 Sidekiq Version:5.1.3 Go Version: unknown
GitLab information Version: 11.1.4 Revision: 63daf37 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://{correct-TDL}/gitlab HTTP Clone URL: https://{correct-TDL}/gitlab/some-group/some-project.git SSH Clone URL: ssh://git@{correct-TDL}/some-group/some-project.git Using LDAP: no Using Omniauth: no
GitLab Shell Version: 7.1.4 Repository storage paths: default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
gitlab-rake gitlab:check SANITIZE=true Checking GitLab Shell ...GitLab Shell version >= 7.1.4 ? ... OK (7.1.4) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 1/2 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... skipped (no tmp uploads folder yet) Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 1/2 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.4.4) Git version >= 2.9.5 ? ... yes (2.17.1) Git user has default SSH configuration? ... yes Active users: ... 1
Checking GitLab ... Finished
Possible fixes
Use relative path for editor.worker.js in Web IDE.
Workaround is to rewrite the request serverside with apache to {TopLevelDomain}/assets/webpack -> {TopLevelDomain}/gitlab/assets/webpack
Please let me know if you need more information. Thank you very much and have a great week, Benny!