aws-observability / aws-rum-web

Amazon CloudWatch RUM Web Client
Apache License 2.0
114 stars 65 forks source link

[Bug]: CWR: Failed to retrieve credentials from STS: TypeError: Cannot read properties of undefined (reading 'split') #497

Closed renataogarcia closed 5 months ago

renataogarcia commented 5 months ago

Which web client version did you detect this bug with?

v1.6.1

What environment (build systems, module system, and framework) did you detect this bug with?

browserName: Chrome browserVersion: 119.0.0.0 osName: Mac OS osVersion: 10.15.7 deviceType: desktop

TypeScript v5.3.2, ECMAScript modules (ESM)

Is your web application a single page application (SPA) or multi page application (MPA)?

MPA

Please provide your web client configuration

{ sessionSampleRate: 1, endpoint: "https://dataplane.rum.us-east-1.amazonaws.com", telemetries: [ "http", [ "errors", { ignore: (event: ErrorEvent | PromiseRejectionEvent) => "message" in event && // ResizeObserver loop completed with undelivered notifications // ResizeObserver loop limit exceeded event.message.startsWith("ResizeObserver loop"), }, ], "performance", ], allowCookies: true, cookieAttributes: { sameSite: "None", }, enableXRay: false, identityPoolId: rumConfig.identityPoolId, guestRoleArn: rumConfig.guestRoleArn, sessionAttributes: {build: __APP_VERSION__, ...scope}, }

Please describe the bug/issue

I'm seeing this error in production with a few clients and it is sporadic. RUM seems to be working fine as I'm getting the error reports and stats but is occuring daily in the logs. Stacktrace:

/aws-rum-web/dist/es/dispatch/StsClient.js:98:30
/aws-rum-web/dist/es/dispatch/StsClient.js:43:22
/aws-rum-web/dist/es/dispatch/StsClient.js:24:52
/aws-rum-web/dist/es/dispatch/StsClient.js:15:57

I had a look at #345, but it seems unrelated.

williazz commented 5 months ago

Hi, this is a known issue that we are addressing. Thanks for the good catch. Will link this issue when a PR is raised.