Open pjerryhu opened 5 months ago
Encountered the same issue when using @aws-sdk/client-cognito-identity
in combination with bun
and Sentry
.
This setup fails with ConnectionRefused: Unable to connect. Is the computer able to access the url?
import {
CognitoIdentityClient,
GetIdCommand,
} from "@aws-sdk/client-cognito-identity";
import * as Sentry from "@sentry/node";
Sentry.init({
dsn: "<dsn>",
debug: true,
});
const client = new CognitoIdentityClient({
region: "<region>",
});
const { IdentityId } = await client.send(
new GetIdCommand({
IdentityPoolId: "pool",
Logins: {
[`idp-id/user-pool-id`]: "<token>"
},
})
);
console.log(IdentityId);
Filtering out the Http
integration in sentry fixes the issue, as described here: https://github.com/getsentry/sentry-javascript/issues/9564#issuecomment-1820066885
Sentry.init({
dsn: "<dsn>",
debug: true,
integrations: (int) =>
int.filter((i) => !["Http"].includes(i.name)),
});
Seems to be related to this monkeypatch of http: https://github.com/getsentry/sentry-javascript/blob/b46a1bb6eaf9fd22362a9fdf46cb8bab6cc5ec3b/packages/node/src/integrations/http.ts#L120-L128
This has been fixed with Sentry Bun SDK 8.0.0
beta, released with https://github.com/getsentry/sentry-javascript/releases/tag/8.0.0-beta.1. Will close this issue when v8 fully releases.
Fixed with 8.0.0 of @sentry/bun
- please give it a try. Thanks!
https://docs.sentry.io/platforms/javascript/guides/bun
https://docs.sentry.io/platforms/javascript/guides/bun/migration/v7-to-v8
What version of Bun is running?
1.0.20
What platform is your computer?
Darwin 22.3.0 arm64 arm
What steps can reproduce the bug?
running my code like this and textract code just stopped working
What is the expected behavior?
the function should return ocr text from the image
What do you see instead?
Additional information
No response