I'm encountering an `UNCAUGHT EXCEPTION` error usi...
# report-bugs
b
I'm encountering an
UNCAUGHT EXCEPTION
error using graphite cli 1.1.17:
Copy code
(nix:nix-shell-env) B-Somogyi:monorepo-notification <mailto:bluethunder.somogyi@bastion.com|bluethunder.somogyi@bastion.com>$ gt checkout bluethundersomogyi/DEV-4278-SOLID-refactor-notification-manager-11a
Checked out bluethundersomogyi/DEV-4278-SOLID-refactor-notification-manager-11a.
The downstack branch bluethundersomogyi/DEV-4278-SOLID-refactor-notification-manager-9 has fallen behind main.
Run gt restack to resolve.
(nix:nix-shell-env) B-Somogyi:monorepo-notification <mailto:bluethunder.somogyi@bastion.com|bluethunder.somogyi@bastion.com>$ gt restack
UNCAUGHT EXCEPTION: Command failed with error exit code 1:
git commit-tree d8b72eaea289b65fe588c6edb41120636f815ed3 -p c4edb98aa493ec3d0370b50be7a7bd087219e84b -S -m [notification_manager] Add SourceTopic to retry Record

What: include source topic in retry record

Why: so that DLQ delivery can occur if the retries are exhausted

error: could not create temporary file: No such file or directory

UNCAUGHT EXCEPTION: CommandFailed: Command failed with error exit code 1:
git commit-tree d8b72eaea289b65fe588c6edb41120636f815ed3 -p c4edb98aa493ec3d0370b50be7a7bd087219e84b -S -m [notification_manager] Add SourceTopic to retry Record

What: include source topic in retry record

Why: so that DLQ delivery can occur if the retries are exhausted

error: could not create temporary file: No such file or directory

    at m (/snapshot/dist/graphite.js)
    at ChildProcess.<anonymous> (/snapshot/dist/graphite.js)
    at ChildProcess.emit (node:events:524:28)
    at maybeClose (node:internal/child_process:1101:16)
    at ChildProcess._handle.onexit (node:internal/child_process:304:5)
    at Process.callbackTrampoline (node:internal/async_hooks:130:17)
(nix:nix-shell-env) B-Somogyi:monorepo-notification <mailto:bluethunder.somogyi@bastion.com|bluethunder.somogyi@bastion.com>$ gt abort
ERROR: No Graphite operation to abort.
(nix:nix-shell-env) B-Somogyi:monorepo-notification <mailto:bluethunder.somogyi@bastion.com|bluethunder.somogyi@bastion.com>$ gt --version
1.7.17
checking to see if this might be something address in a newer version, or if I should stay put to provide investigation data.
j
This error is coming from Git, not Graphite itself.
error: could not create temporary file: No such file or directory
b
yes, but Graphite is calling Git ... if I were to run the command being output (which does not contain quoting around the
[notification_manager] Add SourceTopic to retry Record
), it would fail as well. Can you see what I'm getting at? Graphite is your product (last I checked).
j
Did you confirm by reproducing manually?
If this fails → Graphite is constructing unsafe input
b
Copy code
(nix:nix-shell-env) B-Somogyi:monorepo-notification <mailto:bluethunder.somogyi@bastion.com|bluethunder.somogyi@bastion.com>$ git commit-tree d8b72eaea289b65fe588c6edb41120636f815ed3 -p c4edb98aa493ec3d0370b50be7a7bd087219e84b -S -m [notification_manager] Add SourceTopic to retry Record
fatal: must give exactly one tree
j
fatal: must give exactly one tree your command is being parsed by the shell wrongly, not because Graphite is misquoting anything yet.
verify Graphite’s exact spawned command (so you can prove the bug)
b
verify Graphite’s exact spawned command (so you can prove the bug)
how would one do this?
j
gt restack --debug
b
full debug output. doesn't look any different to me:
Copy code
{"cliVersion":"1.7.17","level":"debug","message":"Spawning cleanRebaseCommitTree (7885): git commit-tree d8b72eaea289b65fe588c6edb41120636f815ed3 -p c4edb98aa493ec3d0370b50be7a7bd087219e84b -S -m [notification_manager] Add SourceTopic to retry Record\n\nWhat: include source topic in retry record\n\nWhy: so that DLQ delivery can occur if the retries are exhausted","timestamp":"2026-06-17T17:12:17.807Z","traceId":775973861}
{"cliVersion":"1.7.17","level":"debug","message":"Spawning getShaParentsForDebugging (7898): git rev-list --parents -1 ef5476869653c576a99fd92100aa33f8f023e400","timestamp":"2026-06-17T17:12:17.808Z","traceId":775973861}
{"cliVersion":"1.7.17","level":"debug","message":"Finished cleanRebaseCommitTree (7885): git commit-tree d8b72eaea289b65fe588c6edb41120636f815ed3 -p c4edb98aa493ec3d0370b50be7a7bd087219e84b -S -m [notification_manager] Add SourceTopic to retry Record\n\nWhat: include source topic in retry record\n\nWhy: so that DLQ delivery can occur if the retries are exhausted\n{\n  \"code\": 1,\n  \"signal\": null,\n  \"stdout\": \"\",\n  \"stderr\": \"error: could not create temporary file: No such file or directory\\n\"\n}","timestamp":"2026-06-17T17:12:17.834Z","traceId":775973861}
{"cliVersion":"1.7.17","level":"debug","message":"Spawning git commit-tree d8b72eaea289b65fe588c6edb41120636f815ed3 -p c4edb98aa493ec3d0370b50be7a7bd087219e84b -S -m [notification_manager] Add SourceTopic to retry Record\n\nWhat: include source topic in retry record\n\nWhy: so that DLQ delivery can occur if the retries are exhausted failed: Command failed with error exit code 1:\ngit commit-tree d8b72eaea289b65fe588c6edb41120636f815ed3 -p c4edb98aa493ec3d0370b50be7a7bd087219e84b -S -m [notification_manager] Add SourceTopic to retry Record\n\nWhat: include source topic in retry record\n\nWhy: so that DLQ delivery can occur if the retries are exhausted\n\nerror: could not create temporary file: No such file or directory\n","timestamp":"2026-06-17T17:12:17.834Z","traceId":775973861}
c
Hey There! The failure from gt itself is git not being able to create a temp file. In nix-shell that's often a bad
TMPDIR
. What does
echo $TMPDIR
show, and does
TMPDIR=/tmp gt restack
work? Thanks!
b
@Chris Bowie thanks for the guidance. Yes, it appears to be a stale
TMPDIR
value (not sure how that happened thinking ), but it looks like this has resolve the issue. TYVM!
Copy code
(nix:nix-shell-env) B-Somogyi:monorepo-notification <mailto:bluethunder.somogyi@bastion.com|bluethunder.somogyi@bastion.com>$ echo $TMPDIR
/tmp/nix-shell.sk0I18
(nix:nix-shell-env) B-Somogyi:monorepo-notification <mailto:bluethunder.somogyi@bastion.com|bluethunder.somogyi@bastion.com>$ ls $TMPDIR
ls: cannot access '/tmp/nix-shell.sk0I18': No such file or directory
(nix:nix-shell-env) B-Somogyi:monorepo-notification <mailto:bluethunder.somogyi@bastion.com|bluethunder.somogyi@bastion.com>$ exit
exit
B-Somogyi:monorepo-notification <mailto:bluethunder.somogyi@bastion.com|bluethunder.somogyi@bastion.com>$ nix develop
(nix:nix-shell-env) B-Somogyi:monorepo-notification <mailto:bluethunder.somogyi@bastion.com|bluethunder.somogyi@bastion.com>$ ls $TMPDIR
(nix:nix-shell-env) B-Somogyi:monorepo-notification <mailto:bluethunder.somogyi@bastion.com|bluethunder.somogyi@bastion.com>$ echo $TMPDIR
/tmp/nix-shell.f4PlC2
🙌 1