[Mac] Problem with resolving fully quailfied host names in URL

,

Hi,

we found that there is problem to connect from our UXP plugin on MacOS to a remote server if a fully qualified name is used in a URL.
The only way is currently the pure host name “host” instead of “host.my-domain.com
This limits the user to have the server inside his own network.
For remote server I found a workaround by adding the IP address and a single hostname into /private/etc/hosts.

Under Windows the UXP plugin can handle urls with and without domain names, as expected.

But under Mac I see only:

index.js:2705 TypeError: Network request failed
     at z.o.onerror (uxp://uxp-internal/netjs_scripts.js:2)
     at z.m (uxp://uxp-internal/domjs_scripts.js:2)
     at uxp://uxp-internal/domjs_scripts.js:2
     at Object.runWithNativeHandler (<anonymous>)
     at L (uxp://uxp-internal/domjs_scripts.js:2)
     at uxp://uxp-internal/domjs_scripts.js:2
     at D (uxp://uxp-internal/domjs_scripts.js:2)
     at P (uxp://uxp-internal/domjs_scripts.js:2)
     at i (uxp://uxp-internal/netjs_scripts.js:2)

when using fetch().

Any clues for that?
Is the character ‘.’ on macOS coded differently? Or must it extra escaped?

Hello,

the problem still exists with Photoshop 2024 and Photoshop 2025

It is reproducible some lines of code in uxp playground:

	try {
		const response = await fetch("https://www.adobe.com");
		if (!response.ok) {
			throw new Error(`fetch status is not OK`);
		}
	} catch (error) {
		console.log(error);
	}

This works fine (response.ok is true) either on PC and on Mac.

But using an http protocol like fetch(“http://www.adobe.com”) on Mac results in an exception:

main.js:30 TypeError: Network request failed
at z.o.onerror (uxp://uxp-internal/netjs_scripts.js:2)
at z.m (uxp://uxp-internal/domjs_scripts.js:2)
at uxp://uxp-internal/domjs_scripts.js:2
at L (uxp://uxp-internal/domjs_scripts.js:2)
at uxp://uxp-internal/domjs_scripts.js:2
at D (uxp://uxp-internal/domjs_scripts.js:2)
at P (uxp://uxp-internal/domjs_scripts.js:2)
at i (uxp://uxp-internal/netjs_scripts.js:2)

in contrast using a pure hostname, without domain name in address fetch(“http://my-local-vm”) works fine again, but is not a solution for our customers.

What’s wrong in Mac UXP?

  • While using http domains, keep in mind that Photoshop only allows http protocol on Win32 but not on macOS. InDesign has no such restrictions.
1 Like