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

Failed to spawn ngrok #2389

Closed
mgateno opened this issue Jun 17, 2022 · 20 comments
Closed

Failed to spawn ngrok #2389

mgateno opened this issue Jun 17, 2022 · 20 comments
Labels
Bot Services equired for internal Azure reporting. Do not delete. Do not change color. Bug Your classic code defect customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete. ExemptFromDailyDRIReport

Comments

@mgateno
Copy link

mgateno commented Jun 17, 2022

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Version

What version of the Emulator are you using.
4.14.1-302259

Describe the bug

Give a clear and concise description of what the bug is.
ngrok is not spawning. Trying to connect to a bot hosted in Azure

To Reproduce

Steps to reproduce the behavior:

  1. Path to ngrok set to '/snap/ngrok/current/ngrok'
  2. Open remote bot (saved as .bot)
  3. Error is in log Failed to spawn ngrok. Please go to the Ngrok Status Viewer and download the log file for a more detailed view of the error.{"error_code":102,"status_code":400,"msg":"invalid tunnel configuration","details":{"err":"yaml: unmarshal errors:\n line 1: field region not found in type config.HTTPv2Tunnel\n line 1: field path not found in type config.HTTPv2Tunnel"}}
    [17:05:33]Error: The bot is remote, but the service URL is localhost. Without tunneling software you will not receive replies.

Expected behavior

Give a clear and concise description of what you expected to happen.
ngrok spawns and I am able to connect to bot (this works from a windows machine).

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.
Ubuntu 20.04 LTS

[bug]

@mgateno mgateno added the Bug Your classic code defect label Jun 17, 2022
@mgateno
Copy link
Author

mgateno commented Jun 17, 2022

Update

Changed path to ngrok to '/snap/bin/ngrok'

Now I can go into http://127.0.0.1:4040/status and see that ngrok is running but the tunnel is not active. Same error in the log. I can otherwise run ngrok manually and it works fine.

ngrok.yml is

authtoken: 25qpWK--------------------------------------------------------
version: "2"
region: us

Ran 'ngrok config check' and comes back as valid.

@anishprasad01 anishprasad01 self-assigned this Jun 20, 2022
@anishprasad01 anishprasad01 added customer-reported Required for internal Azure reporting. Do not delete. Bot Services equired for internal Azure reporting. Do not delete. Do not change color. labels Jun 20, 2022
@anishprasad01
Copy link
Contributor

Hi @mgateno,

Thanks for the report. I am able to reproduce this behavior in Ubuntu 20.04. I can also confirm that this issue does not occur in Windows. I will investigate further to see if I can determine a resolution.

@anishprasad01
Copy link
Contributor

Still investigating

@mgateno
Copy link
Author

mgateno commented Jun 28, 2022 via email

@anishprasad01
Copy link
Contributor

anishprasad01 commented Jun 28, 2022

Ah, I deleted that because it's primarily for the reverse. You want to communicate with a hosted bot on the local Emulator. The CLI method is for communication with a local bot from a remote client. If I determine a way to do it, I will update here.

@mgateno
Copy link
Author

mgateno commented Jun 28, 2022 via email

@anishprasad01
Copy link
Contributor

anishprasad01 commented Jul 5, 2022

@mgateno

It looks like the issue is being caused by breaking changes in ngrok agent v3. For the time being, you can work around this by downloading the latest v2 version of ngrok instead.

I can also confirm this issue is not specific to Ubuntu. Ngrok v3 does not work with Emulator on any platform. We will continue to investigate and look for a fix.

@mgateno
Copy link
Author

mgateno commented Jul 15, 2022

Thanks for the workaround. I will be looking out for a more permanent fix

@anishprasad01
Copy link
Contributor

I'm still working on it. I think I may have identified a potential fix, but it requires further testing to ensure it does not cause regressions or introduce new bugs.

@axelsrz axelsrz added the customer-replied-to Required for internal reporting. Do not delete. label Jul 18, 2022
@anishprasad01
Copy link
Contributor

anishprasad01 commented Jul 19, 2022

No need. The incompatibility between Ngrok 3.x and Emulator affects all platforms. Until we release a fix, the workaround is to use Ngrok 2.x or test the bot from Test in Web Chat or the desired channel.

@miguelhughes
Copy link

I'm confused: pull request #2399 was merged, which fixes this bug. Why is this still open? It seems I still have this error, and there's also #2394.
Is this included in v4.14.1?

@OEvgeny
Copy link
Collaborator

OEvgeny commented Jan 4, 2024

The fix is available in the latest Emulator nightly release, not in stable yet. I was able to set ngrok up while working on the PR. Please let me know if you have further issues.

@Emmi05
Copy link

Emmi05 commented Jan 26, 2024

Sorry, but where can i configure my ngrok?
Also what i have to do if i have a code from azure and i want to explore and edit some texts but i want to test in local?
I previously installed, SDK 6,7,3.1, also i have the emulator.
image
image

@d-kleine
Copy link

@Emmi05 At the left side panel, bottom right corner, click on the gear symbol there:
grafik

For the Ngrok version conflict, there has been also a workaround posted here

@AttackOnMorty
Copy link

AttackOnMorty commented May 1, 2024

For the Ngrok version conflict, there has been also a workaround posted here

@d-kleine This is not working unless you are a paid ngrok account.

It will force you to upgrade to v3 after running the command ngrok http 3980. And v3 it's not working. It's a dead loop.

(Note: I am using Mac with ngrok v2.3.41)

image

@d-kleine
Copy link

d-kleine commented May 1, 2024

Yeah, I having the same issue. See also #2443

@d-kleine
Copy link

d-kleine commented May 2, 2024

@AttackOnMorty Have you tried the latest nightly build? For me, it worked with ngrok 3.9 with the Echo Bot. At least locally without authorization (no MSAppID, no MSAppPassword), it works for me. Tested with echo bot locally:
bfe_ngrok_status
bfe_local_test

For anyone that wants to reproduce:

@interfacemirror
Copy link

Facing the same dead loop. The Emulator needs ngork with region. The region field is deprecated in ngork v3.16. I tried using ngork v2.3 but ngork does not allow me old versions. Any help with this?

@d-kleine
Copy link

@tracyboehrer fyi

@tracyboehrer
Copy link
Member

Closing this issue. The next release of Emulator will be removing ngrok completely. Tunneling will be an external concern and replaced with devtunnels as the recommendation, though any tunnel would still work. ETA likely in the next couple of weeks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bot Services equired for internal Azure reporting. Do not delete. Do not change color. Bug Your classic code defect customer-replied-to Required for internal reporting. Do not delete. customer-reported Required for internal Azure reporting. Do not delete. ExemptFromDailyDRIReport
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants