orbstack: unable to save `network_proxy` settings

Describe the bug

In orbstack,set network_proxy to none in the network settings, then exit orbstack, reopen orbstack, and find that proxy is set to Automatic (system).

To Reproduce

  1. open preferences
  2. go to Network
  3. set proxy to none
  4. quit orbstack
  5. reopen orbstack
  6. check proxy setting.

Expected behavior

I think network settings should be saved.

Diagnostic report (required)

OrbStack info: Version: 1.0.0 Commit: c43913566b3e18b25f38a8d5f70e535eb265bdb2 (v1.0.0)

System info: macOS: 12.7 (21G816) CPU: amd64, 12 cores CPU model: Intel® Core™ i7-8850H CPU @ 2.60GHz Model: MacBookPro15,1 Memory: 16 GiB

Full report: https://orbstack.dev/_admin/diag/orbstack-diagreport_2023-10-14T13-05-28.058284Z.zip

Screenshots and additional context (optional)

No response

About this issue

  • Original URL
  • State: open
  • Created 9 months ago
  • Comments: 18 (6 by maintainers)

Most upvoted comments

edited: sorry i was wrong, i think this most likely to be threading issue,

with vmconfig.json contains “network_proxy”: “none” start orb will get random results, sometimes it will load network_proxy setting correctly, sometimes not and reset vmconfig.json, (run “/Applications/OrbStack.app/Contents/MacOS/OrbStack” directly in terminal has much bigger chance to work correctly)

I am using macbook with M2 Max CPU, Sonoma 14.1.

the success case has different uilog from failure case

success case ui.log

2023-10-26 18:24:14.028 OrbStack[14161:245667] WARNING: Application performed a reentrant operation in its NSTableView delegate. This warning will become an assert in the future.
2023-10-26 18:24:14.094 OrbStack[14161:245667] synthetic state -> spawning
2023-10-26 18:24:14.208 OrbStack[14161:245667] notification request failed: Error Domain=UNErrorDomain Code=1 "Notifications are not allowed for this application" UserInfo={NSLocalizedDescription=Notifications are not allowed for this application}
2023-10-26 18:24:14.217 OrbStack[14161:245706] Watching pid 14163
2023-10-26 18:24:14.217 OrbStack[14161:245667] synthetic state -> starting
2023-10-26 18:24:14.239 OrbStack[14161:245667] Daemon started: pid 14163
2023-10-26 18:24:14.740 OrbStack[14161:245667] daemon ready
2023-10-26 18:24:14.883 OrbStack[14161:245667] machines changed
2023-10-26 18:24:14.952 OrbStack[14161:245667] machines changed
2023-10-26 18:24:15.359 OrbStack[14161:245667] docker changed
2023-10-26 18:24:15.359 OrbStack[14161:245667] synthetic state -> running
2023-10-26 18:24:19.498 OrbStack[14161:245667] It's not legal to call -layoutSubtreeIfNeeded on a view which is already being laid out.  If you are implementing the view's -layout method, you can call -[super layout] instead. Break on void _NSDetectedLayoutRecursion(void) to debug.  This will be logged only once.  This may break in the future.

by comparing to a failure case, those lines are missing

2023-10-26 17:41:00.947 OrbStack[11852:206451] changing policy from NSApplicationActivationPolicy(rawValue: 1) to NSApplicationActivationPolicy(rawValue: 0)
2023-10-26 17:41:05.351 OrbStack[11852:206451] changing policy from NSApplicationActivationPolicy(rawValue: 0) to NSApplicationActivationPolicy(rawValue: 1)
2023-10-26 17:41:05.358 OrbStack[11852:206451] onTransitionToBackground

hopefully this info can help to pinpoint the issue

after little digging, i found thru UI, it failed to update ~/.orbstack/vmconfig.json, and in ~/.orbstack/logs/gui.log, it prints some warnings, pls help to check

2023-10-26 17:40:35.492 OrbStack[11852:206451] changing policy from NSApplicationActivationPolicy(rawValue: 0) to NSApplicationActivationPolicy(rawValue: 1)
2023-10-26 17:40:35.493 OrbStack[11852:206451] onTransitionToBackground
2023-10-26 17:40:35.764 OrbStack[11852:206451] machines changed
2023-10-26 17:40:35.768 OrbStack[11852:206451] synthetic state -> starting
2023-10-26 17:40:35.837 OrbStack[11852:206451] machines changed
2023-10-26 17:40:36.206 OrbStack[11852:206451] docker changed
2023-10-26 17:40:36.206 OrbStack[11852:206451] synthetic state -> running
2023-10-26 17:41:00.820 OrbStack[11852:206451] It's not legal to call -layoutSubtreeIfNeeded on a view which is already being laid out.  If you are implementing the view's -layout method, you can call -[super layout] instead. Break on void _NSDetectedLayoutRecursion(void) to debug.  This will be logged only once.  This may break in the future.
2023-10-26 17:41:00.947 OrbStack[11852:206451] changing policy from NSApplicationActivationPolicy(rawValue: 1) to NSApplicationActivationPolicy(rawValue: 0)
2023-10-26 17:41:05.351 OrbStack[11852:206451] changing policy from NSApplicationActivationPolicy(rawValue: 0) to NSApplicationActivationPolicy(rawValue: 1)
2023-10-26 17:41:05.358 OrbStack[11852:206451] onTransitionToBackground
log/gui.log (END)