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

Ngrok doesn't work with Emulator #2295

Closed
MaximDmitrievich opened this issue Oct 1, 2021 · 25 comments · Fixed by #2318
Closed

Ngrok doesn't work with Emulator #2295

MaximDmitrievich opened this issue Oct 1, 2021 · 25 comments · Fixed by #2318
Assignees
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.

Comments

@MaximDmitrievich
Copy link

MaximDmitrievich commented Oct 1, 2021

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

Version

4.14

Describe the bug

After upping the application and providing request through ngrok, ngrok falls down and give an exception

"Oops.. Your ngrok tunnel seems to have an error. Please check the Ngrok Status Viewer for more details"

"Looks like the ngrok tunnel does not exist anymore...."

Using last version of ngrok and emulator, the links provided properly.

The last log from ngrok

Ngrok Logger starting
t=2021-10-04T13:58:03+0300 lvl=info msg="received stop request" obj=app stopReq="{err:<nil> restart:false}"
t=2021-10-04T13:58:03+0300 lvl=info msg="session closing" obj=tunnels.session err=nil


t=2021-10-04T13:58:03+0300 lvl=info msg="no configuration paths supplied"
t=2021-10-04T13:58:03+0300 lvl=info msg="ignoring default config path, could not stat it" path=/home/maxim/.ngrok2/ngrok.yml err="stat /home/maxim/.ngrok2/ngrok.yml: no such file or directory"


t=2021-10-04T13:58:03+0300 lvl=info msg="starting web service" obj=web addr=127.0.0.1:4040


t=2021-10-04T13:58:03+0300 lvl=info msg=start pg=/api/tunnels id=4823c88208bf2173


t=2021-10-04T13:58:03+0300 lvl=warn msg="ngrok is not yet ready to start tunnels" pg=/api/tunnels id=4823c88208bf2173 err="a successful ngrok tunnel session has not yet been established"


t=2021-10-04T13:58:03+0300 lvl=info msg=end pg=/api/tunnels id=4823c88208bf2173 status=503 dur=1.089392ms


t=2021-10-04T13:58:03+0300 lvl=info msg=start pg=/api/tunnels id=8f5a59c2760d0499


t=2021-10-04T13:58:03+0300 lvl=warn msg="ngrok is not yet ready to start tunnels" pg=/api/tunnels id=8f5a59c2760d0499 err="a successful ngrok tunnel session has not yet been established"
t=2021-10-04T13:58:03+0300 lvl=info msg=end pg=/api/tunnels id=8f5a59c2760d0499 status=503 dur=368.768µs


t=2021-10-04T13:58:03+0300 lvl=info msg=start pg=/api/tunnels id=aac441a0694d3788


t=2021-10-04T13:58:03+0300 lvl=info msg="tunnel session started" obj=tunnels.session
t=2021-10-04T13:58:03+0300 lvl=info msg="client session established" obj=csess id=18bdb6edcb1f


t=2021-10-04T13:58:03+0300 lvl=info msg="started tunnel" obj=tunnels name="e6b52930-2501-11ec-8791-b181e964dc45 (http)" addr=http://localhost:32815 url=http://bd35-178-238-114-10.ngrok.io
t=2021-10-04T13:58:03+0300 lvl=info msg="started tunnel" obj=tunnels name=e6b52930-2501-11ec-8791-b181e964dc45 addr=http://localhost:32815 url=https://bd35-178-238-114-10.ngrok.io


t=2021-10-04T13:58:03+0300 lvl=info msg=end pg=/api/tunnels id=aac441a0694d3788 status=201 dur=277.407116ms


t=2021-10-04T13:58:08+0300 lvl=info msg="join connections" obj=join id=b0ab7155ea5b l=[::1]:32815 r=178.238.114.10:59380

To Reproduce

Steps to reproduce the behavior:

  1. Turn up the bot
  2. Open Emulator
  3. Choose the bot config
  4. Emulator get error, written upper.

Expected behavior

Emulator starts conversationUpdate and then user can interract with user

Screenshots

image

Additional context

[bug]

@MaximDmitrievich MaximDmitrievich added the Bug Your classic code defect label Oct 1, 2021
@stevkan stevkan added Bot Services equired for internal Azure reporting. Do not delete. Do not change color. customer-reported Required for internal Azure reporting. Do not delete. labels Oct 1, 2021
@stevkan stevkan self-assigned this Oct 1, 2021
@MaximDmitrievich
Copy link
Author

Ngrok Logger starting
t=2021-10-05T13:18:40+0300 lvl=info msg="no configuration paths supplied"
t=2021-10-05T13:18:40+0300 lvl=info msg="using configuration at default config path" path=/home/maxim/.ngrok2/ngrok.yml
t=2021-10-05T13:18:40+0300 lvl=info msg="open config file" path=/home/maxim/.ngrok2/ngrok.yml err=nil


t=2021-10-05T13:18:40+0300 lvl=info msg="starting web service" obj=web addr=127.0.0.1:4040


t=2021-10-05T13:18:40+0300 lvl=info msg=start pg=/api/tunnels id=8c0436ed3596361d


t=2021-10-05T13:18:40+0300 lvl=warn msg="ngrok is not yet ready to start tunnels" pg=/api/tunnels id=8c0436ed3596361d err="a successful ngrok tunnel session has not yet been established"


t=2021-10-05T13:18:40+0300 lvl=info msg=end pg=/api/tunnels id=8c0436ed3596361d status=503 dur=392.856µs


t=2021-10-05T13:18:40+0300 lvl=info msg=start pg=/api/tunnels id=507034727efb3f2d


t=2021-10-05T13:18:40+0300 lvl=warn msg="ngrok is not yet ready to start tunnels" pg=/api/tunnels id=507034727efb3f2d err="a successful ngrok tunnel session has not yet been established"
t=2021-10-05T13:18:40+0300 lvl=info msg=end pg=/api/tunnels id=507034727efb3f2d status=503 dur=262.722µs


t=2021-10-05T13:18:41+0300 lvl=info msg=start pg=/api/tunnels id=33500705fac5735f


t=2021-10-05T13:18:41+0300 lvl=info msg="tunnel session started" obj=tunnels.session


t=2021-10-05T13:18:41+0300 lvl=eror msg="failed to reconnect session" obj=csess id=d6fbc46dd4f8 err="The tunnel 'https://1767-178-238-114-10.ngrok.io' is already bound to another tunnel session\r\n\r\nERR_NGROK_334\r\n"


t=2021-10-05T13:18:41+0300 lvl=info msg="started tunnel" obj=tunnels name="85ebc950-25c5-11ec-93ba-498d6b747a86 (http)" addr=http://localhost:41951 url=http://1767-178-238-114-10.ngrok.io
t=2021-10-05T13:18:41+0300 lvl=info msg="started tunnel" obj=tunnels name=85ebc950-25c5-11ec-93ba-498d6b747a86 addr=http://localhost:41951 url=https://1767-178-238-114-10.ngrok.io


t=2021-10-05T13:18:41+0300 lvl=info msg=end pg=/api/tunnels id=33500705fac5735f status=201 dur=476.995935ms


t=2021-10-05T13:18:42+0300 lvl=info msg="tunnel session started" obj=tunnels.session


t=2021-10-05T13:18:43+0300 lvl=info msg="client session established" obj=csess id=d6fbc46dd4f8


-- Tunnel Error Response --
Status Code: 404
Tunnel ping has surpassed the acceptable time limit. Looks like it does not exist anymore.
-- End Response --

The last logs from bot emulator ngrok

@stevkan
Copy link
Collaborator

stevkan commented Oct 5, 2021

@MaximDmitrievich, just verifying that you have added the path to your ngrok executable in Emulator's settings?

If so, how many total instances of ngrok do you have running simultaneously? ngrok only supports two simultaneous instances regardless of your tier as a customer.

@stevkan stevkan added the customer-replied-to Required for internal reporting. Do not delete. label Oct 5, 2021
@MaximDmitrievich
Copy link
Author

MaximDmitrievich commented Oct 5, 2021 via email

@ghost
Copy link

ghost commented Oct 8, 2021

I have exactly the very same issue!

@ghost
Copy link

ghost commented Oct 12, 2021

I had the same issue.
When I access the Public URL dispatched by ngrok, see the following message.
Is this a problem on the ngrok side?

{"code":"ResourceNotFound","message":"/ does not exist"}

@tswordsmith
Copy link

I have the same issue and report the same as all the above. Any resolution coming?

@stevkan
Copy link
Collaborator

stevkan commented Oct 20, 2021

(Tested using both recent and older versions of ngrok and Emulator, as well as running as admin, with the same result.)

I've been digging into this issue and, from the ngrok log saved by Emulator, I'm thinking that how the ngrok service reads the settings passed in has maybe changed...? Because the client apps don't appear to be the issue, that only leaves the ngrok service. I'm assuming Emulator uses ngrok as a service (ngrok-link) based on the error message shown below. The below is the message I'm seeing when an ngrok.yml configuration file is setup (resulting in ngrok failing to spin up,; the path is correct):

Ngrok Logger starting
t=2021-10-20T15:23:48-0700 lvl=info msg="no configuration paths supplied"
t=2021-10-20T15:23:48-0700 lvl=info msg="using configuration at default config path" path="C:\\Users\\Steven Kanberg/.ngrok2/ngrok.yml"


t=2021-10-20T15:23:48-0700 lvl=info msg="open config file" path="C:\\Users\\Steven Kanberg\\.ngrok2\\ngrok.yml" err=nil



ERROR:  You can't enable the console UI and log to stdout or stderr

If an ngrok.yml file is not available, ngrok will spin up but shows the below (with the Ngrok Status Viewer showing the same as the Cx posted above in the original post):

image

Similar to Cx's logging, but also received "Tunnel Error Response" at the end.

Ngrok Logger starting
t=2021-10-20T15:21:11-0700 lvl=info msg="no configuration paths supplied"
t=2021-10-20T15:21:11-0700 lvl=info msg="ignoring default config path, could not stat it" path="C:\\Users\\Steven Kanberg/.ngrok2/ngrok.yml" err="CreateFile C:\\Users\\Steven Kanberg/.ngrok2/ngrok.yml: The system cannot find the file specified."


t=2021-10-20T15:21:11-0700 lvl=info msg="starting web service" obj=web addr=127.0.0.1:4040


t=2021-10-20T15:21:11-0700 lvl=info msg=start pg=/api/tunnels id=671e5cfe8c0c8d7c
t=2021-10-20T15:21:11-0700 lvl=warn msg="ngrok is not yet ready to start tunnels" pg=/api/tunnels id=671e5cfe8c0c8d7c err="a successful ngrok tunnel session has not yet been established"


t=2021-10-20T15:21:11-0700 lvl=info msg=end pg=/api/tunnels id=671e5cfe8c0c8d7c status=503 dur=0s


t=2021-10-20T15:21:12-0700 lvl=info msg=start pg=/api/tunnels id=53208f70e5e8a51d


t=2021-10-20T15:21:12-0700 lvl=warn msg="ngrok is not yet ready to start tunnels" pg=/api/tunnels id=53208f70e5e8a51d err="a successful ngrok tunnel session has not yet been established"
t=2021-10-20T15:21:12-0700 lvl=info msg=end pg=/api/tunnels id=53208f70e5e8a51d status=503 dur=0s


t=2021-10-20T15:21:12-0700 lvl=info msg=start pg=/api/tunnels id=a16b566f7345434d


t=2021-10-20T15:21:12-0700 lvl=info msg="tunnel session started" obj=tunnels.session
t=2021-10-20T15:21:12-0700 lvl=info msg="client session established" obj=csess id=e47c94646959


t=2021-10-20T15:21:12-0700 lvl=info msg="update available" obj=updater


t=2021-10-20T15:21:12-0700 lvl=info msg="started tunnel" obj=tunnels name="f9384070-31f3-11ec-b05a-81f675f0df57 (http)" addr=http://localhost:24119 url=http://234e-2601-600-887f-fa10-925-1b13-9bd4-b639.ngrok.io
t=2021-10-20T15:21:12-0700 lvl=info msg="started tunnel" obj=tunnels name=f9384070-31f3-11ec-b05a-81f675f0df57 addr=http://localhost:24119 url=https://234e-2601-600-887f-fa10-925-1b13-9bd4-b639.ngrok.io
t=2021-10-20T15:21:12-0700 lvl=info msg=end pg=/api/tunnels id=a16b566f7345434d status=201 dur=208.0067ms


-- Tunnel Error Response --
Status Code: 404
Tunnel ping has surpassed the acceptable time limit. Looks like it does not exist anymore.
-- End Response --
t=2021-10-20T15:21:12-0700 lvl=info msg="join connections" obj=join id=28cfa0444a6f l=[::1]:24119 r=71.227.248.251:31776

@tonyanziano, this is looking like a legitimate bug to me. But, would appreciate your thoughts on this.

@achmedzhanov
Copy link

This solution works for me, set environment variable NODE_TLS_REJECT_UNAUTHORIZED=0 and restart the emulator

Details

It seems to me node.js doesn't trust to "Let's Encrypt" certificate. I found these errors in debugger.

{
    "message": "request to https://cf4b-78-85-48-181.ngrok.io/ failed, reason: certificate has expired",
    "type": "system",
    "errno": "CERT_HAS_EXPIRED",
    "code": "CERT_HAS_EXPIRED"
}

Error: certificate has expired
    at TLSSocket.onConnectSecure (_tls_wrap.js:1501:34)
    at TLSSocket.emit (events.js:315:20)
    at TLSSocket._finishInit (_tls_wrap.js:936:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:710:12)
    at TLSWrap.callbackTrampoline (internal/async_hooks.js:120:14)

FetchError: request to https://cf4b-78-85-48-181.ngrok.io/ failed, reason: certificate has expired
    at ClientRequest.<anonymous> (C:\Users\achme\Projects\BotFramework-Emulator\node_modules\node-fetch\lib\index.js:1461:11)
    at ClientRequest.emit (events.js:315:20)
    at TLSSocket.socketErrorListener (_http_client.js:426:9)
    at TLSSocket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)

ngrok certificate details

this.getPeerCertificate(true)
: "prime256v1"
bits: 256
ext_key_usage: (2) ['1.3.6.1.5.5.7.3.1', '1.3.6.1.5.5.7.3.2']
fingerprint: "D8:74:68:5A:3D:EC:63:13:11:6C:04:23:78:0C:BB:5B:8D:A2:E7:5C"
fingerprint256: "2E:64:25:00:97:BF:92:2C:AE:AF:0A:96:33:6F:F3:00:BC:94:2D:96:0F:33:8C:06:98:FC:48:CC:C9:11:43:60"
infoAccess: {OCSP - URI: Array(1), CA Issuers - URI: Array(1)}
issuer: {C: 'US', O: "Let's Encrypt", CN: 'R3'}
issuerCertificate: {subject: {…}, issuer: {…}, infoAccess: {…}, modulus: 'bb021528ccf6a094d30f12ec8d5592c3f882f199a67a4288a7…c53a706fe48851da169ae2575bb13cc5203f5ed51a18bdb15', bits: 2048, …}
nistCurve: "P-256"
pubkey: Uint8Array(65) [4, 223, 235, 217, 47, 223, 141, 87, 189, 43, 18, 202, 222, 61, 235, 127, 240, 141, 21, 177, 63, 126, 5, 21, 247, 10, 186, 106, 113, 62, 129, 82, 58, 62, 207, 116, 135, 212, 215, 102, 1, 233, 117, 156, 117, 9, 50, 142, 242, 43, 231, 62, 124, 147, 204, 20, 23, 162, 169, 91, 102, 159, 41, 112, 19]
raw: Uint8Array(1117) [48, 130, 4, 89, 48, 130, 3, 65, 160, 3, 2, 1, 2, 2, 18, 3, 191, 225, 60, 25, 27, 221, 211, 46, 181, 73, 19, 248, 46, 179, 34, 209, 109, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 11, 5, 0, 48, 50, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 22, 48, 20, 6, 3, 85, 4, 10, 19, 13, 76, 101, 116, 39, 115, 32, 69, 110, 99, 114, 121, 112, 116, 49, 11, 48, 9, 6, 3, 85, 4, 3, 19, 2, 82, 51, …]
serialNumber: "03bfe13c191bddd32eb54913f82eb322d16d"
subject: {CN: '*.ngrok.io'}
subjectaltname: "DNS:*.ngrok.io, DNS:ngrok.io"
valid_from: "Sep 30 21:06:04 2021 GMT"
valid_to: "Dec 29 21:06:03 2021 GMT"
__proto__: {con

@stevkan
Copy link
Collaborator

stevkan commented Oct 25, 2021

@achmedzhanov, thank you for your input. In testing, I only found this to work successfully (i.e. no error produced in the Ngrok Status Viewer) if I also did NOT have an ngrok.yml file specified in the /.ngrok2 folder. Otherwise, the same error is still produced.

Did you find this to be the case, as well?

@dpraul
Copy link

dpraul commented Oct 26, 2021

@achmedzhanov, thank you for your input. In testing, I only found this to work successfully (i.e. no error produced in the Ngrok Status Viewer) if I also did NOT have an ngrok.yml file specified in the /.ngrok2 folder. Otherwise, the same error is still produced.

Did you find this to be the case, as well?

I ran into the same issue, and this was the case for me.

@MaximDmitrievich
Copy link
Author

This solution works for me, set environment variable NODE_TLS_REJECT_UNAUTHORIZED=0 and restart the emulator

Details

It seems to me node.js doesn't trust to "Let's Encrypt" certificate. I found these errors in debugger.

{
    "message": "request to https://cf4b-78-85-48-181.ngrok.io/ failed, reason: certificate has expired",
    "type": "system",
    "errno": "CERT_HAS_EXPIRED",
    "code": "CERT_HAS_EXPIRED"
}

Error: certificate has expired
    at TLSSocket.onConnectSecure (_tls_wrap.js:1501:34)
    at TLSSocket.emit (events.js:315:20)
    at TLSSocket._finishInit (_tls_wrap.js:936:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:710:12)
    at TLSWrap.callbackTrampoline (internal/async_hooks.js:120:14)

FetchError: request to https://cf4b-78-85-48-181.ngrok.io/ failed, reason: certificate has expired
    at ClientRequest.<anonymous> (C:\Users\achme\Projects\BotFramework-Emulator\node_modules\node-fetch\lib\index.js:1461:11)
    at ClientRequest.emit (events.js:315:20)
    at TLSSocket.socketErrorListener (_http_client.js:426:9)
    at TLSSocket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)

ngrok certificate details

this.getPeerCertificate(true)
: "prime256v1"
bits: 256
ext_key_usage: (2) ['1.3.6.1.5.5.7.3.1', '1.3.6.1.5.5.7.3.2']
fingerprint: "D8:74:68:5A:3D:EC:63:13:11:6C:04:23:78:0C:BB:5B:8D:A2:E7:5C"
fingerprint256: "2E:64:25:00:97:BF:92:2C:AE:AF:0A:96:33:6F:F3:00:BC:94:2D:96:0F:33:8C:06:98:FC:48:CC:C9:11:43:60"
infoAccess: {OCSP - URI: Array(1), CA Issuers - URI: Array(1)}
issuer: {C: 'US', O: "Let's Encrypt", CN: 'R3'}
issuerCertificate: {subject: {…}, issuer: {…}, infoAccess: {…}, modulus: 'bb021528ccf6a094d30f12ec8d5592c3f882f199a67a4288a7…c53a706fe48851da169ae2575bb13cc5203f5ed51a18bdb15', bits: 2048, …}
nistCurve: "P-256"
pubkey: Uint8Array(65) [4, 223, 235, 217, 47, 223, 141, 87, 189, 43, 18, 202, 222, 61, 235, 127, 240, 141, 21, 177, 63, 126, 5, 21, 247, 10, 186, 106, 113, 62, 129, 82, 58, 62, 207, 116, 135, 212, 215, 102, 1, 233, 117, 156, 117, 9, 50, 142, 242, 43, 231, 62, 124, 147, 204, 20, 23, 162, 169, 91, 102, 159, 41, 112, 19]
raw: Uint8Array(1117) [48, 130, 4, 89, 48, 130, 3, 65, 160, 3, 2, 1, 2, 2, 18, 3, 191, 225, 60, 25, 27, 221, 211, 46, 181, 73, 19, 248, 46, 179, 34, 209, 109, 48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 11, 5, 0, 48, 50, 49, 11, 48, 9, 6, 3, 85, 4, 6, 19, 2, 85, 83, 49, 22, 48, 20, 6, 3, 85, 4, 10, 19, 13, 76, 101, 116, 39, 115, 32, 69, 110, 99, 114, 121, 112, 116, 49, 11, 48, 9, 6, 3, 85, 4, 3, 19, 2, 82, 51, …]
serialNumber: "03bfe13c191bddd32eb54913f82eb322d16d"
subject: {CN: '*.ngrok.io'}
subjectaltname: "DNS:*.ngrok.io, DNS:ngrok.io"
valid_from: "Sep 30 21:06:04 2021 GMT"
valid_to: "Dec 29 21:06:03 2021 GMT"
__proto__: {con

I tried the same. but the result is same - public url doesn't exists and emulator answers, that cannot connect to tunnel.

@MaximDmitrievich
Copy link
Author

@achmedzhanov, thank you for your input. In testing, I only found this to work successfully (i.e. no error produced in the Ngrok Status Viewer) if I also did NOT have an ngrok.yml file specified in the /.ngrok2 folder. Otherwise, the same error is still produced.

Did you find this to be the case, as well?

tried to remove ngrok.yml file - same error.

"Oops.. Your ngrok tunnel seems to have an error. Please check the Ngrok Status Viewer for more details"

@tonyanziano
Copy link
Contributor

Hey all,

Sorry for jumping into this so late. I just reproduced this locally trying to talk to a remote bot.

I will look into it this week and see if I can figure out what is causing the error. I think @stevkan is right in the sense that something in the ngrok service might have changed, because we haven't changed any of this code in a very long time.

@tonyanziano
Copy link
Contributor

tonyanziano commented Nov 1, 2021

It appears that what @achmedzhanov stated earlier about the certificate seems to be the actual problem here.

After doing some digging, I found this Stack Overflow answer basically mentioning that NodeJS has certain certificates hard-coded into its source. One of these certs is the Let's Encrypt cert, which just happened to expire on September 30th of this year. If we look at when this issue was opened, Oct. 1st, this lines up nicely with the expiration of the cert -- and further supports the idea that the expiration of the cert embedded inside of NodeJS is causing the issue and not something on ngrok's side.

I'm going to explore some of the approaches mentioned in this SO thread and see if we can possibly integrate any of them.

  1. I tried setting NODE_TLS_REJECT_UNAUTHORIZED=0 locally, but it did not work for me. However, @achmedzhanov mentioned that it worked for him, so I'd recommend giving that a shot for a quick workaround in the meantime.

  2. Another approach in the thread is to set --use-openssl-ca NodeJS flag, however, Electron limits what NodeJS flags can be passed to the underlying NodeJS instance, and this one is not supported.

  3. A third approach is setting the outgoing HTTP/S request to ignore unauthorized requests, which might be the least disruptive, and easiest to implement.

I'll update this thread with my findings.

===

EDIT: For reference, there is also a huge thread over on the Electron repo about this very same issue.

@tonyanziano
Copy link
Contributor

I managed to implement a fix on a local build of the Emulator that enabled me to talk to a bot with a remote URL:

image

For now, I at least know that the method that I tried works, but I might have to take some more time to evaluate the fix and make sure that it is production ready.

I plan to have a new public build of the Emulator out by the end of the week with this fix, and I will update this thread if anything comes up.

@tonyanziano
Copy link
Contributor

tonyanziano commented Nov 2, 2021

So it looks like the better approach is to just update Electron. A fix for the expired cert was merged into Electron and backported to versions 12 and up.

I'm currently testing Emulator locally on version 13.6.1 of Electron, and it seems to have fixed the issue. We will need to test all 3 platforms with a packaged version of the Emulator before a new release, but things look good for now.

@tonyanziano
Copy link
Contributor

Hey all, another update:

We've tested the build and confirmed the fix, and are updating our build pipelines to accommodate the new Electron version. Mac and Linux are building, but we are having some trouble with the external service that signs our Windows .exe.

I've reached out to the team that runs the service and hope to have a resolution soon so we can get a new build out and unblock those who are affected by this ngrok issue.

@tonyanziano
Copy link
Contributor

It turns out that there is something wrong with the underlying format of the Windows .exe that gets produced during our build process, and that is preventing it from being properly signed.

I'm currently looking into it.

@tonyanziano
Copy link
Contributor

Hello all,

We've figured out the problem with the Windows build. It turns out that the special internal build of Electron that we use just recently started shipping pre-signed, so we were trying to re-sign a binary that was already signed which was causing the error.

Our plan is to modify our build pipeline to unsign the binary before re-signing it, and then hopefully it should word like normal.

There was also a Mac certificate that seems to have expired in our Mac pipeline, also blocking that one from releasing. However, we think we know what the problem is, and hope to have both pipelines fixed tomorrow.

We should have a new Emulator build out either tomorrow or Thursday. Thank you for your patience!

@tonyanziano
Copy link
Contributor

The builds have been fixed, and we just merged my change in. I will kick off a nightly build and update this thread when it is out.

We will most likely release a stable patch as well (4.14.1).

@tonyanziano tonyanziano reopened this Nov 11, 2021
@tonyanziano
Copy link
Contributor

tonyanziano commented Nov 11, 2021

The new nightly is out, but there are two new issues that just sprang up due to the Electron / NodeJS upgrade:

  1. Node's http module is now throwing an error when POSTing activities to the bot that weren't being thrown FIXED Moved next() in handler to fix early HTTP response termination. #2320

===

  1. The JSON inspector is not showing anything when you click something in the log panel

^^ I'm currently investigating this one -- my guess is that some default in the web view that hosts the inspector got changed and needs to be added back. FIXED #2321

Once both these PRs have been merged in I will kick off another nightly build.

@tonyanziano
Copy link
Contributor

Hello all, the new nightly build is finally out with the fix to Ngrok:

https://github.com/microsoft/botframework-emulator-nightlies/releases/tag/v4.14.0-277368

Thank you for your patience! Keep an eye out for a stable release of Emulator as well if you don't want to switch to the nightly for now.

@dpraul
Copy link

dpraul commented Nov 12, 2021

@tonyanziano thank you for investigating this issue, and for being so transparent of your steps to resolve it 😃

@tonyanziano
Copy link
Contributor

Stable version 4.14.1 is now available as well.

@stevkan
Copy link
Collaborator

stevkan commented Nov 17, 2021

Closing this as resolved.

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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants