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

Unable to access the web app #931

Closed
Sdelausnay opened this issue Apr 15, 2024 · 7 comments
Closed

Unable to access the web app #931

Sdelausnay opened this issue Apr 15, 2024 · 7 comments

Comments

@Sdelausnay
Copy link

Describe the bug
I have follow the ReadMe to deploy the solution to Azure. Service are all created and can deploy the webapp. When I navigate to the Chat Copilot, I get the request to login and everything seem ok for the login process. But then it got stuck on the Connecting page. Doesn't get any further, looks like he is waiting on the backend to respond.

Only thing I changed to the deployment, is deploy everything to SwedenCentral.

Only thing I cloud find in the logs is a File not found but no details why it is not there.

Could not load file or assembly 'StartupBootstrapper, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

To Reproduce
Steps to reproduce the behavior:

  1. Followed the Read Me in scripts/deploy
  2. Changed the location in deploy-azrue.ps1 to Sweden Central
  3. Run the deploy-azure.ps1 script
  4. Run package-webapi.ps1
  5. Run deploy-webapi.ps1
  6. Access the webapp and login

Expected behavior
The application moves to the chat windows after login.

Screenshots
image

Platform

  • OS: Azure
  • IDE: Deployed through VS Code
  • Language: C#

Additional context
Add any other context about the problem here.

@Sdelausnay
Copy link
Author

Found some additional logs

2024-04-15T14:24:18  PID[5332] Information 04-15 14:24:18 Error: Unexpected exception in agent main process. Details: Microsoft.ServiceProfiler.Utilities.AppIdNotFoundException: Unable to find AppId for iKey:
2024-04-15T14:24:18  PID[5332] Information    at Microsoft.ServiceProfiler.Utilities.AppInsightsProfileFetcher.<FetchProfileAsync>d__3.MoveNext()
2024-04-15T14:24:18  PID[5332] Information --- End of stack trace from previous location where exception was thrown ---
2024-04-15T14:24:18  PID[5332] Information    at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2024-04-15T14:24:18  PID[5332] Information    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2024-04-15T14:24:18  PID[5332] Information    at Microsoft.ServiceProfiler.DiagnosticsAgent.Program.GetApplicationInsightsAppId(String instrumentationKey, String appInsightsEndpoint)
2024-04-15T14:24:18  PID[5332] Information    at Microsoft.ServiceProfiler.DiagnosticsAgent.Program.Main(String[] cmdArgs)

@Sdelausnay
Copy link
Author

Sdelausnay commented Apr 16, 2024

Seems to be an authentication issue, where the Front-end want to connect to the backend using authentication but is not able to get the information. Followed all the step to create the App registrations but nothing seems to be working.

In the browser, I have following exception:

Uncaught (in promise) BrowserAuthError: uninitialized_public_client_application: You must call and await the initialize function before attempting to call any other MSAL API.  For more visit: aka.ms/msaljs/browser-errors
    at c (BrowserAuthError.ts:351:12)
    at G (BrowserUtils.ts:136:15)
    at lt.handleRedirectPromise (StandardController.ts:333:9)
    at d.handleRedirectPromise (PublicClientApplication.ts:259:32)
    at index.tsx:44:39

@Sdelausnay
Copy link
Author

Seems to be a Front-end issue. In mean time recreated the App registration and also tried to run it locally with authentication and I'm getting the same error. Adding some logs to the Frontend revelated following issue:

Received error while retrieving access token: BrowserAuthError: no_account_error: No account object provided to acquireTokenSilent and no active account has been set. Please call setActiveAccount or provide an account on the request.

@hsirtl
Copy link

hsirtl commented Apr 23, 2024

This issue seems to be related to issue #918. I had the same "Connecting..."-behavior (both while running with docker compose and with running it on Azure App Service). Changing the auth-code as described there solved it for me.

@Sdelausnay
Copy link
Author

I found the issue, seems the @azure/msal-browser version currently in the master branch is having the issue.

Still further investigating, but when I update the package, seems to be working.

@glahaye
Copy link
Collaborator

glahaye commented Jun 12, 2024

I believe this is fixed now. Can you give it another to confirm the fix works for you?

@glahaye
Copy link
Collaborator

glahaye commented Jun 13, 2024

Fixed by #969

@glahaye glahaye closed this as completed Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants