diff --git a/packages/backend/src/core/activitypub/ApRequestService.ts b/packages/backend/src/core/activitypub/ApRequestService.ts index 533c8250e0..8cf1f9066f 100644 --- a/packages/backend/src/core/activitypub/ApRequestService.ts +++ b/packages/backend/src/core/activitypub/ApRequestService.ts @@ -241,11 +241,16 @@ export class ApRequestService { if (alternate) { const href = alternate.getAttribute('href'); if (href) { + // Since this early exits, we need to call DetachedWindowAPI.close + await window.happyDOM.close(); + return await this.signedGet(href, user, false); } } } catch (e) { // something went wrong parsing the HTML, ignore the whole thing + } finally { + await window.happyDOM.close(); } } //#endregion