From 27e70fde46b6a1e51923f7733de32928853c86e3 Mon Sep 17 00:00:00 2001 From: Julien Neuhart Date: Fri, 22 May 2026 09:44:25 +0200 Subject: [PATCH] fix(chromium): stop pinning proxy when chromedp start fails --- pkg/modules/chromium/browser.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/modules/chromium/browser.go b/pkg/modules/chromium/browser.go index a5e5d76d..f1777a4a 100644 --- a/pkg/modules/chromium/browser.go +++ b/pkg/modules/chromium/browser.go @@ -169,6 +169,15 @@ func (b *chromiumBrowser) Start(logger *slog.Logger) error { if err != nil { cancel() allocatorCancel() + // The pinning proxy started before chromedp; tear it down so a + // supervisor retry can re-bind. Stop is a no-op when the proxy + // was never started (operator-configured --chromium-proxy-server + // or --chromium-host-resolver-rules). + // See https://github.com/gotenberg/gotenberg/issues/1559. + stopErr := b.pinningProxy.Stop(logger) + if stopErr != nil { + logger.ErrorContext(context.Background(), fmt.Sprintf("stop pinning proxy after failed start: %s", stopErr)) + } return fmt.Errorf("run exec allocator: %w", err) }