app icon indicating copy to clipboard operation
app copied to clipboard

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

Open jlapier opened this issue 2 years ago • 7 comments

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] [31;43;1m|------------------------------------------------------------------------------|[0m
[2023-06-30][20:33:21][ERROR][app] [0m[31;43;1m| src-cli is unavailable                                                       |[0m
[2023-06-30][20:33:21][ERROR][app] [0m[31;43;1m|------------------------------------------------------------------------------|[0m
[2023-06-30][20:33:21][ERROR][app] [0m[31m[31;43;1m|[0m Sourcegraph is better when src-cli is available; batch changes may not work. [31;43;1m|[0m[0m
[2023-06-30][20:33:21][ERROR][app] [0m[31m[31;43;1m|[0m                                                                              [31;43;1m|[0m[0m
[2023-06-30][20:33:21][ERROR][app] [0m[31m[31;43;1m|[0m Installation: https://github.com/sourcegraph/src-cli                         [31;43;1m|[0m[0m
[2023-06-30][20:33:21][ERROR][app] [0m[31m[31;43;1m|[0m                                                                              [31;43;1m|[0m[0m
[2023-06-30][20:33:21][ERROR][app] [0m[31;43;1m|------------------------------------------------------------------------------|[0m
[2023-06-30][20:33:21][ERROR][app] [0m1688157201972806000	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] [30;42;1m|------------------------------------------------------------------------------|[0m
[2023-06-30][20:33:22][ERROR][app] [0m[30;42;1m|                                                                              |[0m
[2023-06-30][20:33:22][ERROR][app] [0m[30;42;1m| Sourcegraph is now available on http://localhost:3080                        |[0m
[2023-06-30][20:33:22][ERROR][app] [0m[30;42;1m|                                                                              |[0m
[2023-06-30][20:33:22][ERROR][app] [0m[30;42;1m|------------------------------------------------------------------------------|[0m

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

jlapier avatar Jun 30 '23 20:06 jlapier

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

adampatterson avatar Jul 02 '23 02:07 adampatterson

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)

emidoots avatar Jul 11 '23 19:07 emidoots

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] [31;43;1m|------------------------------------------------------------------------------|[0m
[2023-07-11][20:46:30][ERROR][app] [0m[31;43;1m| src-cli is unavailable                                                       |[0m
[2023-07-11][20:46:30][ERROR][app] [0m[31;43;1m|------------------------------------------------------------------------------|[0m
[2023-07-11][20:46:30][ERROR][app] [0m[31m[31;43;1m|[0m Sourcegraph is better when src-cli is available; batch changes may not work. [31;43;1m|[0m[0m
[2023-07-11][20:46:30][ERROR][app] [0m[31m[31;43;1m|[0m                                                                              [31;43;1m|[0m[0m
[2023-07-11][20:46:30][ERROR][app] [0m[31m[31;43;1m|[0m Installation: https://github.com/sourcegraph/src-cli                         [31;43;1m|[0m[0m
[2023-07-11][20:46:30][ERROR][app] [0m[31m[31;43;1m|[0m                                                                              [31;43;1m|[0m[0m
[2023-07-11][20:46:30][ERROR][app] [0m[31;43;1m|------------------------------------------------------------------------------|[0m
[2023-07-11][20:46:30][ERROR][app] [0m1689108390866787000	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] [30;42;1m|------------------------------------------------------------------------------|[0m
[2023-07-11][20:46:31][ERROR][app] [0m[30;42;1m|                                                                              |[0m
[2023-07-11][20:46:31][ERROR][app] [0m[30;42;1m| Sourcegraph is now available on http://localhost:3080                        |[0m
[2023-07-11][20:46:31][ERROR][app] [0m[30;42;1m|                                                                              |[0m
[2023-07-11][20:46:31][ERROR][app] [0m[30;42;1m|------------------------------------------------------------------------------|[0m

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.

jlapier avatar Jul 11 '23 20:07 jlapier

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?

emidoots avatar Jul 11 '23 21:07 emidoots

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

Screen Shot 2023-07-11 at 2 23 22 PM

jlapier avatar Jul 11 '23 21:07 jlapier

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.

semikolon avatar Aug 24 '23 10:08 semikolon

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

adampatterson avatar Aug 24 '23 17:08 adampatterson