microsoft-authentication-library-for-js: performanceMeasurement.startMeasurement is not a function Error in Type script sample

Core Library

MSAL.js v2 (@azure/msal-browser)

Core Library Version

1.4.9

Wrapper Library

MSAL React (@azure/msal-react)

Wrapper Library Version

1.4.9

Public or Confidential Client?

Public

Description

Getting issue with type script sample path for sample download :microsoft-authentication-library-for-js-dev\samples\msal-react-samples\typescript-sample, cloud not able to proceed further with type script sample , dont know how to fix this error

Error Message

error details Uncaught TypeError: performanceMeasurement.startMeasurement is not a function at PerformanceClient.startMeasurement (PerformanceClient.ts:123:1) at BrowserPerformanceClient.startMeasurement (BrowserPerformanceClient.ts:46:1) at ClientApplication.acquireTokenPopup (ClientApplication.ts:328:1) at PublicClientApplication.loginPopup (PublicClientApplication.ts:84:1) at handleLogin (SignInButton.tsx:18:1) at onClick (SignInButton.tsx:47:1) at HTMLUnknownElement.callCallback (react-dom.development.js:4164:1) at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:1) at invokeGuardedCallback (react-dom.development.js:4277:1) at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4291:1) Please let me know how to fix this issue as soon as possible

Msal Logs

n/a

MSAL Configuration

auth: {
        clientId: "clientId",
        authority: "https://login.windows-ppe.net/common",
        redirectUri: "",
        postLogoutRedirectUri: "/"
    }

Relevant Code Snippets

n/a

Reproduction Steps

n/a

Expected Behavior

n/a

Identity Provider

Azure AD / MSA

Browsers Affected (Select all that apply)

Chrome

Regression

@azure/msal-browser": “^2.30.0”

Source

Internal (Microsoft)

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 5
  • Comments: 21

Most upvoted comments

Hi all, yes this is a confirmed bug that we are working on fixing. Please downgrade until the next release is available.

@pascalgross @mohd7469 @kotacode

In React we did a rollback in "@azure/msal-common": "9.1.0" to "@azure/msal-common": "9.0.2" and it works like a charm. The msal-browser we use : "@azure/msal-browser": "2.32.2"

First a breaking defect in the App Insights SDK and then this…

Were all the Azure JS testers part of the layoffs this week?

For Angular I used those two versions to make it work again: "@azure/msal-angular": "^2.5.2" and "@azure/msal-browser": "^2.32.1" The bug seems to be in msal-browser version 2.32.2 if I am not mistaken

The issue was really caused by us using the non explicit versioning for msal-browser. 2.32.2 seems to be the culprit so using 2.32.1 with "@azure/msal-react": "^1.5.2".

Just remember to use explicit versioning and target version "@azure/msal-browser": "2.32.1" WITHOUT the “^” symbol in conjunction with the version number.

Most likely the cause that is making this issue emerge. The faulty MSAL version gets released, pipeline runs, faulty version gets deployed and the issue occurs.

Thanks for all the help in this thread!

"@azure/msal-browser": "2.30.0", "@azure/msal-react": "^1.5.2"

We did a rollback and app is running fine.

Can confirm that this is happening to our latest deploys as well. We’re using:

"@azure/msal-browser": "^2.32.2",
"@azure/msal-react": "^1.5.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",

And getting the following issue:

TypeError: performanceMeasurement.startMeasurement is not a function
    at PerformanceClient2.startMeasurement (PerformanceClient.ts:123:32)
    at BrowserPerformanceClient2.startMeasurement (BrowserPerformanceClient.ts:46:55)
    at RedirectClient2.<anonymous> (StandardInteractionClient.ts:205:65)
    at step (_tslib.js:87:23)
    at Object.next (_tslib.js:68:53)
    at _tslib.js:61:71
    at new Promise (<anonymous>)
    at __awaiter (_tslib.js:57:12)
    at StandardInteractionClient2.getDiscoveredAuthority (StandardInteractionClient.ts:203:115)
    at RedirectClient2.<anonymous> (StandardInteractionClient.ts:142:48)

Thing to note is the number 2 added to the names of PerformanceClient2, BrowserPerformanceClient2 etc. Any idea what can be causing that or is it intended?

Any pointers or workarounds would be much appreciated!

Thanks a lot in advance!

// G

Thank you all for your patience. Msal-common v 9.1.1 has been released. Please upgrade and let us know if you continue to see issues.