Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic following tutorial-app, on reload "no such file or directory" #118

Closed
TrevorFSmith opened this issue Oct 12, 2023 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@TrevorFSmith
Copy link

On Fedora 38 using ds-dev v0.11.0, I followed the tutorial app but every time I save app.ts the ds-dev panics:

set job to finished and sending
2023/10/11 19:02:03 sandbox/sandbox.go:579 a:11 v:1000.0.0 as:15 (Sandbox, Graceful()) sending twine.Graceful()
2023/10/11 19:02:03 sandbox/sandbox.go:584 a:11 v:1000.0.0 as:15 (Sandbox, Graceful()) graceful complete
2023/10/11 19:02:03 sandbox/sandbox.go:864 a:11 v:1000.0.0 as:15 (Sandbox, setStatus()) Sandbox 2 set status from 4 to 5
2023/10/11 19:02:03 sandbox/sandbox.go:661 a:11 v:1000.0.0 as:15 (Sandbox, cleanup()) cleanup complete
2023/10/11 19:02:03 sandbox/sandbox.go:864 a:11 v:1000.0.0 as:15 (Sandbox, setStatus()) Sandbox 2 set status from 5 to 6
panic: stat /home/trevor/Desktop/dropserver/tutorial-app/4913: no such file or directory

goroutine 41 [running]:
main.(*DevAppWatcher).watch.func1()
	/home/runner/work/Dropserver/Dropserver/cmd/ds-dev/appwatcher.go:179 +0x22d
created by main.(*DevAppWatcher).watch
	/home/runner/work/Dropserver/Dropserver/cmd/ds-dev/appwatcher.go:165 +0xdf

I tried a few variations on the command line with relative an full paths as well as setting or not setting the appspace option. It seems to make no difference.

@teleclimber
Copy link
Owner

Hi Trevor, thanks for reporting this.

Do you have an idea what /home/trevor/Desktop/dropserver/tutorial-app/4913 file might be? It doesn't sound like a code file you'd be creating. Maybe a temporary file?

I'm wondering if it's a file that gets created and then deleted in very quick succession, which trips up the file watcher algorithm. I can get around this is that's what it is.

@teleclimber teleclimber added the bug Something isn't working label Oct 12, 2023
@TrevorFSmith
Copy link
Author

TrevorFSmith commented Oct 12, 2023

Hello. 4913 isn't a file that I've created, either manually or in code, so I'm not sure what it's meant to do or why it would appear in the tutorial-app directory. The name, "4913", is consistent though so it doesn't seem to be a per-process lockfile named after a process id.

Edit: I also looked into the tmp dir while ds-dev is running and there's no similarly named file. I thought it might be a relative path problem.

@teleclimber
Copy link
Owner

teleclimber commented Oct 12, 2023

Hmm. Weird. I can't reproduce this on Arch or Mac.

Are you using vim by any chance? I just found this post that indicates vim creates a temporary file called 4913. I'll have to dive into this post and integrates the author's findings.

@TrevorFSmith
Copy link
Author

I am using vim, well, nvim. I just read the linked post and indeed, I think that could explain what is happening.

@TrevorFSmith
Copy link
Author

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants