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

TypeError: Cannot read property 'extraQueryParameters' of null #1237

Closed
1 task done
davallen opened this issue Jan 23, 2020 · 5 comments
Closed
1 task done

TypeError: Cannot read property 'extraQueryParameters' of null #1237

davallen opened this issue Jan 23, 2020 · 5 comments
Labels
bug A problem that needs to be fixed for the feature to function as intended. follow-up Reminder to follow up with the issue creator more-information-needed Use this label when you are waiting on information from the issue creator

Comments

@davallen
Copy link

Please follow the issue template below. Failure to do so will result in a delay in answering your question.

Library

  • msal@1.2.0

Framework

React v16.8.4

Description

We are calling acquireTokenSilent with only scopes in AuthenticationParameters and receiving the "TypeError: Cannot read property 'extraQueryParameters' of null" error.

@davallen davallen added the bug A problem that needs to be fixed for the feature to function as intended. label Jan 23, 2020
@davallen
Copy link
Author

More information on what we are passing into the AuthenticationParameters. We are stumped on how the AuthenticationParameters object is null when we are passing the Authenticationparameters object in the acquireSilentToken call.

If we have the userName we provide it in the AuthenticationParameters object and it is successful.

tokenRequest = {
scopes: scopes,
loginHint: userName
};

let token = await userAgentApplication.acquireTokenSilent(tokenRequest);

But if we dont have the userName we provide the following and it appears to be failing quite often.

tokenRequest = {
scopes: scopes,
redirectUri: window.location.origin + '/msalCallback.html'
};
let token = await userAgentApplication.acquireTokenSilent(tokenRequest).catch(async error => {

@sameerag
Copy link
Member

@davallen what happens if you just pass scopes? I am curious if there is an overwrite somewhere, we check this the first thing in our request APIs and did not encounter this before.

Can you also try with chrome dev tools to check what is the value passed to the msal in the debug window? I suspect a local runtime issue.

One other option is to share us a sample app with steps of repro, if your debug isn't helping you.

@sameerag sameerag added follow-up Reminder to follow up with the issue creator more-information-needed Use this label when you are waiting on information from the issue creator labels Jan 30, 2020
@tnorling
Copy link
Collaborator

Closing due to inactivity. Please let us know if this is still an issue

Porges added a commit to Porges/microsoft-authentication-library-for-js that referenced this issue Apr 22, 2020
This addresses AzureAD#1411, AzureAD#1237, and AzureAD#1254. I don’t know why some of these type errors are passing compilation as they should be breaking it?

Untested, edited code in browser window.
@NortonIce
Copy link

Closing due to inactivity. Please let us know if this is still an issue

I have similar problem(

@jasonnutter
Copy link
Contributor

@NortonIce We have another issue already open for this bug: #1411

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug A problem that needs to be fixed for the feature to function as intended. follow-up Reminder to follow up with the issue creator more-information-needed Use this label when you are waiting on information from the issue creator
Projects
None yet
Development

No branches or pull requests

5 participants