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

Exit code 1 #4

Open
najamelan opened this issue Mar 30, 2020 · 10 comments
Open

Exit code 1 #4

najamelan opened this issue Mar 30, 2020 · 10 comments

Comments

@najamelan
Copy link

Just gave it a try. At first it worked. I just wanted to run it again after I changed something in the code and ever since I get "Debugger exited without connecting (exit code 1)". I tried restarting vscode, but no avail.

Any idea what error code 1 is?

There is no output in any of the terminals. I don't use bundler.

@castwide
Copy link
Owner

The most common cause of exit code 1 is that the program couldn't be found. If you're using something like rvm or rbenv, is it possible you switched to a version of Ruby that doesn't have the gem installed?

@najamelan
Copy link
Author

I'll try to debug it a bit more, but I don't use rvm or rbenv. I just have stock ruby installed with pacman on arch, then all needed gems installed globally with gem install as root. I'm trying to debug a ruby script that is in a gem like directory, with a bin script that loads the rest of the app with require_relative. I tried putting the scripts path as an absolute path rather than a ${workspaceRoot} relative, but that didn't fix it.

Would it be the debugger program that couldn't be found? I will do a reboot, since I did an system upgrade since, but yesterday i literally just changed a debug statement in the code and since it wouldn't work anymore, so I'm a bit puzzled.

@najamelan
Copy link
Author

najamelan commented Mar 31, 2020

Ok, I figured a workaround. There is a lingering readapt process. When I kill that with the system monitor, I can launch debug again.

This is probably unrelated, but I do get an error in the debug console:\

#<Thread:0x0000557647b1f478 /usr/lib/ruby/gems/2.7.0/gems/backport-1.1.2/lib/backport/client.rb:101 run> terminated with exception (report_on_exception is true):
/usr/lib/ruby/gems/2.7.0/gems/readapt-1.0.0/lib/readapt/output.rb:20:in `to_json': "\\xC3" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
	from /usr/lib/ruby/gems/2.7.0/gems/readapt-1.0.0/lib/readapt/output.rb:20:in `send_event'
	from /usr/lib/ruby/gems/2.7.0/gems/readapt-1.0.0/lib/readapt/output.rb:8:in `receiving'
	from /usr/lib/ruby/gems/2.7.0/gems/backport-1.1.2/lib/backport/client.rb:63:in `tick'
	from /usr/lib/ruby/gems/2.7.0/gems/backport-1.1.2/lib/backport/server/stdio.rb:18:in `update'
	from /usr/lib/ruby/2.7.0/observer.rb:197:in `block in notify_observers'
	from /usr/lib/ruby/2.7.0/observer.rb:196:in `each'
	from /usr/lib/ruby/2.7.0/observer.rb:196:in `notify_observers'
	from /usr/lib/ruby/gems/2.7.0/gems/backport-1.1.2/lib/backport/client.rb:121:in `read_input'
	from /usr/lib/ruby/gems/2.7.0/gems/backport-1.1.2/lib/backport/client.rb:102:in `block in run_input_thread'

Don't really know where it's coming from, as all of my source files are valid UTF-8. My default locale is en_US.UTF-8. It doesn't keep me from debugging, but it might cause the process to linger?

@castwide
Copy link
Owner

Yeah, that could be the problem. If it's making the server adapter hang, it might stop the process from exiting properly. Thanks for tracking it down. I'll look into it.

@qortex
Copy link

qortex commented Apr 13, 2020

Ran into the same situation. When something fails and readapt hangs, then it does exit 1 and should be killed through the terminal to work again.

@rodcul
Copy link

rodcul commented Nov 25, 2020

Happened to me too, lost around an hour till I found this thread - thanks guys for the solution!

@cubytz
Copy link

cubytz commented Dec 11, 2020

@najamelan Thanks a lot!! Worked for me!

@jarrodldavis
Copy link

I'm having the same issue, but only on GitHub Codespaces. Everything works fine at first, but restarting or stopping then starting the debug session results in either an exit code 1 error or the debug session briefly starting but Rails/Puma complaining about an existing server.pid file.

Locally, using the Remote - Containers extension, restarting debug sessions works fine.

@jarrodldavis
Copy link

Okay, I figured out the problem with Codespaces. It looks like something with how auto-forwarded ports does not play well with Readapt's TCP server. Turning off automatic port forwarding fixes the issue:

// settings.json
{
  "remote.autoForwardPorts": false
}

@DaVicki
Copy link

DaVicki commented Aug 26, 2022

@najamelan ran into the same problem. Thanks for the solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants