electric-sql / electric-sql/electric

Hard to parse errors

Open
#3,748 0 comments 0 reactions 0 assignees View on GitHub
triage
Dominant language
TypeScript
Stars
10.4k
Forks
375
Avg merge
3d 1h
Merged PRs (30d)
18

Description

**Versions**

- Client: platform, version (e.g. typescript, 1.0.0; or just "plain HTTP")
- Electric: 1.3.0

**Bug description**
I've been seeing errors like this:

```
16:35:30.215 pid=<0.3329.0> [info] Creating new shape for Shape.new!({17229, "public.thread"}, where: "team_id IN (SELECT team_id FROM public.team_member WHERE user_id = '019bb599-af5c-7201-8c81-583afe349d64')", columns: ["client_id"], deps: [{"77105765-1768803140484708", Shape.new!({16430, "public.team_member"}, where: "user_id = '019bb599-af5c-7201-8c81-583afe349d64'", columns: ["team_id"])}]) with handle 68943806-1768926930214119

16:35:30.215 pid=<0.55388.0> shape_handle=77105765-1768803140484708 [error] GenServer {:"Electric.ProcessRegistry:single_stack", {Electric.Shapes.Consumer.Materializer, "77105765-1768803140484708"}} terminating
** (stop) exited in: GenServer.call(nil, :await_snapshot_start, :infinity)
** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
(elixir 1.19.1) lib/gen_server.ex:1135: GenServer.call/3
(electric 1.3.0) lib/electric/shapes/consumer/materializer.ex:111: Electric.Shapes.Consumer.Materializer.handle_continue/2
(stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3
(stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4
(stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3
Process Label: {:materializer, "77105765-1768803140484708"}
Last message: {:continue, :start_materializer}

16:35:30.229 pid=<0.55389.0> shape_handle=68943806-1768926930214119 [warning] Materializer for 77105765-1768803140484708 is not alive, invalidating shape 68943806-1768926930214119

16:35:30.229 pid=<0.55389.0> shape_handle=68943806-1768926930214119 [info] Removing shape "68943806-1768926930214119"

16:35:30.234 pid=<0.55387.0> request_id=GIx9q7yy_siiAaoABXnk [error] ** (exit) exited in: GenServer.call(#PID<0.55389.0>, :await_snapshot_start, 45000)
** (EXIT) shutdown: :cleanup
(elixir 1.19.1) lib/gen_server.ex:1142: GenServer.call/3
(electric 1.3.0) lib/electric/shape_cache.ex:131: Electric.ShapeCache.await_snapshot_start/2
(electric 1.3.0) lib/electric/shapes.ex:22: Electric.Shapes.get_merged_log_stream/3
(electric 1.3.0) lib/electric/shapes/api.ex:626: Electric.Shapes.Api.do_serve_shape_log/1
(electric 1.3.0) lib/electric/shapes/api.ex:530: anonymous fn/1 in Electric.Shapes.Api.serve_shape_log/1
(opentelemetry 1.7.0) /builder/electric/deps/opentelemetry/src/otel_tracer_default.erl:47: :otel_tracer_default.with_span/5
(electric 1.3.0) lib/electric/telemetry/open_telemetry.ex:87: anonymous fn/5 in Electric.Telemetry.OpenTelemetry.do_with_span/5
(telemetry 1.3.0) /builder/electric/deps/telemetry/src/telemetry.erl:324: :telemetry.span/3
(electric 1.3.0) lib/electric/shapes/api.ex:476: Electric.Shapes.Api.serve_shape_response/2
(electric 1.3.0) lib/electric/plug/serve_shape_plug.ex:1: Electric.Plug.ServeShapePlug.plug_builder_call/2
(electric 1.3.0) deps/plug/lib/plug/error_handler.ex:80: Electric.Plug.ServeShapePlug.call/2
(electric 1.3.0) deps/plug/lib/plug/router.ex:246: anonymous fn/4 in Electric.Plug.Router.dispatch/2
(telemetry 1.3.0) /builder/electric/deps/telemetry/src/telemetry.erl:324: :telemetry.span/3
(electric 1.3.0) deps/plug/lib/plug/router.ex:242: Electric.Plug.Router.dispatch/2
(electric 1.3.0) lib/electric/plug/router.ex:1: Electric.Plug.Router.plug_builder_call/2
(electric 1.3.0) lib/electric/plug/router.ex:1: Electric.Plug.Router.call/2
(bandit 1.8.0) lib/bandit/pipeline.ex:131: Bandit.Pipeline.call_plug!/2
(bandit 1.8.0) lib/bandit/pipeline.ex:42: Bandit.Pipeline.run/5
(bandit 1.8.0) lib/bandit/http1/handler.ex:13: Bandit.HTTP1.Handler.handle_data/3
(bandit 1.8.0) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3
(bandit 1.8.0) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2
(stdlib 7.1) gen_server.erl:2424: :gen_server.try_handle_continue/3
(stdlib 7.1) gen_server.erl:2291: :gen_server.loop/4
(stdlib 7.1) proc_lib.erl:333: :proc_lib.init_p_do_apply/3
```

as I develop and it's not clear what the action should be from this. I've hit this with a nested subquery where then I need to rewrite the query to avoid the error but it would be amazing if this was more descriptive about what was going wrong.

**Expected behavior**
More informative error handling

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.