Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with msal-browser v2.32.2 on safari #5548

Closed
kbartyzel opened this issue Jan 10, 2023 · 8 comments · Fixed by #5551
Closed

Problem with msal-browser v2.32.2 on safari #5548

kbartyzel opened this issue Jan 10, 2023 · 8 comments · Fixed by #5551
Assignees
Labels
answered Question has received "first qualified response" bug-unconfirmed A reported bug that needs to be investigated and confirmed msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information.

Comments

@kbartyzel
Copy link

Core Library

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

Core Library Version

2.32.2

Wrapper Library

MSAL Angular (@azure/msal-angular)

Wrapper Library Version

"@azure/msal-react": "1.5.1"

Public or Confidential Client?

Public

Description

We have exceptions

  • Unhandled Promise Rejection: SyntaxError: Invalid regular expression: invalid group specifier name
  • SyntaxError: Invalid regular expression: invalid group specifier name
    and few others after updating to the new package. Yesterday everything was working.

Previously working version was
"@azure/msal-common" : "9.0.1",
"@azure/msal-browser": "2.32.1",
"@azure/msal-react": "1.5.1",

Error Message

No response

Msal Logs

No response

MSAL Configuration

confidential - but correct, works for months

Relevant Code Snippets

The token is valid, everything is configured correctly

Reproduction Steps

Open a page
Start to log in
After login, redirect back to the original page, we have an exception

Expected Behavior

Token is valid, everything is configured correctly

Identity Provider

Azure AD / MSA

Browsers Affected (Select all that apply)

Safari

Regression

@azure/msal-browser": "2.32.1

Source

Internal (Microsoft)

@kbartyzel kbartyzel added bug-unconfirmed A reported bug that needs to be investigated and confirmed question Customer is asking for a clarification, use case or information. labels Jan 10, 2023
@ghost ghost added the Needs: Attention 👋 Awaiting response from the MSAL.js team label Jan 10, 2023
@github-actions github-actions bot added msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package public-client Issues regarding PublicClientApplications labels Jan 10, 2023
@ghost ghost assigned hectormmg Jan 10, 2023
@kbartyzel
Copy link
Author

kbartyzel commented Jan 10, 2023

image

@SimoNDeviL
Copy link

From version
"@azure/msal-common" : "9.0.2",
problems begins on Chrome, Edge, Firefox and Safari.

@submarines-and
Copy link

Same issue for us.

Could it be this commit?
29701fa

image

As I recall, Safari does not have support for lookbehind.

Sorry if I am way off, take this with a grain of salt :)

@hectormmg
Copy link
Member

Thanks for raising the issue @kbartyzel . We'll look into it and provide updates here. For now, please downgrade to 2.32.1 if that's possible.

@ghost ghost added answered Question has received "first qualified response" Needs: Author Feedback Awaiting response from issue author and removed Needs: Attention 👋 Awaiting response from the MSAL.js team labels Jan 10, 2023
@SimonGolms
Copy link

SimonGolms commented Jan 11, 2023

Just a simple downgrade to the previous versions of @azure/msal-browser@2.32.1 and @azure/msal-react@1.5.1 will not work, because the dependency @azure/msal-common is not specified as a strict version here:

"dependencies": {
"@azure/msal-common": "^9.0.1"
}

So even with a new install, the latest (and corrupt) version of @azure/msal-common@9.0.2 will be installed, because it is compatible according to semver specification.

With npm, I fixed it with the overrides configuration in my package.json

{
  "dependencies": {
    "@azure/msal-browser": "2.32.1",
    "@azure/msal-react": "1.5.1",
  },
  "overrides": {
    "@azure/msal-common": "9.0.1"
  }
}

@Webbwhite98
Copy link

Just a simple downgrade to the previous versions of @azure/msal-browser@2.32.1 and @azure/msal-react@1.5.1 will not work, because the dependency @azure/msal-common is not specified as a strict version here:

"dependencies": {
"@azure/msal-common": "^9.0.1"
}

So even with a new install, the latest (and corrupt) version of @azure/msal-common@9.0.2 will be installed, because it is compatible according to semver specification.

With npm, I fixed it with the overrides configuration in my package.json

{
  "dependencies": {
    "@azure/msal-browser": "2.32.1",
    "@azure/msal-react": "1.5.1",
  },
  "overrides": {
    "@azure/msal-common": "9.0.1"
  }
}

This worked for me, I also had to add @azure/msal-common": "9.0.1" as a dependency

@ghost ghost removed the Needs: Author Feedback Awaiting response from issue author label Jan 11, 2023
@mkosir
Copy link

mkosir commented Jan 13, 2023

Just a simple downgrade to the previous versions of @azure/msal-browser@2.32.1 and @azure/msal-react@1.5.1 will not work, because the dependency @azure/msal-common is not specified as a strict version here:

"dependencies": {
"@azure/msal-common": "^9.0.1"
}

So even with a new install, the latest (and corrupt) version of @azure/msal-common@9.0.2 will be installed, because it is compatible according to semver specification.

Thanks for pointing this out, this is really useful info 🙇‍♂️
Initially we did a rollback of @azure/msal-browser (without overrides config) and the error still persisted.

I think the dependency @azure/msal-common should be fixed, to prevent this kind of issues in the future (as also other related dependencies). Otherwise results can be messy for devs since it depends "when" you install MSAL package.

@aso1datov
Copy link

If you are using yarn use resolutions instead.

"dependencies": {
    "@azure/msal-browser": "2.32.1",
    "@azure/msal-common": "9.0.1",
    "@azure/msal-react": "1.5.1",
}
"resolutions": {
    "@azure/msal-common": "9.0.1"
 }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered Question has received "first qualified response" bug-unconfirmed A reported bug that needs to be investigated and confirmed msal-angular Related to @azure/msal-angular package msal-browser Related to msal-browser package public-client Issues regarding PublicClientApplications question Customer is asking for a clarification, use case or information.
Projects
None yet
9 participants