{"action":"created","issue":{"url":"https://api.github.com/repos/AzureAD/microsoft-authentication-library-for-js/issues/288","repository_url":"https://api.github.com/repos/AzureAD/microsoft-authentication-library-for-js","labels_url":"https://api.github.com/repos/AzureAD/microsoft-authentication-library-for-js/issues/288/labels{/name}","comments_url":"https://api.github.com/repos/AzureAD/microsoft-authentication-library-for-js/issues/288/comments","events_url":"https://api.github.com/repos/AzureAD/microsoft-authentication-library-for-js/issues/288/events","html_url":"https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/288","id":319486440,"number":288,"title":"Msal fails to get access token with \"Token renewal operation failed due timeout: Token Renewal Failed.\"","user":{"login":"bpcastilho","id":32835162,"avatar_url":"https://avatars1.githubusercontent.com/u/32835162?v=4","gravatar_id":"","url":"https://api.github.com/users/bpcastilho","html_url":"https://github.com/bpcastilho","followers_url":"https://api.github.com/users/bpcastilho/followers","following_url":"https://api.github.com/users/bpcastilho/following{/other_user}","gists_url":"https://api.github.com/users/bpcastilho/gists{/gist_id}","starred_url":"https://api.github.com/users/bpcastilho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpcastilho/subscriptions","organizations_url":"https://api.github.com/users/bpcastilho/orgs","repos_url":"https://api.github.com/users/bpcastilho/repos","events_url":"https://api.github.com/users/bpcastilho/events{/privacy}","received_events_url":"https://api.github.com/users/bpcastilho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-05-02T09:52:55Z","updated_at":"2018-05-16T08:57:19Z","closed_at":null,"author_association":"NONE","body":"When issuing a new token to do a call to an custom API sometimes we get the error: \"Token renewal operation failed due timeout: Token Renewal Failed.\"\r\n\r\n\r\nMsal verbose logs:\r\nI S-Verbose renewing accesstoken \r\nI S-Verbose renewToken is called for \r\nI S-lnfo Add msal frame to document:msaIRenewFramehttps://tenant.onmicrosoft.com/dev/read \r\n-Verbose Renew token Ex#cted state: ...\r\n-Verbose Set loading state to pending for: https://tenant.onmicrosoft.com/dev/read \r\nI S-lnfo LoadFrane: msaIRenewFramehttps://tenant.onmicrosoft.com/customAPI/read \r\nI S-lnfo Add msal frame to docunent:msaIRenewFramehttps://tenant.onmicrosoft.com/dev/read \r\nI S-Verbose Loading frame has timed out after: 6 seconds for scope https_L&tenant.onmicrosoft.com/dev/read \r\n\r\nThis is being returned by:\r\n`private loadIframeTimeout(urlNavigate: string, frameName: string, scope: string): void { `\r\n\r\n([https://github.com/AzureAD/microsoft-authentication-library-for-js/blob/cf14220e2ec440e2402d026a80ca699b947ce1a0/src/UserAgentApplication.ts])\r\n\r\n\r\n\r\nQuestions:\r\n1. We want to know why we're get this timeout.\r\n2. Foreach time we're calling \"acquireTokenSilent\" we're getting a new token isn't MSAL caching the tokens?"},"comment":{"url":"https://api.github.com/repos/AzureAD/microsoft-authentication-library-for-js/issues/comments/389446725","html_url":"https://github.com/AzureAD/microsoft-authentication-library-for-js/issues/288#issuecomment-389446725","issue_url":"https://api.github.com/repos/AzureAD/microsoft-authentication-library-for-js/issues/288","id":389446725,"user":{"login":"ChrisHaag","id":10416517,"avatar_url":"https://avatars3.githubusercontent.com/u/10416517?v=4","gravatar_id":"","url":"https://api.github.com/users/ChrisHaag","html_url":"https://github.com/ChrisHaag","followers_url":"https://api.github.com/users/ChrisHaag/followers","following_url":"https://api.github.com/users/ChrisHaag/following{/other_user}","gists_url":"https://api.github.com/users/ChrisHaag/gists{/gist_id}","starred_url":"https://api.github.com/users/ChrisHaag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChrisHaag/subscriptions","organizations_url":"https://api.github.com/users/ChrisHaag/orgs","repos_url":"https://api.github.com/users/ChrisHaag/repos","events_url":"https://api.github.com/users/ChrisHaag/events{/privacy}","received_events_url":"https://api.github.com/users/ChrisHaag/received_events","type":"User","site_admin":false},"created_at":"2018-05-16T08:57:19Z","updated_at":"2018-05-16T08:57:19Z","author_association":"NONE","body":"I am having the same issue.\r\nI have an angular 1.6 sample app attached with a readme on how to install and setup everything needed to run the app. The app allows to login with a local account as well as a facebook account. Further we acquire tokens for 2 different APIs. We use the latest msal.js version from npm which is 0.1.5.\r\n\r\nWe are using Azure AD B2C with Identity Framework Experience (Preview). The setup process of the policies is also described in the readme.\r\nWe set the access_token lifetime to 5 minutes which results in getting a new access_token for every call of AcquireTokenSilent(...). We use this setting in our sample to provoke the error.\r\n\r\nSteps to reproduce the error (as described in readme):\r\n1. Open developer tools to see console output.\r\n2. Login with a local account (not facebook). You will get an id token.\r\n3. Call Acquire Token silently either for API1 or API2 or for both in parallel.\r\n4. Check console output.\r\n5. Repeat steps 3) and 4) until there is a message in console output like: Loading frame has timed out after: 60 seconds for scope [https://...]\r\n\r\nThe error seems to occur randomly without any indication for about 1% - 5% of all request to acquire a token. As you can see, we set the 'loadFrameTimeout' parameter to 60 seconds. However this does not resolve the error.\r\n\r\n[AngularApp.zip](https://github.com/AzureAD/microsoft-authentication-library-for-js/files/2008258/AngularApp.zip)"}}
{"actor":{"display_login":"ChrisHaag"}}