Skip to content
GitLab Next
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab FOSS GitLab FOSS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLab FOSSGitLab FOSS
  • Issues
  • #45962
Closed (moved) (moved)
Open
Created May 02, 2018 by Rafał Rutkowski@rrutkowski

'Error while loading the branch files' when opening Web IDE

Summary

GitLab Omnibus is deployed in LAN. We get a

Error while loading the branch files. Please try again.

error, while opening the Web IDE, if we browse using any address other then the address configured as the external_url.

Steps to reproduce

  1. Deploy GitLab Omnibus in LAN with the fully qualified domain name as the external URL.
  2. Browse any project using an address other than the fully qualified domain name, for example IP address or just the host name.
  3. Try to open Web IDE.

What is the current bug behavior?

The Web IDE does not load. The error

Error while loading the branch files. Please try again.

is displayed.

What is the expected correct behavior?

It should use relative URL to load the project files instead of external_url/...

Relevant logs and/or screenshots

Chrome:

(index):1 Failed to load http://hostname.domain.com/group/project/files/master?format=json: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://hostname' is therefore not allowed access.
(index):1 Uncaught (in promise) je {url: "http://hostname.domain.com/group/project/files/master?format=json", ok: false, status: 0, statusText: "", headers: {…}, …}
Promise.catch (async)
(anonymous) @ ide_router.js:90
Promise.then (async)
(anonymous) @ ide_router.js:62
p @ vue-router.esm.js:1943
r @ vue-router.esm.js:1717
ue @ vue-router.esm.js:1725
nn.confirmTransition @ vue-router.esm.js:1972
nn.transitionTo @ vue-router.esm.js:1874
sn.init @ vue-router.esm.js:2494
beforeCreate @ vue-router.esm.js:540
Re @ vue.esm.js:2895
e._init @ vue.esm.js:4556
At @ vue.esm.js:4659
(anonymous) @ index.js:10
./ide/index.js @ index.js:22
r @ bootstrap 57532f8615919c45f89e:54
window.webpackJsonp @ bootstrap 57532f8615919c45f89e:25
(anonymous) @ ide.93a1aeb33f27abc0ec66.bundle.js:1

Results of GitLab environment info

Expand for output related to GitLab environment info

System information System: Debian 8.10 Current User: git Using RVM: no Ruby Version: 2.3.6p384 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.3.0 Redis Version: 3.2.11 Git Version: 2.14.3 Sidekiq Version:5.0.5 Go Version: unknown

GitLab information Version: 10.7.1 Revision: 0d49bb8 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: http://hostname.domain.com HTTP Clone URL: http://hostname.domain.com/some-group/some-project.git SSH Clone URL: git@hostname.domain.com:some-group/some-project.git Using LDAP: yes Using Omniauth: no

GitLab Shell Version: 7.1.2 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Assignee
Assign to
Time tracking