Since macOS 15 (Sequoia), Apple has implemented a privacy filter for “Local Network”.
macOS displays the request dialog when it detects a need (typically during connection attempts), but no API exists to reliably trigger this dialog.
If you experience unexpected network errors when sending data to the console, try the “Request Local Network Access” button in “Settings”.
Also ensure you haven’t accidentally rejected this request. Go to macOS Settings > Privacy & Security > Local Network and verify that “GMA Toolbox” is enabled.