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

Processing won't start a second time when a system proxy server is set on Linux #438

Open
rapiz1 opened this issue Mar 7, 2022 · 9 comments
Labels
Help Wanted We have very little time and would like some help

Comments

@rapiz1
Copy link

rapiz1 commented Mar 7, 2022

Description

The IDE will crash after a second start, without any error messages.

Expected Behavior

The IDE can start

Current Behavior

The IDE failed to start at the second time

Steps to Reproduce

  1. Open processing
  2. Quit
  3. Open processing again.

Your Environment

  • Processing version: processing-4.0b6
  • Operating System and OS version: Arch Linux
  • Other information:

Possible Causes / Solutions

After rm -rf ~/.config/processing, the IDE can start.

@rapiz1
Copy link
Author

rapiz1 commented Mar 7, 2022

In preference.txt,

instance_server.key=0.22815461437707485
instance_server.port=37109

is relevant.
If these two lines are deleted, then the next start will work

@rapiz1
Copy link
Author

rapiz1 commented Mar 7, 2022

Background: I have http and sock proxy set, in the KDE Proxy setting.
After reading https://github.com/processing/processing4/blob/2a1fae8f77243716b48eee958229cb1f40dcbd09/app/src/processing/app/SingleInstance.java#L130 and strace -f ./processing, I found out that processing try to connect the instance server via the proxy. This didn't work, of course.

Seting proxy.system=false in preference.txt solves the issue.

@benfry benfry changed the title Crash after a second start Processing won't start a second time when a system proxy server is set on Linux Mar 7, 2022
@benfry
Copy link
Owner

benfry commented Apr 23, 2022

Hm, I don't personally know enough about system proxies to understand why enabling it would cause connections to localhost break. Maybe someone else can help.

@benfry benfry added the Help Wanted We have very little time and would like some help label Apr 23, 2022
@guilhermesilveira
Copy link
Contributor

@rapiz1 can you try it with beta 7?

@dev01111
Copy link

Working on a fix for this issue. Maybe we should disable proxys when running singleinstance.java?

@rapiz1
Copy link
Author

rapiz1 commented Jun 21, 2022 via email

@dev01111
Copy link

dev01111 commented Jun 21, 2022

#501
This little addition of code doesn't ask the proxy about a private Loopback IP (localhost also known as 127.0.0.1) resolving lots of potential issues. However it is untested, try building this code.

@benfry
Copy link
Owner

benfry commented Aug 8, 2022

Ok, thanks; I can't just ship it out without testing, we'd need someone who's dealing with proxies to weigh in.

As far as I know, localhost should not be proxied (why would it be? it's not like the receiving proxy server can redirect traffic back to… 127.0.0.1), but it seems that things have gone back and forth with whether that's the correct behavior in Java or not:

https://bugs.openjdk.org/browse/JDK-8025065
https://bugs.openjdk.org/browse/JDK-6737819

@dev01111
Copy link

Ok, thanks; I can't just ship it out without testing, we'd need someone who's dealing with proxies to weigh in.

As far as I know, localhost should not be proxied (why would it be? it's not like the receiving proxy server can redirect traffic back to… 127.0.0.1), but it seems that things have gone back and forth with whether that's the correct behavior in Java or not:

https://bugs.openjdk.org/browse/JDK-8025065
https://bugs.openjdk.org/browse/JDK-6737819

Java should definitely fix this, I just thought that maybe a temporary solution could be good while the nerds at Oracle work this out.

I also tried building it, no javac errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted We have very little time and would like some help
Projects
None yet
Development

No branches or pull requests

4 participants