Skip to content

Proxy configuration can't be unset #2184

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

Closed
3 tasks done
per1234 opened this issue Aug 22, 2023 · 1 comment · Fixed by #2334
Closed
3 tasks done

Proxy configuration can't be unset #2184

per1234 opened this issue Aug 22, 2023 · 1 comment · Fixed by #2334
Assignees
Labels
conclusion: resolved Issue was resolved topic: CLI Related to Arduino CLI topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@per1234
Copy link
Contributor

per1234 commented Aug 22, 2023

Describe the problem

The "Network" tab of the Arduino IDE preferences allows users to configure the IDE to access the Internet either directly or through a proxy server.

🐛 If the user has previously configured the preferences to use a proxy server, it is impossible for them to change the preferences back to not using the proxy.

To reproduce

  1. Select File > Preferences... (Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Select the "Network" tab from the "Preferences" dialog.
  3. Select the radio button next to "Manual proxy configuration".
  4. Set any values you like in the individual proxy configuration fields.
    You don't need to have a proxy server set up and the configuration doesn't need to be valid in order to perform this demonstration.
  5. Click the "OK" button.
    The "Preferences" dialog will close.
  6. Select File > Quit from the Arduino IDE menus.
  7. Start Arduino IDE.
  8. Select File > Preferences... from the Arduino IDE menus.
  9. Select the "Network" tab from the "Preferences" dialog.
  10. Select the radio button next to "No proxy".
  11. Click the "OK" button.
  12. Select File > Quit from the Arduino IDE menus.
  13. Start Arduino IDE.
  14. Select File > Preferences... from the Arduino IDE menus.
  15. Select the "Network" tab from the "Preferences" dialog.

🐛 The "Manual proxy configuration" radio button is selected even though you previously selected "No proxy" and Arduino IDE continues to use the proxy configuration when accessing the Internet.

Expected behavior

The user can change the preference back to "No proxy".

Arduino IDE version

57fa18b

Operating system

Windows

Operating system version

11

Additional context

A variant of the fault was previously reported at arduino/arduino-cli#1677. The origin was identified as being a deficiency in Arduino CLI. That deficiency has since been resolved (arduino/arduino-cli#2212) and the IDE's Arduino CLI dependency bumped to the version that contains that change (#2165).

I had hoped that the manifestation of the fault in Arduino IDE would have been resolved as a matter of course by the change in Arduino CLI, but I see that is not the case so I think some changes will be needed in the Arduino IDE codebase as well to leverage the change in Arduino CLI.

I decided to create a new issue to track that work in the Arduino IDE codebase rather than reusing arduino/arduino-cli#1677 for that purpose because arduino/arduino-cli#1677 ended up being focused on the Arduino CLI deficiency and the symptom of the fault is now different than what is described in arduino/arduino-cli#1677.


At step (9) of the demonstration provided above, I see this printed in the IDE logs:

2023-08-22T07:25:21.712Z config INFO Updating daemon with 'data': {
  "board_manager": {
    "additional_urls": [
      "https://www.pjrc.com/teensy/package_teensy_index.json"
    ]
  },
  "build_cache": {
    "compilations_before_purge": 10,
    "ttl": "720h0m0s"
  },
  "daemon": {
    "port": "50051"
  },
  "directories": {
    "data": "c:\\Users\\per\\AppData\\Local\\Arduino15",
    "user": "c:\\Users\\per\\Documents\\Arduino"
  },
  "library": {
    "enable_unsafe_install": false
  },
  "locale": "en",
  "logging": {
    "file": "",
    "format": "text",
    "level": "info"
  },
  "metrics": {
    "addr": ":9090",
    "enabled": true
  },
  "network": {},
  "output": {
    "no_color": false
  },
  "sketch": {
    "always_export_binaries": false
  },
  "updater": {
    "enable_notification": true
  }
}

Workaround

  1. Select File > Quit from the Arduino IDE menus if it is running.
  2. Use any text editor to open the file at the following path:
    • Windows:
      C:\Users\<username>\.arduinoIDE\arduino-cli.yaml
      
      (where <username> is your Windows username)
    • Linux:
      ~/.arduinoIDE/arduino-cli.yaml
      
      ❗ The ~/.arduinoIDE/ folder may be hidden by default in your file manager and terminal.
    • macOS:
      ~/.arduinoIDE/arduino-cli.yaml
      
      ❗ The ~/.arduinoIDE/ folder is hidden by default. You can make it visible by pressing the Command+Shift+. keyboard shortcut.
  3. Delete the lines from the file that have this format:
    network:
      proxy: <some proxy URL>
      user_agent_ext: daemon
  4. Save the file.
  5. Start Arduino IDE.

You should now find that "No proxy" is selected in the "Network" tab of the "Preferences" dialog.

Additional reports

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@per1234 per1234 added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project topic: CLI Related to Arduino CLI labels Aug 22, 2023
@kittaakos kittaakos self-assigned this Aug 22, 2023
kittaakos pushed a commit that referenced this issue Aug 22, 2023
An empty object (`{}`) must be used to correctly unset the CLI config
value to its default.

Closes #2184
kittaakos pushed a commit that referenced this issue Aug 22, 2023
An empty object (`{}`) must be used to correctly unsettle the CLI config
value to its default.

Closes #2184
kittaakos pushed a commit that referenced this issue Aug 22, 2023
An empty object (`{}`) must be used to correctly unset the CLI config
value to its default.

Closes #2184
kittaakos pushed a commit that referenced this issue Jan 18, 2024
An empty object (`{}`) must be used to correctly unset the CLI config
value to its default.

Closes #2184
kittaakos pushed a commit that referenced this issue Feb 5, 2024
An empty object (`{}`) must be used to correctly unset the CLI config
value to its default.

Closes #2184
kittaakos pushed a commit that referenced this issue Feb 8, 2024
An empty object (`{}`) must be used to correctly unset the CLI config
value to its default.

Closes #2184
kittaakos pushed a commit that referenced this issue Feb 15, 2024
An empty object (`{}`) must be used to correctly unset the CLI config
value to its default.

Closes #2184

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Feb 20, 2024
An empty object (`{}`) must be used to correctly unset the CLI config
value to its default.

Closes #2184

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Feb 20, 2024
An empty object (`{}`) must be used to correctly unset the CLI config
value to its default.

Closes #2184

Signed-off-by: Akos Kitta <[email protected]>
kittaakos pushed a commit that referenced this issue Feb 20, 2024
An empty object (`{}`) must be used to correctly unset the CLI config
value to its default.

Closes #2184

Signed-off-by: Akos Kitta <[email protected]>
@kittaakos kittaakos added the conclusion: resolved Issue was resolved label Feb 20, 2024
@astro-nishan

This comment was marked as resolved.

@arduino arduino locked as resolved and limited conversation to collaborators May 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
conclusion: resolved Issue was resolved topic: CLI Related to Arduino CLI topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
3 participants