Skip to content

Issue starting sourcebot using selfhosted gitlab config #55

Closed
@iFloris

Description

@iFloris

Hello, I'm having trouble getting the latest tag running using a selfhosted gitlab config.

My config looks like this, based on the selfhosted example:

{
  "$schema": "https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v2/index.json",
  "repos": [
    // GitLab instance
    {
      "type": "gitlab",
      "url": "https://gitlab.my-url.com",
      "token": "my-group-token-with-read-permissions",
      "groups": [
        "my-group" // my global group
      ]
    }
  ]
}

However, I get the following error:

docker run -p 3000:3000 --rm --name sourcebot \
  -v ~/Downloads/my_config.json:/data/my_config.json \
  -e CONFIG_PATH=/data/my_config.json \
  ghcr.io/sourcebot-dev/sourcebot:latest
[Info] Sourcebot version: v2.1.1
[Info] Using config file at: '/data/my_config.json'.
2024-10-29 11:14:27,179 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2024-10-29 11:14:27,189 INFO supervisord started with pid 7
2024-10-29 11:14:28,200 INFO spawned: 'backend' with pid 135
2024-10-29 11:14:28,213 INFO spawned: 'web' with pid 136
2024-10-29 11:14:28,251 INFO spawned: 'zoekt' with pid 137
2024-10-29 11:14:29,902 INFO success: backend entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-10-29 11:14:29,904 INFO success: web entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-10-29 11:14:29,907 INFO success: zoekt entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
[web] |   ▲ Next.js 14.2.10
[web] |   - Local:        http://localhost:3000
[web] |   - Network:      http://0.0.0.0:3000
[web] |
[web] |  ✓ Starting...
[backend] | 2024-10-29T11:14:30.608Z info: [main] Syncing configuration file /data/my_config.json ...
[web] |  ✓ Ready in 951ms
[backend] | 2024-10-29T11:14:32.652Z error: [main] Failed to sync configuration file /data/my_config.json with error:
[backend] | TypeError: Cannot read properties of undefined (reading 'toString')
[backend] |     at file:///app/packages/backend/dist/gitlab.js:72:59
[backend] |     at Array.map (<anonymous>)
[backend] |     at getGitLabReposFromConfig (file:///app/packages/backend/dist/gitlab.js:49:10)
[backend] |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
[backend] |     at async syncConfig (file:///app/packages/backend/dist/index.js:63:37)
[backend] |     at async measure (file:///app/packages/backend/dist/utils.js:3:18)

What am I doing wrong?

Thanks in advance for any and all suggestions :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions