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

Teams web client stuck loading #12455

Open
stokedout opened this issue Sep 25, 2024 · 5 comments
Open

Teams web client stuck loading #12455

stokedout opened this issue Sep 25, 2024 · 5 comments
Assignees
Labels
investigating needs attention This issue needs the attention of a contributor. TA:Auth Team Area: Auth

Comments

@stokedout
Copy link

Describe the bug

Team web client takes forever to load when debugging. Initially it loads quick but the following debug runs using Debug (Chrome) are mega slow. I can see in chrome inspector and VSC debug console that there's a lot of ECONNREFUSED errors for source maps:

WARNING: Processing source-maps of https://statics.teams.cdn.office.net/teams-modular-packages/hashed-assets/679609-ecbc6fe25bffc9a4.js took longer than 991.402915000001 ms so we continued execution without waiting for all the breakpoints for the script to be set.Could not read source map for https://statics.teams.cdn.office.net/teams-modular-packages/hashed-assets/796055-7b0faa9faab76285.js: Unexpected 503 response from https://local.teams.office.com/sourcemaps/hashed-assets/796055-7b0faa9faab76285.js.map: connect ECONNREFUSED 0.0.0.0:443

WARNING: Processing source-maps of https://statics.teams.cdn.office.net/teams-modular-packages/hashed-assets/475896-ee143e39ffcce7f0.js took longer than 991.402915000001 ms so we continued execution without waiting for all the breakpoints for the script to be set.Could not read source map for https://statics.teams.cdn.office.net/teams-modular-packages/hashed-assets/431784-b41e454331fbad6d.js: Unexpected 503 response from https://local.teams.office.com/sourcemaps/hashed-assets/431784-b41e454331fbad6d.js.map: connect ECONNREFUSED 0.0.0.0:443

Has this something to do with the dev-tunnel and what is https://local.teams.office.com/ as even hitting that URL directly yields an SSL issue? I can see a few others have reported this before but I cannot see a resolution

To Reproduce
Steps to reproduce the behavior:

Expected behavior
https://teams.microsoft.com/v2/?clientexperience=t2 loads in a reasonable time

VS Code Extension Information (please complete the following information):

  • OS: macOS
  • Version Sonoma 14.4.1 (23E224) - macbook pro M2

CLI Information (please complete the following information):

  • OS: VS Code extension
  • Version v5.8.1

Additional context
I tried combinations of deleting azure resources and stopping the proxy in vs code before rerunning, none of which made a difference.

Copy link
Contributor

Thank you for contacting us! Any issue or feedback from you is quite important to us. We will do our best to fully respond to your issue as soon as possible. Sometimes additional investigations may be needed, we will usually get back to you within 2 days by adding comments to this issue. Please stay tuned.

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs attention This issue needs the attention of a contributor. label Sep 25, 2024
@adashen adashen added investigating TA:Auth Team Area: Auth labels Sep 26, 2024
@frankqianms
Copy link
Contributor

Hi @stokedout ,

Thank you for reaching out to us. We have received your issue and will thoroughly check it. Our team is working on it, and we will get back to you with a solution as quickly as possible.

We appreciate your patience and understanding.

@stokedout
Copy link
Author

Unfortunately it's creating an almost unusable experience having to wait so long for the web client to load. Is there some way that I can run teams without it requiring all of those source maps? It appears like each source map request failure somehow adds latency to the initial load of the web client. Is there an alternative URL to https://teams.microsoft.com/l/app/${{local:TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint} that can be replaced in the launch.json?

@stokedout
Copy link
Author

stokedout commented Sep 28, 2024

Are you sure that the host local.teams.office.com is accessible outside of Microsoft? I was able to workaround the issue by running a self-signed local web server and a host entry for it. After which is loads instantly

#!/bin/bash

# Exit on any error
set -e

echo "Setting up local HTTPS server for local.teams.office.com"

# Create directory for SSL certificate
mkdir -p ~/ssl_cert
cd ~/ssl_cert

# Generate self-signed certificate
echo "Generating self-signed certificate..."
openssl genrsa -out server.key 2048
openssl req -new -key server.key -out server.csr -subj "/C=US/ST=State/L=City/O=Organization/CN=local.teams.office.com"
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

# Create Python HTTPS server script
echo "Creating Python HTTPS server script..."
cat << EOF > ~/https_server.py
import http.server
import ssl
import os

class Handler(http.server.SimpleHTTPRequestHandler):
    def do_GET(self):
        self.send_response(200)
        self.send_header('Content-type', 'text/html')
        self.end_headers()
        self.wfile.write(b'Hello from local.teams.office.com!')

cert_dir = os.path.expanduser('~/ssl_cert')
httpd = http.server.HTTPServer(('localhost', 443), Handler)

context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
context.load_cert_chain(
    certfile=os.path.join(cert_dir, 'server.crt'),
    keyfile=os.path.join(cert_dir, 'server.key')
)

httpd.socket = context.wrap_socket(httpd.socket, server_side=True)
print('Server running on https://localhost:443')
httpd.serve_forever()
EOF

# Update hosts file
echo "Updating /etc/hosts file..."
sudo bash -c 'echo "127.0.0.1    local.teams.office.com" >> /etc/hosts'

# Flush DNS cache
echo "Flushing DNS cache..."
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder

echo "Setup complete. To start the server, run:"
echo "sudo python3 ~/https_server.py"

echo "To clean up after testing, remove the added line from /etc/hosts"

@frankqianms
Copy link
Contributor

@stokedout - Thank you very much for sharing details and your thoughts. We will check the URL and source map requests.
I'd like to note that we will in Chinese National Day vacation from 10.1 to 10.7, so please expect some delays for response.

Cc. @lijie-lee @adashen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating needs attention This issue needs the attention of a contributor. TA:Auth Team Area: Auth
Projects
None yet
Development

No branches or pull requests

4 participants