Skip to content

New proxy tab in preferences #3637

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

Merged
merged 7 commits into from
Aug 21, 2015
Merged

New proxy tab in preferences #3637

merged 7 commits into from
Aug 21, 2015

Conversation

ffissore
Copy link
Contributor

@ffissore ffissore commented Aug 7, 2015

Someone is having issues when using libs/boards manager behind corporate proxies (corps or universities)

Previous attempts to rely on system proxy settings were not successful, sometimes because of how such corporate PCs are configured. (see #3604)

We must give up and provide a complete proxy configuration settings panel

/cc @McNeight

@ffissore ffissore added the Component: IDE user interface The Arduino IDE's user interface label Aug 7, 2015
@ffissore ffissore self-assigned this Aug 7, 2015
@ffissore ffissore added this to the Release 1.6.6 milestone Aug 7, 2015
@McNeight
Copy link

Just tested arduino-PR-3637-BUILD-377-windows from behind the firewall. Manual proxy settings work well, but the auto-detect setting has the following errors:

Error downloading http://downloads.arduino.cc/packages/package_index.json
java.lang.RuntimeException: java.lang.Exception: Error downloading http://downloads.arduino.cc/packages/package_index.json
    at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onUpdatePressed$23(ContributionManagerUI.java:149)
    at cc.arduino.contributions.packages.ui.ContributionManagerUI$$Lambda$81/32267106.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.Exception: Error downloading http://downloads.arduino.cc/packages/package_index.json
    at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:113)
    at cc.arduino.contributions.packages.ContributionInstaller.download(ContributionInstaller.java:318)
    at cc.arduino.contributions.packages.ContributionInstaller.downloadIndexAndSignature(ContributionInstaller.java:294)
    at cc.arduino.contributions.packages.ContributionInstaller.updateIndex(ContributionInstaller.java:276)
    at cc.arduino.contributions.packages.ui.ContributionManagerUI.lambda$onUpdatePressed$23(ContributionManagerUI.java:145)
    ... 2 more
Caused by: javax.script.ScriptException: ReferenceError: "myIpAddress" is not defined in <eval> at line number 106
    at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:455)
    at jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:387)
    at jdk.nashorn.api.scripting.NashornScriptEngine.invokeFunction(NashornScriptEngine.java:187)
    at cc.arduino.net.CustomProxySelector.callFindProxyForURL(CustomProxySelector.java:83)
    at cc.arduino.net.CustomProxySelector.pacProxy(CustomProxySelector.java:60)
    at cc.arduino.net.CustomProxySelector.getProxyFor(CustomProxySelector.java:35)
    at cc.arduino.utils.network.FileDownloader.download(FileDownloader.java:125)
    at cc.arduino.contributions.DownloadableContributionsDownloader.download(DownloadableContributionsDownloader.java:111)
    ... 6 more
Caused by: <eval>:106 ReferenceError: "myIpAddress" is not defined
    at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
    at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:319)
    at jdk.nashorn.internal.runtime.ECMAErrors.referenceError(ECMAErrors.java:291)
    at jdk.nashorn.internal.objects.Global.__noSuchProperty__(Global.java:914)
    at jdk.nashorn.internal.scripts.Script$Recompilation$1$3549AA$\^eval\_.FindProxyForURL(<eval>:106)
    at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:640)
    at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:229)
    at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:387)
    at jdk.nashorn.api.scripting.ScriptObjectMirror.callMember(ScriptObjectMirror.java:192)
    at jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:381)
    ... 12 more

This was with the non-debug executable. Let me know if running the debug executable provides you with more useful information, and I'll run that instead.

-Neil

@ffissore
Copy link
Contributor Author

Argh, that's because I've implemented support only to main FindProxyForURL function. I'll work on the rest of the spec

@ffissore
Copy link
Contributor Author

Since I don't want to ask you to share your pac file, can you please tell me which functions does it use, comparing it with the list available here ? (scroll down to Predefined Functions and Environment for the JavaScript Function)

@ffissore
Copy link
Contributor Author

With 61626d4 I've added support to PAC built in functions (all but time related). Wait for the next build from @ArduinoBot and please retry

@ffissore
Copy link
Contributor Author

@McNeight FYI implementation should be complete. These messages from @ArduinoBot it's just me keeping this PR up to date with master branch

ffissore added a commit that referenced this pull request Aug 21, 2015
New proxy tab in preferences
@ffissore ffissore merged commit 8d2393d into arduino:master Aug 21, 2015
@ffissore ffissore deleted the proxy branch August 21, 2015 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE user interface The Arduino IDE's user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants