MIDI Guitar 3 Lua Script Module fails to open HTML in Safari (WebKitErrorDomain:103)

Hi @JamO,

Here is a description of the error I’m experiencing.

When loading a matched .lua / .html pair via MIDI Guitar 3’s Lua Scripts → Browse function (from the default Lua folder in the Group Containers directory – aka MIDI Guitar 3 Data Folder), the HTML fails to open in Safari with the error:

“Not allowed to use restricted network port (WebKitErrorDomain:103)”

This issue appears only in Safari. The same files load correctly in Chrome and ChatGPT Atlas (if you change your defafult browser), though it opens two identical windows in Chrome for some reason.

However, if the identical .lua / .html pair is stored outside the Group Containers path (e.g. Desktop/My Lua) and the .lua file is dragged directly onto a module slot, the web app launches correctly in Safari and continues to work after saving/reloading the preset in MG3.

Additional notes:

  • The WebSocket connection uses ws://127.0.0.1:8080 (non-restricted port)
  • The issue occurs even with a completely blank .html file

This suggests the issue may be related to how MIDI Guitar 3 resolves or launches HTML files from its sandboxed Lua folder when using the built-in browser, specifically under Safari/WebKit.

I hope this helps to diagnose the issue. I can provide a demonstration video if it would be helpful.

1 Like

Thanks for this report!

So, just to make 100% sure I understand:

  1. this happens not only with your Scale Demon, but also with MyWhammy.lua/html?
  2. With MyWhammy, are there any Lua error messages at the bottom of the MG window?
  1. Yes, it happens with both, but the script part is very similar.
  2. Yes, there was an error in line 28 but I fixed it and now there’s no error.

For what it’s worth, CC04 does not seem to affect in the GUI but I can see a text report of parameter data at the base of the MIDI Guitar 3 GUI for the MyWhammy.lua script.

Its looks like your Safari blocks your network port 8080. I have no idea why, but will try to make an option to change the port number.

I’m leaning towards it not being that particular port.

AI helper says:

"Safari is rejecting how MIDI Guitar 3 launches file:// HTML from its sandboxed Lua folder, and the “restricted port” error is a misleading side-effect of that security model — not an actual port issue in your code.

:warning: What NOT to waste time on

  • Changing WebSocket ports (8080 is fine)
  • Hunting for hidden ports in your JS
  • Rewriting your app logic"

This seems valid based on my experiments. Are you aware of a test I can run to verify if the port is blocked or occupied with something else?

1 Like