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

Crashes when calling disconnect function #226

Open
Viiprogrammer opened this issue Jun 7, 2021 · 1 comment
Open

Crashes when calling disconnect function #226

Viiprogrammer opened this issue Jun 7, 2021 · 1 comment

Comments

@Viiprogrammer
Copy link

Versions

Electron: v12.0.5
Ngrok (package): 4.0.1
Node: v15.12.0
Ngrok (binary): 2.3.40

When i call ngrok.disconnect() it's crashes with error:

{PATH_TO_APP}\node_modules\ngrok\src\client.js:42
          error.response.body,
                         ^

TypeError: Cannot read property 'body' of undefined
    at NgrokClient.request ({PATH_TO_APP}\node_modules\ngrok\src\client.js:4
2:26)
    at processTicksAndRejections (node:internal/process/task_queues:94:5)
    at async Object.disconnect ({PATH_TO_APP}\node_modules\ngrok\index.js:42
:20)
    at async Common.serverStop ({PATH_TO_APP}\src\lib\common.js:19:9)

I checked client.js:42 - it's request(method, path, options = {}). I think this error thrown when sending api/tunnels request.

@philnash
Copy link
Collaborator

I think the work being done on #231 will help here. At least it will expose what the real error is underneath the inability to read error.response.body.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants