Localhost refused to connect in the hello world demo

%3CLINGO-SUB%20id%3D%22lingo-sub-1938253%22%20slang%3D%22en-US%22%3ECannot%20sideload%20the%20hello%20world%20app%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1938253%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20working%20on%20a%20school%20project%20which%20is%20developing%20a%20Microsoft%20Teams%20web%20app.%20I%20followed%20the%20instructions%20given%20in%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fplatform%2Fbuild-your-first-app%2Fbuild-and-run%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EMicrosoft%20doc%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eto%20create%20a%20hello%20world%20demo.%20But%20when%20I%20run%20the%20project%20in%20VS%20code%20I%20met%20these%20error%20messages%3A%3C%2FP%3E%3CPRE%3ECould%20not%20read%20source%20map%20%3CSPAN%20class%3D%22hljs-keyword%22%3Efor%3C%2FSPAN%3E%20https%3A%3CSPAN%20class%3D%22hljs-comment%22%3E%2F%2Fteams.microsoft.com%2Fserviceworker.js%3A%20Unexpected%20404%20response%20from%20https%3A%2F%2Fteams.microsoft.com%2Fservice-worker.js.map%3A%20%3C%2FSPAN%3E%0ASettingsService%3A%20Refreshing%20settings.%20(%3CSPAN%20class%3D%22hljs-number%22%3E1%3C%2FSPAN%3E)%20%5B%3CSPAN%20class%3D%22hljs-built_in%22%3EArray%3C%2FSPAN%3E(%3CSPAN%20class%3D%22hljs-number%22%3E1%3C%2FSPAN%3E)%5D%0Astatics.teams.cdn.office.net%2Fhashedjs%2F%3CSPAN%20class%3D%22hljs-number%22%3E3.2%3C%2FSPAN%3E-app.min-cf0f1e3.js%3A%3CSPAN%20class%3D%22hljs-number%22%3E1%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-attr%22%3ESettingsService%3C%2FSPAN%3E%3A%20Refreshing%20settings.%20(%3CSPAN%20class%3D%22hljs-number%22%3E1%3C%2FSPAN%3E)%20%5B%3CSPAN%20class%3D%22hljs-built_in%22%3EArray%3C%2FSPAN%3E(%3CSPAN%20class%3D%22hljs-number%22%3E1%3C%2FSPAN%3E)%5D%0Astatics.teams.cdn.office.net%2Fhashedjs%2F%3CSPAN%20class%3D%22hljs-number%22%3E3.2%3C%2FSPAN%3E-app.min-cf0f1e3.js%3A%3CSPAN%20class%3D%22hljs-number%22%3E1%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-number%22%3E2020%3C%2FSPAN%3E-%3CSPAN%20class%3D%22hljs-number%22%3E11%3C%2FSPAN%3E-%3CSPAN%20class%3D%22hljs-number%22%3E28%3C%2FSPAN%3ET15%3A%3CSPAN%20class%3D%22hljs-number%22%3E25%3C%2FSPAN%3E%3A%3CSPAN%20class%3D%22hljs-number%22%3E39.764%3C%2FSPAN%3EZ%20AppCache%3A%20App%20Cache%20is%20not%20defined%20on%20the%20desktop%20app%0Astatics.teams.cdn.office.net%2Fhashedjs%2F%3CSPAN%20class%3D%22hljs-number%22%3E0%3C%2FSPAN%3E-angular-jquery.min-eee9041.js%3A%3CSPAN%20class%3D%22hljs-number%22%3E114%3C%2FSPAN%3E%0A%3CSPAN%20class%3D%22hljs-number%22%3E2020%3C%2FSPAN%3E-%3CSPAN%20class%3D%22hljs-number%22%3E11%3C%2FSPAN%3E-%3CSPAN%20class%3D%22hljs-number%22%3E28%3C%2FSPAN%3ET15%3A%3CSPAN%20class%3D%22hljs-number%22%3E25%3C%2FSPAN%3E%3A%3CSPAN%20class%3D%22hljs-number%22%3E39.810%3C%2FSPAN%3EZ%20transportDependencyProviderService%3A%20transport%20can%3CSPAN%20class%3D%22hljs-string%22%3E't%20be%20initialized%2C%20settingsService%20is%20enabled%20-%20true%2C%0A%20%20%20%20%20%20%20%20%20%20desktop%20is%20pluginless%20-%20false%2C%0A%20%20%20%20%20%20%20%20%20%20destop%20is%20Hwa%20-%20true%2C%0A%20%20%20%20%20%20%20%20%20%20is%20desktop%20client%20-%20false%2C%0A%20%20%20%20%20%20%20%20%20%20slimcore%20enabled%20-%20false%0A%0A%0AError%3A%20Failed%20to%20resolve%3A%20the%20task%20is%20already%20resolved%0A%20%20%20%20at%20o._checkState%20(https%3A%2F%2Fstatics.teams.cdn.office.net%2Fhashedjs%2F3.1-app.min-5d09005.js%3A1%3A5680141)%0A%20%20%20%20at%20o.resolve%20(https%3A%2F%2Fstatics.teams.cdn.office.net%2Fhashedjs%2F3.1-app.min-5d09005.js%3A1%3A5678949)%0A%20%20%20%20at%20Object.successFunc%20(https%3A%2F%2Fstatics.teams.cdn.office.net%2Fhashedjs%2F3.1-app.min-5d09005.js%3A1%3A5895803)%0A%20%20%20%20at%20https%3A%2F%2Fstatics.teams.cdn.office.net%2Fhashedjs%2F3.1-app.min-5d09005.js%3A1%3A5681654%0A%20%20%20%20at%20a%20(https%3A%2F%2Fstatics.teams.cdn.office.net%2Fhashedjs%2F3.1-app.min-5d09005.js%3A1%3A5675968)%0A%20%20%20%20at%20o._resolveCallback%20(https%3A%2F%2Fstatics.teams.cdn.office.net%2Fhashedjs%2F3.1-app.min-5d09005.js%3A1%3A5681633)%0A%20%20%20%20at%20https%3A%2F%2Fstatics.teams.cdn.office.net%2Fhashedjs%2F3.1-app.min-5d09005.js%3A1%3A5681525%0A%20%20%20%20at%20Array.forEach%20(%3CANONYMOUS%3E)%0A%20%20%20%20at%20o._resolveSuccesses%20(https%3A%2F%2Fstatics.teams.cdn.office.net%2Fhashedjs%2F3.1-app.min-5d09005.js%3A1%3A5681443)%0A%20%20%20%20at%20o._addCallbackSet%20(https%3A%2F%2Fstatics.teams.cdn.office.net%2Fhashedjs%2F3.1-app.min-5d09005.js%3A1%3A5677955)%20Unhandled%20error%20caught%20in%20promise%20chain%3C%2FANONYMOUS%3E%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%3EI%20also%20put%20the%20screenshots%20of%20the%20errors%20here%20as%20it%20might%20be%20easier%20to%20read%20with%20all%20the%20informations%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202020-11-29%20at%2015.11.27.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F236474iEBBB89D24A121B5A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202020-11-29%20at%2015.11.27.png%22%20alt%3D%22Screenshot%202020-11-29%20at%2015.11.27.png%22%20%2F%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%202020-11-29%20at%2015.11.35.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F236475iF4E2DA27A30AD82C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%202020-11-29%20at%2015.11.35.png%22%20alt%3D%22Screenshot%202020-11-29%20at%2015.11.35.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20been%20able%20to%20add%20it%20into%20teams%2C%20but%20it%20displays%20%22%3CSPAN%3EThe%20web%20page%20at%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3Ehttps%3A%2F%2Flocalhost%3A3000%2Ftab%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3Bmight%20be%20temporarily%20down%20or%20it%20may%20have%20moved%20permanently%20to%20a%20new%20web%20address.%22%20under%20the%20%22Personal%20Tab%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20sure%20that%20the%20%60nvm%20install%60%20and%20%60nvm%20start%60%20has%20run%20successfully.%3C%2FP%3E%3CP%3EThis%20is%20the%20message%20from%20%60nvm%20start%60%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3ECompiled%20successfully!%0A%0AYou%20can%20now%20view%20microsoft-teams-ext%20in%20the%20browser.%0A%0A%20%20Local%3A%20%20%20%20%20%20%20%20%20%20%20%20https%3A%2F%2Flocalhost%3A3000%0A%20%20On%20Your%20Network%3A%20%20https%3A%2F%2F192.168.2.203%3A3000%0A%0ANote%20that%20the%20development%20build%20is%20not%20optimized.%0ATo%20create%20a%20production%20build%2C%20use%20npm%20run%20build.%0A%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20whole%20project%20is%20generated%20by%20VS%20Code%20Microsoft%20Teams%20toolkit.%20Can%20some%20one%20tell%20me%20how%20should%20debug%20this%20problem%3F%20Thanks!!!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1938253%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-1948038%22%20slang%3D%22en-US%22%3ERe%3A%20Localhost%20refused%20to%20connect%20in%20the%20hello%20world%20demo%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1948038%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F884547%22%20target%3D%22_blank%22%3E%40chaozy%3C%2FA%3E%26nbsp%3B%2C%20Are%20you%20behind%20any%20firewall%2C%20since%20bot%20framework%20requires%20a%20un-restricted%20access%20to%20internet%2C%20please%20contact%20your%20IT-admin%20for%20unblocking%20the%20endpoint%20and%20allowing%20bot%20framework%20emulator.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1958448%22%20slang%3D%22en-US%22%3ERe%3A%20Localhost%20refused%20to%20connect%20in%20the%20hello%20world%20demo%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1958448%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F888061%22%20target%3D%22_blank%22%3E%40Mallipriya_MSFT%3C%2FA%3E%26nbsp%3BSorry%20to%20reply%20so%20late.%20Yes%20I%20have%20enabled%20that%20option%20when%20I%20saw%20something%20like%20%22require%20permission%20to%20add%20the%20app%22%2C%20and%20I%20have%20been%20able%20to%20add%20it%20into%20my%20Teams.%20The%20case%20now%20is%20that%20it%20says%20%22localhost%20refused%20to%20to%20connect%22%20under%20the%20tab%20named%20%22Personal%20tab%22.%20From%20the%20tutorial%20I%20should%20expect%20a%20welcome%20page%20from%20there.%20Also%20the%20chatbot%20does%20not%20reply%20anything.%20I%20will%20keep%20trying%20to%20explore%20it.%3CBR%20%2F%3EThanks%20to%20your%20reply!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1958466%22%20slang%3D%22en-US%22%3ERe%3A%20Localhost%20refused%20to%20connect%20in%20the%20hello%20world%20demo%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1958466%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F780778%22%20target%3D%22_blank%22%3E%40Manish-MSFT%3C%2FA%3E%26nbsp%3BSorry%20to%20reply%20so%20late.%20I%20have%20checked%20my%20firewall%20settings%20and%20the%20Bot%20framework%20emulator%20has%20been%20set%20to%20%22allow%20incoming%20connections%22.%20It%20is%20my%20personal%20computer%20with%20home%20network%2C%20and%20the%20account%20I%20used%20to%20sideload%20the%20app%20is%20my%20personal%20Microsoft%20365%20developer%20account%2C%20so%20I%20think%20I%20have%20the%20access%20to%20my%20unblock%20anything.%20Could%20you%20please%20give%20me%20some%20suggestions%20about%20what%20else%20should%20be%20enabled%3F%20I%20can%20immediately%20check%20that.%3CBR%20%2F%3EThanks%20to%20your%20reply!!%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

 

 

I am working on a school project which is developing a Microsoft Teams web app. I followed the instructions given in the Microsoft doc to create a hello world demo. But when I run the project in VS code I met these error messages:

2020-11-28T15:25:39.764Z AppCache: App Cache is not defined on the desktop app
statics.teams.cdn.office.net/hashedjs/0-angular-jquery.min-eee9041.js:114
2020-11-28T15:25:39.810Z transportDependencyProviderService: transport can't be initialized, settingsService is enabled - true,
          desktop is pluginless - false,
          destop is Hwa - true,
          is desktop client - false,
          slimcore enabled - false


Error: Failed to resolve: the task is already resolved
    at o._checkState (https://statics.teams.cdn.office.net/hashedjs/3.1-app.min-5d09005.js:1:5680141)
    at o.resolve (https://statics.teams.cdn.office.net/hashedjs/3.1-app.min-5d09005.js:1:5678949)
    at Object.successFunc (https://statics.teams.cdn.office.net/hashedjs/3.1-app.min-5d09005.js:1:5895803)
    at https://statics.teams.cdn.office.net/hashedjs/3.1-app.min-5d09005.js:1:5681654
    at a (https://statics.teams.cdn.office.net/hashedjs/3.1-app.min-5d09005.js:1:5675968)
    at o._resolveCallback (https://statics.teams.cdn.office.net/hashedjs/3.1-app.min-5d09005.js:1:5681633)
    at https://statics.teams.cdn.office.net/hashedjs/3.1-app.min-5d09005.js:1:5681525
    at Array.forEach (<anonymous>)
    at o._resolveSuccesses (https://statics.teams.cdn.office.net/hashedjs/3.1-app.min-5d09005.js:1:5681443)
    at o._addCallbackSet (https://statics.teams.cdn.office.net/hashedjs/3.1-app.min-5d09005.js:1:5677955) Unhandled error caught in promise chain

I also put the screenshots of the errors here as it might be easier to read with all the informations:

Screenshot 2020-11-29 at 15.11.27.pngScreenshot 2020-11-29 at 15.11.35.png

 

I have been able to add it into teams, but it displays "localhost refused to connect" under the "Personal Tab"; and no response returned from the chatbot.

The `localhost:3978` displays Cannot GET /. 

 

I am sure that the `nvm install` and `nvm start` has run successfully.

 

 

 

The whole project is generated by VS Code Microsoft Teams toolkit. Is is the problem of my network? Do I need to modify any settings for this project? Can some one tell me how should debug this problem? Thanks!!!

7 Replies

@chaozy , Are you behind any firewall, since bot framework requires a un-restricted access to internet, please contact your IT-admin for unblocking the endpoint and allowing bot framework emulator.

@chaozy, Could you please confirm sideloading for custom apps is enabled in teams admin center?

@Mallipriya_MSFT Sorry to reply so late. Yes I have enabled that option when I saw something like "require permission to add the app", and I have been able to add it into my Teams. The case now is that it says "localhost refused to to connect" under the tab named "Personal tab". From the tutorial I should expect a welcome page from there. Also the chatbot does not reply anything. I will keep trying to explore it.
Thanks to your reply!

@Manish-MSFT Sorry to reply so late. I have checked my firewall settings and the Bot framework emulator has been set to "allow incoming connections". It is my personal computer with home network, and the account I used to sideload the app is my personal Microsoft 365 developer account, so I think I have the access to my unblock anything. Could you please give me some suggestions about what else should be enabled? I can immediately check that.
Thanks to your reply!!

@chaozy , Could you please mail me at v-manisc@microsoft.com to get on call and solve this issue. Thanks.

@chaozy , Could you please add details as to what we discussed during call and conclude the same to close this ticket. Thanks.

@Manish-MSFT  Sure. Sorry for the delay. I have just finished the school lectures. We found that it is actually the problem of ngrok. When I start ngrok tunnelling service, the page from the address given by ngrok displays 

ngrok gateway error
QW
The server returned an invalid or incomplete HTTP response.

We tried different ways and commands but all of them failed.

We agree that I have to solve this issue in order to deploy the app. I will keep exploring it. Thanks to Manish!