SOLVED

Teams Tab App Cannot Reach server

%3CLINGO-SUB%20id%3D%22lingo-sub-1720728%22%20slang%3D%22en-US%22%3ETeams%20Tab%20App%20Cannot%20Reach%20server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1720728%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%E2%80%99ve%20been%20trying%20to%20host%20my%20Teams%20tab%20app%20using%20Tomcat%20on%20the%20same%20PC%20where%20Teams%20is%20running%20(i.e.%20localhost)%20with%20TLS%20enabled%20but%20I%20can%E2%80%99t%20seem%20to%20get%20it%20to%20work.%20Teams%20cannot%20display%20a%20simple%20page%20with%20HTML.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20know%20Tomcat%20is%20working%26nbsp%3B%20because%20I%20can%20display%20a%20page%20using%20a%20web%20browser%20with%20%E2%80%9Chttps%E2%80%9D.%26nbsp%3B%20I%20also%20know%20Teams%20can%20display%20a%20page%20with%20%E2%80%9Chttps%E2%80%9D%20because%20I%20can%20use%20Tomcat%20without%20TLS%20enabled%20and%20then%20map%20the%20%E2%80%9Chttps%E2%80%9D%20requests%20to%20%E2%80%9Chttp%E2%80%9D%20using%20ngrok.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20Teams%20app%20is%20hosted%20on%20port%20443.%20Is%20the%20right%20port%20for%20a%20Teams%20app%3F%20I%20also%20configured%20the%20the%20manifest%20file%20with%3A%3C%2FP%3E%3CP%3E%22staticTabs%22%3A%5B%7B%20.%20.%20.%20%22contentUrl%22%3A%20%22https%3A%2F%2Flocalhost%2Fgctest%2Findex2.html%22%2C%20.%20.%20.%7D%5D%2C%3CBR%20%2F%3E%22validDomains%22%3A%20%5B%22localhost%22%5D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20also%20tried%20replacing%20%22localhost%22%20and%20something%20else%20that%20was%20mapped%20to%20127.0.0.1%20in%20my%20Windows%20hosts%20file%20but%20that%20did%20not%20work%20either.%20Is%20there%20something%20I%20need%20to%20configure%20in%20the%20manifest.json%20file%20and%2For%20Azure%20AD%20to%20get%20this%20to%20work%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20used%20the%20Wireshark%20application%20to%20capture%20the%20packets.%20I'm%20seeing%20the%20%22Encrypted%20Alert%22%20message%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22George71_0-1601305040044.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F222587iF3F5BE711CB16CF5%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22George71_0-1601305040044.png%22%20alt%3D%22George71_0-1601305040044.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EDoes%20this%20indicate%20a%20problem%20with%20my%20Teams%20app%20configuration%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks!%3C%2FP%3E%3CP%3EGeorge%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1720728%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1722981%22%20slang%3D%22en-US%22%3ERe%3A%20Teams%20Tab%20App%20Cannot%20Reach%20server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1722981%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F44624%22%20target%3D%22_blank%22%3E%40George%3C%2FA%3E%2C%20Teams%20doesn't%20allow%20local%20hosting.%20You'll%20need%20to%20either%20publish%20your%20tab%20to%20a%20public%20URL%2C%20or%20use%20a%20proxy%20that%20will%20expose%20your%20local%20port%20to%20an%20internet-facing%20URL.%20Please%20use%20ngrok%20and%20try%20the%20same%20.%3C%2FP%3E%0A%3CP%3EThe%20content%20url%20would%20be%20like%20this%20contentUrl%22%3A%20%22ngrokurl%2Findex2.html%22.%3C%2FP%3E%0A%3CP%3EPlease%20refer%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Ftabs%2Fquickstarts%2Fcreate-personal-tab-dotnet-core-mvc%23establish-a-secure-tunnel-to-your-tab%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Edoc%3C%2FA%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1724514%22%20slang%3D%22en-US%22%3ERe%3A%20Teams%20Tab%20App%20Cannot%20Reach%20server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1724514%22%20slang%3D%22en-US%22%3EThanks!%20That%20would%20explain%20why%20I%20could%20not%20get%20it%20to%20work.%20%3A)%3C%2Fimg%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hi,

 

I’ve been trying to host my Teams tab app using Tomcat on the same PC where Teams is running (i.e. localhost) with TLS enabled but I can’t seem to get it to work. Teams cannot display a simple page with HTML.

 

I know Tomcat is working  because I can display a page using a web browser with “https”.  I also know Teams can display a page with “https” because I can use Tomcat without TLS enabled and then map the “https” requests to “http” using ngrok.

 

My Teams app is hosted on port 443. Is the right port for a Teams app? I also configured the the manifest file with:

"staticTabs":[{ . . . "contentUrl": "https://localhost/gctest/index2.html", . . .}],
"validDomains": ["localhost"]

 

I also tried replacing "localhost" and something else that was mapped to 127.0.0.1 in my Windows hosts file but that did not work either. Is there something I need to configure in the manifest.json file and/or Azure AD to get this to work?

 

I used the Wireshark application to capture the packets. I'm seeing the "Encrypted Alert" message:

 

George71_0-1601305040044.png

Does this indicate a problem with my Teams app configuration?

 

 

Thanks!

George

 

 

2 Replies
Highlighted
Best Response confirmed by George71 (Occasional Contributor)
Solution

@George, Teams doesn't allow local hosting. You'll need to either publish your tab to a public URL, or use a proxy that will expose your local port to an internet-facing URL. Please use ngrok and try the same .

The content url would be like this contentUrl": "ngrokurl/index2.html".

Please refer the doc.

Highlighted
Thanks! That would explain why I could not get it to work. :)