BotFramework-Emulator icon indicating copy to clipboard operation
BotFramework-Emulator copied to clipboard

Bot Emulator 3.5.27 not able to connect to bot getting 301 response

Open kausthub opened this issue 9 years ago • 12 comments

So i followed the ChatConnector example for Node Js. This is the log i see in bot emulator [20:34:29] -> POST 301 [conversationUpdate]

Please help in solving this issue This issue is on Windows 7

kausthub avatar May 07 '17 15:05 kausthub

Are you certain is was 301? I'm wondering if it could have been 401. If 301:

  • Was your bot running locally or remotely?

If 401:

  • Was your bot configured with MSA appId and password, or running without credentials?

eanders-ms avatar May 08 '17 17:05 eanders-ms

It was 301 and it was running locally. In fact from the emulator logs I got the payload which it tried to POST to the bot. I did the same using Postman and it worked. Is there something which I am missing here ?

But when I used console connector to try out a hello world bot it worked. So only the chat connector is causing issues. Please help me to resolve this

Thank you On 8 May 2017 22:31, "Eric Anderson" [email protected] wrote:

Are you certain is was 301? I'm wondering if it could have been 401. If 301:

  • Was your bot running locally or remotely?

If 401:

  • Was your bot configured with MSA appId and password, or running without credentials?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/BotFramework-Emulator/issues/180#issuecomment-299926598, or mute the thread https://github.com/notifications/unsubscribe-auth/AJO3_VlycJ5HwOEXCQLcl11zf7hKRanSks5r30qBgaJpZM4NTLea .

kausthub avatar May 08 '17 17:05 kausthub

Could you please copy/paste a few lines from your emulator log showing the error?

eanders-ms avatar May 08 '17 20:05 eanders-ms

This is all I see in red colour

POST 301 [conversation update]

Nothing else , I don't know why is it redirecting . On 9 May 2017 02:05, "Eric Anderson" [email protected] wrote:

Could you please copy/paste a few lines from your emulator log showing the error?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/BotFramework-Emulator/issues/180#issuecomment-299982991, or mute the thread https://github.com/notifications/unsubscribe-auth/AJO3_VwTlpV-BsktGsG83v9_wmhSxLjFks5r33x9gaJpZM4NTLea .

kausthub avatar May 09 '17 03:05 kausthub

A new version of the emulator is available that may be able to provide more information about the 301. Direct download link: https://github.com/Microsoft/BotFramework-Emulator/releases

eanders-ms avatar May 09 '17 17:05 eanders-ms

Nope still the same issue. Any idea on why this might be returning back 301? I am on the latest 3.5.29 On windows 7 On 9 May 2017 22:54, "Eric Anderson" [email protected] wrote:

A new version of the emulator is available that may be able to provide more information about the 301. Direct download link: https://github.com/Microsoft/BotFramework-Emulator/releases

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/BotFramework-Emulator/issues/180#issuecomment-300239919, or mute the thread https://github.com/notifications/unsubscribe-auth/AJO3_ctfB-xltXzoNgw9Ok0PHBS2e5xEks5r4KFPgaJpZM4NTLea .

kausthub avatar May 10 '17 16:05 kausthub

The 301 would have to be coming from something external as there's nothing in the Node SDK that does any sort of redirect. Is it possible that you have a firewall or proxy of some sort running locally? Out of curiosity can you see where it's redirecting you too???

Stevenic avatar May 10 '17 18:05 Stevenic

How can I see where it is redirecting me to ? I clicked on that log and it shows me the body of the post which the emulator sent as the request but where can I see the response ? Thanks for the quick reply On 10 May 2017 23:40, "Steven Ickman" [email protected] wrote:

The 301 would have to be coming from something external as there's nothing in the Node SDK that does any sort of redirect. Is it possible that you have a firewall or proxy of some sort running locally? Out of curiosity can you see where it's redirecting you too???

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/BotFramework-Emulator/issues/180#issuecomment-300567369, or mute the thread https://github.com/notifications/unsubscribe-auth/AJO3_QNQieqqq2_TW13SjkFyHH5i3fRZks5r4f2ZgaJpZM4NTLea .

kausthub avatar May 11 '17 03:05 kausthub

If the 301 is clickable in the emulator log, clicking it will show the content of the response in the detail view. If the 301 is not hyperlinked, then you'll need to inspect the network traffic using a network debugging tool like fiddler. If you use fiddler, be sure to set your machine's proxy settings to not bypass proxy for local addresses, otherwise you won't see localhost traffic in the fiddler capture.

eanders-ms avatar May 11 '17 04:05 eanders-ms

So on clicking the 301 response all I can see is a HTML like this

\r\n redirection <\title> <\head> <body> Redirect <\body>\r\n <p>But no redirect URL anywhere What do I do now ?</p> <p>Thanks On 11 May 2017 10:23, "Eric Anderson" <span>notifications@github.com</span> wrote:</p> <blockquote> <p>If the 301 is clickable in the emulator log, clicking it will show the content of the response in the detail view. If the 301 is not hyperlinked, then you'll need to inspect the network traffic using a network debugging tool like fiddler <a href="https://www.telerik.com/download/fiddler" rel="nofollow" target="_blank" >https://www.telerik.com/download/fiddler</a>. If you use fiddler, be sure to set your machine's proxy settings to <em>not</em> bypass proxy for local addresses, otherwise you won't see localhost traffic in the fiddler capture.</p> <p>— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <a href="https://github.com/Microsoft/BotFramework-Emulator/issues/180#issuecomment-300681913" rel="nofollow" target="_blank" >https://github.com/Microsoft/BotFramework-Emulator/issues/180#issuecomment-300681913</a>, or mute the thread <a href="https://github.com/notifications/unsubscribe-auth/AJO3_Qt6PXP6k8fz-q6VKK1_5cRVDlvZks5r4pQ3gaJpZM4NTLea" rel="nofollow" target="_blank" >https://github.com/notifications/unsubscribe-auth/AJO3_Qt6PXP6k8fz-q6VKK1_5cRVDlvZks5r4pQ3gaJpZM4NTLea</a> .</p> </blockquote> </p> <div class="body-meta"> <div class="owner-info float-right"> <img class="owner-avatar" src="https://avatars.githubusercontent.com/u/9680893?v=4" alt="kausthub avatar" width="48" height="48" title="Published by a pub.dev verified publisher"/> <span class="w3-opacity w3-small"> May 11 '17 18:05 </span> <a class="owner-name" href="http://gitmemories.com/kausthub"> kausthub </a> </div> </div> <div class="clear-both"></div> </div> <div class="issue-body"> <p> <p>Try using fiddler (as described above) to look at the <code>Location</code> header of the 301 response. This header contains the redirect URL.</p> </p> <div class="body-meta"> <div class="owner-info float-right"> <img class="owner-avatar" src="https://avatars.githubusercontent.com/u/12176807?u=e3cc501a2f0e0c786052dca4113e278ce7bebb7f&v=4" alt="eanders-ms avatar" width="48" height="48" title="Published by a pub.dev verified publisher"/> <span class="w3-opacity w3-small"> May 11 '17 18:05 </span> <a class="owner-name" href="http://gitmemories.com/eanders-ms"> eanders-ms </a> </div> </div> <div class="clear-both"></div> </div> <div class="issue-body"> <p> <p>Going ahead and closing this now. If you'd like further assistance, reply here and we'll reopen it.</p> </p> <div class="body-meta"> <div class="owner-info float-right"> <img class="owner-avatar" src="https://avatars.githubusercontent.com/u/12176807?u=e3cc501a2f0e0c786052dca4113e278ce7bebb7f&v=4" alt="eanders-ms avatar" width="48" height="48" title="Published by a pub.dev verified publisher"/> <span class="w3-opacity w3-small"> May 30 '17 17:05 </span> <a class="owner-name" href="http://gitmemories.com/eanders-ms"> eanders-ms </a> </div> </div> <div class="clear-both"></div> </div> </section> </div> </div> </div> <aside class="detail-info-box"> <h3 class="title pkg-infobox-metadata">Labels</h3> <script type="text/javascript"> atOptions = { 'key' : '6ca19c2b16e3f20a28885886ef99a68e', 'format' : 'iframe', 'height' : 250, 'width' : 300, 'params' : {} }; </script> <script type="text/javascript" src="https://www.highperformanceformat.com/6ca19c2b16e3f20a28885886ef99a68e/invoke.js" ></script> <h3 class="title">Owner</h3> <div class="owner-info flex-items-center d-flex"> <img class="owner-avatar" src="https://avatars.githubusercontent.com/u/9680893?v=4" alt="kausthub avatar" width="48" height="48" title="Published by a pub.dev verified publisher"/> <a class="owner-name" href="http://gitmemories.com/kausthub"> kausthub </a> </div> <hr class="color1"> <h3>Other Repo Issues</h3> <div class="packages"> </div> <div style="clear: both"></div> </aside> </div> </div> </main> <footer class="site-footer"> <span>© 2022 Git Memory </span> <a class="link sep" href="http://gitmemories.com/privacy-policy">Policy</a> <a class="link sep" href="http://gitmemories.com/terms">Terms </a> <a class="link sep" href="http://gitmemories.com/contact">Contact </a> <a class="link sep" href="https://exchangetuts.com">Exchangetuts </a> <a class="link sep" href="https://onltools.com/">Onltools </a> <a class="link sep" href="https://serveraide.com/">Serveraide </a> </footer> <script src="http://gitmemories.com/js/app.js?id=a1337f444c840fae34ad"></script> </body> </html>