OfficeDev / microsoft-teams-emergency-operations-center

The Microsoft Teams Emergency Operations Center (TEOC) solution template leverages the power of the Microsoft 365 platform to centralize incident response, information sharing and field communications using powerful services like Microsoft Lists, SharePoint and more.
MIT License
89 stars 35 forks source link

Bad Requests when opening App in Teams #225

Closed clarkec2 closed 1 month ago

clarkec2 commented 1 month ago

Hello,

When attempting to open the app after deploy I am met with large amounts of white space. When inspecting the traffic I see 3 bad requests being sent to SharePoint and Graph which I believe is what is causing the blank space.

image

HTTP/1.1 400 Bad Request Content-Length: 3490 Content-Type: text/html; charset=utf-8 Date: Mon, 15 Jul 2024 21:58:23 GMT Server: Microsoft-IIS/10.0 Cache-Control: private X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET

<!DOCTYPE html>

Runtime Error

Server Error in '/' Application.

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".


<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.


<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>

For the Graph requests...

HTTP/1.1 400 Bad Request Transfer-Encoding: chunked Content-Type: application/json Content-Encoding: gzip Vary: Accept-Encoding Strict-Transport-Security: max-age=31536000 request-id: 5c565874-52ec-49cc-9720-673c9d38b396 client-request-id: b46382f9-1626-9969-af8d-88e7d7e49715 x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"North Central US","Slice":"E","Ring":"4","ScaleUnit":"000","RoleInstance":"CH01EPF00007336"}} Access-Control-Allow-Origin: * Access-Control-Expose-Headers: ETag, Location, Preference-Applied, Content-Range, request-id, client-request-id, ReadWriteConsistencyToken, Retry-After, SdkVersion, WWW-Authenticate, x-ms-client-gcc-tenant Date: Mon, 15 Jul 2024 21:58:24 GMT

and

HTTP/1.1 400 Bad Request Transfer-Encoding: chunked Content-Type: application/json Content-Encoding: gzip Vary: Accept-Encoding Strict-Transport-Security: max-age=31536000 request-id: 7f3ab65f-a96f-4f52-9a9d-71b1a30caab5 client-request-id: 7098cef7-48f8-66fc-e9f6-6ae24a0454d4 x-ms-ags-diagnostic: {"ServerInfo":{"DataCenter":"North Central US","Slice":"E","Ring":"4","ScaleUnit":"000","RoleInstance":"CH01EPF00007336"}} Access-Control-Allow-Origin: * Access-Control-Expose-Headers: ETag, Location, Preference-Applied, Content-Range, request-id, client-request-id, ReadWriteConsistencyToken, Retry-After, SdkVersion, WWW-Authenticate, x-ms-client-gcc-tenant Date: Mon, 15 Jul 2024 21:58:24 GMT

v-ajaysahu commented 1 month ago

@clarkec2 , thanks for reporting this issue. Please launch Teams in your browser, then access the developer tools and open the TEOC app. Share the console logs and network traces to assist in troubleshooting the issue. Additionally, please provide us with the manifest files.

clarkec2 commented 1 month ago

We were able to fix it, it was an issue with the SP site used. Now when attempting to test the app I am unable to use the location field, no matter what is inputted the field automatically clears itself. The button in the box also doesnt work and it will not pop up any thing so I cannot create an incident for testing. We do not have a bing maps key nor do we have an azure maps subscription, is there a way to make the Location field not required, or at least have the ability to type in a custom value?

v-ajaysahu commented 1 month ago

@clarkec2 , The Location Field does not rely on a Bing Maps or Azure Maps subscription. It seems you may have forgotten to add permissions to access the Calendar. The link provided below should help resolve this issue. After granting the necessary permissions, please check if the location picker field in the app is functioning correctly.

https://github.com/OfficeDev/microsoft-teams-emergency-operations-center/wiki/Deployment-Guide#6-add-permissions-for-office-365-exchange-online

clarkec2 commented 1 month ago

That did appear to be the case, we consented to the missing permission, and re uploaded the app, however the Location input is still broken. Same behavior as before, auto clears anything inputted and the map button is not working.

v-ajaysahu commented 1 month ago

@clarkec2 , Please clear your cache and attempt the process again. If the issue continues, open Teams in your browser, then open developer tools. Next, launch the TEOC app and attempt to replicate the problem. Kindly share the console and network logs from the developer tool.

microsoft-github-policy-service[bot] commented 1 month ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.