sourcegraph / app

Issue tracker for the Sourcegraph app - a lightweight single-binary version of Sourcegraph for your local machine
27 stars 2 forks source link

macos: app fails to start (potentially intel mac only?) #28

Open jlapier opened 1 year ago

jlapier commented 1 year ago

When I open the Cody app, I see three animated dots, and nothing ever loads.

If I open up the dev console in the app, I can see this error:

SyntaxError: Unexpected identifier 'c'
  promisReactionJob

Screen Shot 2023-06-30 at 1 31 06 PM

The logs show:

[2023-06-30][20:33:19][ERROR][app] ✱ Sourcegraph App version: 2023.6.28+1331.1867679b11
[2023-06-30][20:33:21][ERROR][app] |------------------------------------------------------------------------------|
[2023-06-30][20:33:21][ERROR][app] | src-cli is unavailable                                                       |
[2023-06-30][20:33:21][ERROR][app] |------------------------------------------------------------------------------|
[2023-06-30][20:33:21][ERROR][app] | Sourcegraph is better when src-cli is available; batch changes may not work. |
[2023-06-30][20:33:21][ERROR][app] |                                                                              |
[2023-06-30][20:33:21][ERROR][app] | Installation: https://github.com/sourcegraph/src-cli                         |
[2023-06-30][20:33:21][ERROR][app] |                                                                              |
[2023-06-30][20:33:21][ERROR][app] |------------------------------------------------------------------------------|
[2023-06-30][20:33:21][ERROR][app] 1688157201972806000  WARN    servegit    servegit/service.go:62  github.com/sourcegraph/sourcegraph/internal/service/servegit.(*svc).Start   skipping local code since the environment variable SRC is not set   {"Resource": {"service.name": "sourcegraph-backend", "service.version": "2023.6.28+1331.1867679b11", "service.instance.id": "XXX"}, "Attributes": {}}
[2023-06-30][20:33:21][ERROR][app] 2023/06/30 20:33:21 tmpfriend: Removing /tmp/.searcher.tmp/tmpfriend-41946-1494674899
[2023-06-30][20:33:21][ERROR][app] 1688157201994796000  ERROR   service run/util.go:44  github.com/sourcegraph/sourcegraph/enterprise/cmd/executor/internal/run.newQueueTelemetryOptions    Failed to get src-cli version   {"Resource": {"service.name": "sourcegraph-backend", "service.version": "2023.6.28+1331.1867679b11", "service.instance.id": "XXX"}, "Attributes": {"error": "'src version -client-only': : exec: \"src\": executable file not found in $PATH"}}
[2023-06-30][20:33:21][ERROR][app] 1688157201994903000  ERROR   service run/util.go:44  github.com/sourcegraph/sourcegraph/enterprise/cmd/executor/internal/run.newQueueTelemetryOptions    Failed to get src-cli version   {"Resource": {"service.name": "sourcegraph-backend", "service.version": "2023.6.28+1331.1867679b11", "service.instance.id": "XXX"}, "Attributes": {"error": "'src version -client-only': : exec: \"src\": executable file not found in $PATH"}}
[2023-06-30][20:33:22][ERROR][app] 1688157202286485000  WARN    service.worker  runtime/runtime.go:125  github.com/sourcegraph/sourcegraph/enterprise/cmd/executor/internal/worker/runtime.New  runtime 'docker' is not supported: missing required tools   {"Resource": {"service.name": "sourcegraph-backend", "service.version": "2023.6.28+1331.1867679b11", "service.instance.id": "XXX"}, "Attributes": {"dockerTools": ["src"]}}
[2023-06-30][20:33:22][ERROR][app] 1688157202286509000  WARN    executor    singlebinary/service.go:40  github.com/sourcegraph/sourcegraph/enterprise/cmd/executor/singlebinary.svc.Start.func1 executor for other queue failed {"Resource": {"service.name": "sourcegraph-backend", "service.version": "2023.6.28+1331.1867679b11", "service.instance.id": "XXX"}, "Attributes": {"error": "runtime is not configured"}}
[2023-06-30][20:33:22][ERROR][app] 1688157202359195000  WARN    service.worker  runtime/runtime.go:125  github.com/sourcegraph/sourcegraph/enterprise/cmd/executor/internal/worker/runtime.New  runtime 'docker' is not supported: missing required tools   {"Resource": {"service.name": "sourcegraph-backend", "service.version": "2023.6.28+1331.1867679b11", "service.instance.id": "XXX"}, "Attributes": {"dockerTools": ["src"]}}
[2023-06-30][20:33:22][ERROR][app] 1688157202359216000  WARN    sourcegraph svcmain/svcmain.go:261  github.com/sourcegraph/sourcegraph/internal/service/svcmain.run.func1   failed to start service (skipping)  {"Resource": {"service.name": "sourcegraph-backend", "service.version": "2023.6.28+1331.1867679b11", "service.instance.id": "XXX"}, "Attributes": {"service": "executor", "error": "runtime is not configured"}}
[2023-06-30][20:33:22][ERROR][app] tauri:sign-in-url: http://localhost:3080/sign-in?s=SOMETOKEN
[2023-06-30][20:33:22][ERROR][app] |------------------------------------------------------------------------------|
[2023-06-30][20:33:22][ERROR][app] |                                                                              |
[2023-06-30][20:33:22][ERROR][app] | Sourcegraph is now available on http://localhost:3080                        |
[2023-06-30][20:33:22][ERROR][app] |                                                                              |
[2023-06-30][20:33:22][ERROR][app] |------------------------------------------------------------------------------|

When I copy that sign-in-url and open it in a web browser, it seems to load a "connect to sourcegraph" page, but it doesn't actually work - it opens the Cody app again, but the app still fails to load.

The thing that stands out to me in the log is runtime 'docker' is not supported: missing required tools - though I do have docker up and running, and I see a couple containers that were started by Cody:

❯ docker container ls
CONTAINER ID   IMAGE                  COMMAND                  CREATED         STATUS         PORTS                    NAMES
fb4414532c0a   slimsag/ctags:latest   "/usr/local/bin/univ…"   6 minutes ago   Up 6 minutes                            universal-ctags-42639
fb66558f48e1   slimsag/ctags:latest   "/usr/local/bin/univ…"   6 minutes ago   Up 6 minutes                            universal-ctags-42588
1abe09bbbc31   node:18.14.0           "docker-entrypoint.s…"   2 months ago    Up 3 weeks                              api-on-node
83d7f4fb09af   postgres:13.4-alpine   "docker-entrypoint.s…"   4 months ago    Up 3 weeks     0.0.0.0:5432->5432/tcp   sam-postgres-db
❯ docker -v
Docker version 20.10.11, build dea9396
adampatterson commented 1 year ago

I'm on an Intel mac and the app's also not loading. I can't see any errors though.

slimsag commented 1 year ago

Sorry we missed this @jlapier @adampatterson

Could you try this version we released just a few hours ago? As soon as it opens, select System Tray > Cody > Troubleshoot > Clear all data

If it doesn't come up after that, then let me know what the logs show after that (System Tray > Cody > Troubleshoot > Logs)

jlapier commented 1 year ago

After installing the new version and clearing data, and then starting up the Cody app, same problem:

[2023-07-11][20:46:28][ERROR][app] ✱ Sourcegraph App version: 2023.7.11+1384.7d20a90ce7 darwin arm64
[2023-07-11][20:46:30][ERROR][app] |------------------------------------------------------------------------------|
[2023-07-11][20:46:30][ERROR][app] | src-cli is unavailable                                                       |
[2023-07-11][20:46:30][ERROR][app] |------------------------------------------------------------------------------|
[2023-07-11][20:46:30][ERROR][app] | Sourcegraph is better when src-cli is available; batch changes may not work. |
[2023-07-11][20:46:30][ERROR][app] |                                                                              |
[2023-07-11][20:46:30][ERROR][app] | Installation: https://github.com/sourcegraph/src-cli                         |
[2023-07-11][20:46:30][ERROR][app] |                                                                              |
[2023-07-11][20:46:30][ERROR][app] |------------------------------------------------------------------------------|
[2023-07-11][20:46:30][ERROR][app] 1689108390866787000  WARN    servegit    servegit/service.go:62  github.com/sourcegraph/sourcegraph/internal/service/servegit.(*svc).Start   skipping local code since the environment variable SRC is not set   {"Resource": {"service.name": "sourcegraph-backend", "service.version": "2023.7.11+1384.7d20a90ce7", "service.instance.id": "XXX"}, "Attributes": {}}
[2023-07-11][20:46:30][ERROR][app] 2023/07/11 20:46:30 tmpfriend: Removing /tmp/.searcher.tmp/tmpfriend-92940-2413151264
[2023-07-11][20:46:30][ERROR][app] 1689108390898403000  ERROR   service run/util.go:44  github.com/sourcegraph/sourcegraph/enterprise/cmd/executor/internal/run.newQueueTelemetryOptions    Failed to get src-cli version   {"Resource": {"service.name": "sourcegraph-backend", "service.version": "2023.7.11+1384.7d20a90ce7", "service.instance.id": "XXX"}, "Attributes": {"error": "'src version -client-only': : exec: \"src\": executable file not found in $PATH"}}
[2023-07-11][20:46:30][ERROR][app] 1689108390898701000  ERROR   service run/util.go:44  github.com/sourcegraph/sourcegraph/enterprise/cmd/executor/internal/run.newQueueTelemetryOptions    Failed to get src-cli version   {"Resource": {"service.name": "sourcegraph-backend", "service.version": "2023.7.11+1384.7d20a90ce7", "service.instance.id": "XXX"}, "Attributes": {"error": "'src version -client-only': : exec: \"src\": executable file not found in $PATH"}}
[2023-07-11][20:46:31][ERROR][app] 1689108391250278000  WARN    service.worker  runtime/runtime.go:125  github.com/sourcegraph/sourcegraph/enterprise/cmd/executor/internal/worker/runtime.New  runtime 'docker' is not supported: missing required tools   {"Resource": {"service.name": "sourcegraph-backend", "service.version": "2023.7.11+1384.7d20a90ce7", "service.instance.id": "XXX"}, "Attributes": {"dockerTools": ["src"]}}
[2023-07-11][20:46:31][ERROR][app] 1689108391250326000  WARN    executor    singlebinary/service.go:40  github.com/sourcegraph/sourcegraph/enterprise/cmd/executor/singlebinary.svc.Start.func1 executor for other queue failed {"Resource": {"service.name": "sourcegraph-backend", "service.version": "2023.7.11+1384.7d20a90ce7", "service.instance.id": "XXX"}, "Attributes": {"error": "runtime is not configured"}}
[2023-07-11][20:46:31][ERROR][app] 1689108391257747000  WARN    service.worker  runtime/runtime.go:125  github.com/sourcegraph/sourcegraph/enterprise/cmd/executor/internal/worker/runtime.New  runtime 'docker' is not supported: missing required tools   {"Resource": {"service.name": "sourcegraph-backend", "service.version": "2023.7.11+1384.7d20a90ce7", "service.instance.id": "XXX"}, "Attributes": {"dockerTools": ["src"]}}
[2023-07-11][20:46:31][ERROR][app] 1689108391257765000  WARN    sourcegraph svcmain/svcmain.go:261  github.com/sourcegraph/sourcegraph/internal/service/svcmain.run.func1   failed to start service (skipping)  {"Resource": {"service.name": "sourcegraph-backend", "service.version": "2023.7.11+1384.7d20a90ce7", "service.instance.id": "XXX"}, "Attributes": {"service": "executor", "error": "runtime is not configured"}}
[2023-07-11][20:46:31][ERROR][app] tauri:sign-in-url: http://localhost:3080/sign-in?s=WCyLTW7CDK3FQg6DeQIaWTT37OBRgnC1NDh_kjh_218%3D
[2023-07-11][20:46:31][ERROR][app] |------------------------------------------------------------------------------|
[2023-07-11][20:46:31][ERROR][app] |                                                                              |
[2023-07-11][20:46:31][ERROR][app] | Sourcegraph is now available on http://localhost:3080                        |
[2023-07-11][20:46:31][ERROR][app] |                                                                              |
[2023-07-11][20:46:31][ERROR][app] |------------------------------------------------------------------------------|

Again, the docker containers are running

CONTAINER ID   IMAGE                  COMMAND                  CREATED         STATUS         PORTS                    NAMES
56f6dfabf7ec   slimsag/ctags:latest   "/usr/local/bin/univ…"   2 minutes ago   Up 2 minutes                            universal-ctags-93545
88a571484197   slimsag/ctags:latest   "/usr/local/bin/univ…"   2 minutes ago   Up 2 minutes                            universal-ctags-93496

and the server at http://localhost:3080 is working from a web browser.

But the app just shows the three loading dots.

slimsag commented 1 year ago

Ok got it, thanks @jlapier ! That definitely helps narrow it down. Could you try the following?

Start the app, give it a few seconds (so that the server has a chance to start as you did above), and when you see just the three loading dots:

  1. Right click -> Inspect element
  2. Click the Console tab - it should look something like this:
image

What's shown in there for you? Any errors?

jlapier commented 1 year ago

seems to be the same as the first screenshot I posted:

Screen Shot 2023-07-11 at 2 23 22 PM
semikolon commented 1 year ago

I got the same error in the console. Also running an old mac os version and only getting the startup dots animation... Were you able to narrow this down? I just created a separate issue.

adampatterson commented 1 year ago

I downloaded the app again and haven't had a problem since.