arcjet-js: Bun SDK returns "failed to generate fingerprint" on every call
As of the latest version of Bun (v1.2.17) all calls to the Arcjet SDK return an error "failed to generate fingerprint"
14:49:16 ~/Code/bun-test-2025 bun run --hot index.ts
✦Aj WARN Arcjet will use 127.0.0.1 when missing public IP address in development mode
Started development server: http://localhost:3000
Arcjet decision ArcjetErrorDecision {
id: "req_01jyrtdanbfpybfbyxa8qyckj3",
ttl: 0,
results: [],
ip: ArcjetIpDetails {
latitude: undefined,
longitude: undefined,
accuracyRadius: undefined,
timezone: undefined,
postalCode: undefined,
city: undefined,
region: undefined,
country: undefined,
countryName: undefined,
continent: undefined,
continentName: undefined,
asn: undefined,
asnName: undefined,
asnDomain: undefined,
asnType: undefined,
asnCountry: undefined,
service: undefined,
_isHosting: false,
_isVpn: false,
_isProxy: false,
_isTor: false,
_isRelay: false,
hasLatitude: [Function: hasLatitude],
hasLongitude: [Function: hasLongitude],
hasAccuracyRadius: [Function: hasAccuracyRadius],
hasTimezone: [Function: hasTimezone],
hasPostalCode: [Function: hasPostalCode],
hasCity: [Function: hasCity],
hasRegion: [Function: hasRegion],
hasCountry: [Function: hasCountry],
hasContintent: [Function: hasContintent],
hasASN: [Function: hasASN],
hasService: [Function: hasService],
isHosting: [Function: isHosting],
isVpn: [Function: isVpn],
isProxy: [Function: isProxy],
isTor: [Function: isTor],
isRelay: [Function: isRelay],
},
conclusion: "ERROR",
reason: ArcjetErrorReason {
type: "ERROR",
message: "failed to generate fingerprint",
isSensitiveInfo: [Function: isSensitiveInfo],
isRateLimit: [Function: isRateLimit],
isBot: [Function: isBot],
isEdgeRule: [Function: isEdgeRule],
isShield: [Function: isShield],
isEmail: [Function: isEmail],
isError: [Function: isError],
},
isAllowed: [Function: isAllowed],
isDenied: [Function: isDenied],
isChallenged: [Function: isChallenged],
isErrored: [Function: isErrored],
}
Older versions work fine. I tested the minimum version we support (v1.1.27) and it works fine:
(Install the old version with curl -fsSL https://bun.sh/install | bash -s "bun-v1.1.27")
14:50:58 ~/Code/bun-test-2025 bun run --hot index.ts
✦Aj WARN Arcjet will use 127.0.0.1 when missing public IP address in development mode
Started server http://localhost:3000
Arcjet decision ArcjetAllowDecision {
id: "req_01jyrtfxcbfpy97z0ghss4wq7e",
ttl: 0,
results: [
ArcjetRuleResult {
ruleId: "6af1fa873ca03204a9777ce67315bf5bc380c8d773ca71e0f4942408e29213c9",
fingerprint: "fp::2::0d219da6100b99f95cf639b77e088c6df3c096aa5fd61dec5287c5cf94d5e545",
ttl: 0,
state: "RUN",
conclusion: "ALLOW",
reason: ArcjetShieldReason {
type: "SHIELD",
shieldTriggered: false,
isSensitiveInfo: [Function: isSensitiveInfo],
isRateLimit: [Function: isRateLimit],
isBot: [Function: isBot],
isEdgeRule: [Function: isEdgeRule],
isShield: [Function: isShield],
isEmail: [Function: isEmail],
isError: [Function: isError],
},
isDenied: [Function: isDenied],
}
// ...
Steps to reproduce
- Install the latest version of Bun
- Follow our Bun getting started guide
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 17 (17 by maintainers)
Debugged further with this user and they weren’t using IP address in characteristics, so there was no error. However, no data was being returned. Confirmed that downgrading to 1.2.10 fixed the issue.
Aside from fixing in #4523, I wonder if there’s a way we could detect this in the SDK and return an error? Looks like we got back a request ID, but the error prevented us processing any data…that should be a fatal error (400 bad request?)
Via discord:
Looks like
1.2.17is working for some folks, could it be OS dependent or something? Do we have a windows box to test on?Yes I am digging in and can reproduce but no clue yet