Skip to content

Commit

Permalink
fix(cli): improve ngrok error message format (#19822)
Browse files Browse the repository at this point in the history
* fix(cli): improve ngrok error message format

* Update packages/@expo/cli/CHANGELOG.md

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>

* Update packages/@expo/cli/src/start/server/AsyncNgrok.ts

Co-authored-by: Brent Vatne <brentvatne@gmail.com>

Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
Co-authored-by: Brent Vatne <brentvatne@gmail.com>
  • Loading branch information
3 people committed Nov 4, 2022
1 parent 82f3de7 commit 60eefc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions packages/@expo/cli/CHANGELOG.md
Expand Up @@ -12,6 +12,8 @@

### 💡 Others

- Fix ngrok error message format. ([#19822](https://github.com/expo/expo/pull/19822) by [@EvanBacon](https://github.com/EvanBacon))

## 0.4.6 — 2022-11-02

### 🎉 New features
Expand Down
8 changes: 4 additions & 4 deletions packages/@expo/cli/src/start/server/AsyncNgrok.ts
@@ -1,3 +1,4 @@
import chalk from 'chalk';
import crypto from 'crypto';
import * as path from 'path';
import slugify from 'slugify';
Expand Down Expand Up @@ -165,10 +166,9 @@ export class AsyncNgrok {
onStatusChange(status) {
if (status === 'closed') {
Log.error(
'We noticed your tunnel is having issues. ' +
'This may be due to intermittent problems with ngrok. ' +
'If you have trouble connecting to your app, try to restart the project, ' +
'or switch the host to `lan`.'
chalk.red(
'Tunnel connection has been closed. This is often related to intermittent connection problems with the Ngrok servers. Restart the dev server to try connecting to Ngrok again.'
)
);
} else if (status === 'connected') {
Log.log('Tunnel connected.');
Expand Down

0 comments on commit 60eefc0

Please sign in to comment.