multipass icon indicating copy to clipboard operation
multipass copied to clipboard

multipass launch/find fail when using PAC file (needs Qt 6)

Open pboushy opened this issue 3 years ago • 14 comments

Describe the bug When running multipass launch or multipass find it fails because it can't retried a PAC script.

To Reproduce

  1. multipass launch --verbose

mutipass fails with: launch failed: Remote "" is unknown or unreachable.

Expected behavior MultiPass should have been able to download the needed files.

Logs [2021-11-03T15:36:55.248] [warning] [Qt] Execution of PAC script at "http%3A%2F%2Fwpad.example.com%2Fwpad.dat" failed: The operation couldn’t be completed. (NSURLErrorDomain error -1002.) [2021-11-03T15:37:05.789] [warning] [url downloader] Error getting https://codeload.github.com/canonical/multipass-workflows/zip/refs/heads/main: Network timeout - trying cache.

Additional info

  • OS: macOS 10.14
  • multipass version multipass 1.8.0+mac multipassd 1.8.0+mac
  • multipass info --all n/a

Additional context Mac client is running Cisco AnyConnect. Cisco AnyConnect tells the client to use a PAC file as shown by running scutil --proxy:

<dictionary> {
  ProxyAutoConfigEnable : 1
  ProxyAutoConfigURLString : http://wpad.example.com/wpad.dat
}

Note - I also have http_proxy and https_proxy set, but it looks like those are ignored.

pboushy avatar Nov 03 '21 21:11 pboushy

@prbsparx the error message suggests the PAC URL (http://wpad.example.com/wpad.dat) is not reachable, can you confirm you can download the PAC file?

Saviq avatar Nov 05 '21 11:11 Saviq

Looking closer at this, and trying some things out, I believe the problem lies in Qt, it's trying to load a url-escaped URL (http%3A%2F%2Fwpad.example.com%2Fwpad.dat). I was able to successfully use a static proxy with Multipass, but not through a PAC file (when the same PAC file worked fine in a browser).

Could you try setting a static proxy instead of a PAC file?

Saviq avatar Nov 05 '21 12:11 Saviq

I've filed a Qt bug for this:

https://bugreports.qt.io/browse/QTBUG-98024

Saviq avatar Nov 05 '21 12:11 Saviq

the PAC URL (http://wpad.example.com/wpad.dat) is not reachable

It definitely is from the network I was using.

Could you try setting a static proxy instead of a PAC file?

I actually had run a function proxye that I wrote to configure my proxy variables... and noticed it didn't read those. Cisco AnyConnect configures the proxy settings and I can't change them from my end. Our vpn admins would have to create a unique profile for me to test that.

I saw they already have a commit that will fix this and it's going to be included in Qt 6 supposedly.

What does that mean regarding timing for the issue actually being fixed?

pboushy avatar Nov 05 '21 22:11 pboushy

Hi @prbsparx,

I actually had run a function proxye that I wrote to configure my proxy variables... and noticed it didn't read those.

Right, the system wide preferences are used.

What does that mean regarding timing for the issue actually being fixed?

It will require us to switch to Qt 6 so not a "tomorrow" thing. We'll look into it for our next release, though.

Saviq avatar Nov 08 '21 11:11 Saviq

FYI: Run into the same problem @Saviq.

dirien avatar Dec 13 '21 17:12 dirien

I am also facing the same problem when trying to start the microK8s on multipass. Any update or workaround is much appreciated 🙏

gkarthiks avatar Dec 24 '21 20:12 gkarthiks

@gkarthiks, I just remove the PAC temp. :(

dirien avatar Jan 03 '22 08:01 dirien

@gkarthiks, I just remove the PAC temp. :(

Would it be possible to elaborate on how this workaround works? I'm facing the same issue

Rinfore avatar Apr 13 '22 00:04 Rinfore

Would it be possible to elaborate on how this workaround works? I'm facing the same issue

I use a macbook, and under Network -> Proxies I just uncheck the checkbox for automatic proxy configuration.

dirien avatar Apr 13 '22 06:04 dirien

Hi all, Qt 5.15.3 was released recently and includes the fix for this. It won't make our upcoming 1.9.0 release, but we'll try and get it into the next one a number of weeks later.

Saviq avatar Apr 13 '22 08:04 Saviq

Great @Saviq!

dirien avatar Apr 13 '22 17:04 dirien

Same here

fuatkarakus avatar May 10 '22 08:05 fuatkarakus

minhio avatar Aug 11 '22 19:08 minhio

New to Multipass. Downloaded version 1.11.1+mac. My company uses PAC file for determining the right proxy behind VPN. And I'm experiencing this issue. Maybe I missed it, but I did not see any fix or workaround described here. Any help is greatly appreciated.

jojomgithub avatar Apr 30 '23 23:04 jojomgithub

@jojomgithub The workaround for now is to close your VPN and disable "Automatic Proxy Configuration" on your Mac. Make sure you save the previous setting before unchecking.

On your Mac, navigate to: Apple Menu -> Preferences -> Search for "Proxies"

image

davidmroth avatar May 02 '23 19:05 davidmroth

This is fixed in the development version and will be in the 1.13 release.

townsend2010 avatar Nov 03 '23 14:11 townsend2010

Same error 1.13.1. brand new mac. Any ideas?

fernandokbs avatar Feb 24 '24 01:02 fernandokbs

I have the same error, no proxies on Mac Sonoma 14.1.1

craftzneko avatar Mar 02 '24 19:03 craftzneko

I have the same error, no proxies on Mac Sonoma 14.2.1

hellboy0621 avatar Mar 09 '24 10:03 hellboy0621