Skip to content

fix: Handle ngrok config upgrade error in createTunnel function#295

Merged
ericallam merged 3 commits intotriggerdotdev:mainfrom
Chigala:bug-fix/ngrok-tunnel-fix
Aug 11, 2023
Merged

fix: Handle ngrok config upgrade error in createTunnel function#295
ericallam merged 3 commits intotriggerdotdev:mainfrom
Chigala:bug-fix/ngrok-tunnel-fix

Conversation

@Chigala
Copy link
Copy Markdown
Contributor

@Chigala Chigala commented Aug 9, 2023

Description

This PR addresses the issue where the createTunnel function fails to handle a specific ngrok error message that indicates the requirement for a version property in the configuration. The code has been refactored to handle this error message appropriately and perform the necessary configuration upgrade before retrying the tunnel creation.

Changes Made

  • Refactored the createTunnel function to identify and handle the ngrok error message indicating the need for a version property in the configuration.
  • Added logic to upgrade the ngrok configuration using the ngrok config upgrade command when the error message is detected.
  • Improved error handling and logging to provide clear information about the configuration upgrade process and tunnel creation attempts.

How to Test

  1. Simulate the specific ngrok error by intentionally removing the version property from the ngrok configuration.
  2. Run the application and invoke the createTunnel function with a test port.
  3. Observe the logs and confirm that the error message is correctly identified, the configuration upgrade is attempted, and the tunnel creation is retried after the upgrade.

Fixes #284
/claim #284

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 9, 2023

🦋 Changeset detected

Latest commit: d587cfe

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 22 packages
Name Type
@trigger.dev/cli Patch
@examples/job-catalog Patch
@examples/jobs-starter Patch
@examples/nextjs Patch
@examples/package-tester Patch
@trigger.dev/tailwind-config Patch
@trigger.dev/tsconfig Patch
@trigger.dev/core Patch
@trigger.dev/express Patch
@trigger.dev/integration-kit Patch
@trigger.dev/nextjs Patch
@trigger.dev/react Patch
@trigger.dev/sdk Patch
@trigger.dev/github Patch
@trigger.dev/openai Patch
@trigger.dev/plain Patch
@trigger.dev/resend Patch
@trigger.dev/slack Patch
@trigger.dev/stripe Patch
@trigger.dev/supabase Patch
@trigger.dev/typeform Patch
nextjs-12 Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ericallam ericallam merged commit d395b95 into triggerdotdev:main Aug 11, 2023
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

Successfully merging this pull request may close these issues.

[TRI-954] Bug: @trigger.dev/cli dev can fail to open an ngrok tunnel when there is an old configuration file found

2 participants