-
Notifications
You must be signed in to change notification settings - Fork 103
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
Not able to load environment variables or connect to services via gradle+intellij #2785
Comments
Hi, {"internal_proxy": {"log_destination": "/tmp/internal_proxy.log", "log_level": "mirrord=trace"}} then after running attaching the logs (after redacting sensitive information? |
User was able to reproduce it in a vanilla project launching "gradle run" - so perhaps the problem is with the gradle/intellij integration (not using IntelliJ's compilation/execution) |
I was looking into this more this morning and I was not able to get it working (still need to try on a different laptop but forgot that at home today) |
Hey |
Okay thanks for the update. I did confirm that its not just an environment variable issue, as when the environment variables are set manually, the app still can't connect to rabbitmq over mirrord |
Tried to get this working on a new mac, no dice. The problem is not just that it doesnt get env vars, even if it gets the env vars it cannot connect to rmq running in the namespace. But only when running via intellij gradle |
Hey folks was playing around with this this morning. I was able to reproduce the issue on a sample gradle app by changing the run configuration https://github.com/scottillogical/mirrord-gradle-bug
The only difference between the two run configurations is the broken one runs |
Ah that's extremely valuable, thank you @scottillogical |
I managed to reproduce thanks for the example! |
Documenting some early findings: It looks like sometimes the IDE creates a different type of configuration object without me (intentionally/knowingly) doing anything different. When When debugging the plugin to find out why. I'm getting the "good" type of configuration in one or two runs after starting the debug IDE, and after that only the "bad" type. I thought the difference has something to do with the env-cleanup in |
Just a guess, but perhaps it's because |
Tried it, nope |
I would try to check where IntelliJ decides which configuratoin is to be used and see what's the logic there |
This seems to be an IntelliJ issue on itself - if you add any environment variable to the run configuration it doesn't get to the debugged/ran process. |
Bug Description
I recently got a new mac, setting it up I am not able to get intellij mirrord to load the environment variables correctly. This worked on my previous mac fine
Via CLI it works fine
But when I start up the java app in intellij, it does not load the environment variables from the target pod
Since in the past this has been due to SIP issue https://mirrord.dev/docs/faq/common-issues/ I copied my JDK into ~/java, but this did not ameliorate the issue
I also tried running
sudo codesign --remove-signature ./<your-binary>
but after that I could not boot the jdk without it exiting immediately afterwards. I tried other jdks no dice thus farSteps to Reproduce
Backtrace
No response
Relevant Logs
No response
Your operating system and version
osx sonoma 14.7
Local process
$| file $JAVA_HOME/bin/java /Users/sschulthess/.jenv/versions/corretto64-1.8.0.422/bin/java: Mach-O 64-bit executable arm64
Local process version
$| java -version openjdk version "1.8.0_422" OpenJDK Runtime Environment Corretto-8.422.05.1 (build 1.8.0_422-b05) OpenJDK 64-Bit Server VM Corretto-8.422.05.1 (build 25.422-b05, mixed mode)
Additional Info
config file
The text was updated successfully, but these errors were encountered: