profile
viewpoint

Ask questionsExpo app doesn't connect to packager

It's been 3 hours that I'm trying to figure out what broke my working setup out of nowhere.

My expo application doesn't connect to packager, let it alone debug it. If I launch expo r everything works like a charm.

I tried to disable the debugger from expo and just make the application start. I checked also from another device (not simulator) and the behaviour is exactly the same.

Any other app launched in Expo work.

While the debugging was on, I found a connection to http://localhost:8081 to succeed.

A connection to http://localhost:19000 generates the response:

{
  "error": "XDLError: ValidationError: \"https\" is not allowed"
}

I have no glue on what to check. Any help is appreciated.

Actual Behavior

  1. I click on "Debug in Exponent"
  2. Packager starts
  3. Debugger starts
  4. I launch Expo
  5. Expo doesn't connect, no matter how many caches cleared, systems restarted or voodoo operations performed on expo's doll.

Expected Behavior

  1. I click on "Debug in Exponent"
  2. Packager starts
  3. Debugger starts
  4. I launch Expo
  5. Expo connects to the packager and loads the app.

Software versions

  • React-Native VS Code extension version:

  • VSCode version: Version: 1.38.1 Commit: b37e54c98e1a74ba89e03073e5a3761284e3ffb0 Date: 2019-09-11T13:31:32.854Z Electron: 4.2.10 Chrome: 69.0.3497.128 Node.js: 10.11.0 V8: 6.9.427.31-electron.0 OS: Darwin x64 18.7.0

  • OS platform and version: OSX Mojave 10.14.4

  • NodeJS version: Hard to tell, my default is 12.6.0 but I'm never sure of what uses VS Code

  • React Native version: 0.59

  • Expo SDK version (include if relevant): SDK35

Outputs (Include if relevant)

  • Output of the Debug Console (View -> Toggle Debug Console):
Version: 1.38.1
Commit: b37e54c98e1a74ba89e03073e5a3761284e3ffb0
Date: 2019-09-11T13:31:32.854Z
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Darwin x64 18.7.0
  • Output of the React-Native output channel (View -> Toggle Output -> Select React-Native in ListBox):
[Info] Making sure your project uses the correct dependencies for Expo. This may take a while...

Checking if this is Expo app......
[Info] Starting Packager

┌──────────────────────────────────────────────────────────────────────────────┐
│                                                                              │
│  Running Metro Bundler on port 8081.                                         │
│                                                                              │
│  Keep Metro running while developing on any JS projects. Feel free to        │
│  close this tab and run your own Metro instance if you prefer.               │
│                                                                              │
│  https://github.com/facebook/react-native                                    │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

Looking for JS files in
   /Users/superandrew/code/tutelart-rn 

Loading dependency graph, done.
[Info] Packager started.

[Info] Prewarming bundle cache. This may take a while ...

[Info] Building and running application.

No issue with doctor-watchman-versionNo issue with doctor-watchman-versionNo issue with doctor-problem-checking-watchman-versionNo issue with doctor-problem-checking-watchman-versionNo issue with doctor-both-app-and-exp-jsonNo issue with doctor-both-app-and-exp-jsonNo issue with doctor-schema-validationNo issue with doctor-schema-validationNo issue with doctor-validate-asset-fieldsNo issue with doctor-validate-asset-fieldsNo issue with doctor-schema-validation-exceptionNo issue with doctor-schema-validation-exceptionNo issue with doctor-unversionedNo issue with doctor-unversionedNo issue with doctor-versions-endpoint-failedNo issue with doctor-versions-endpoint-failedNo issue with doctor-invalid-sdk-versionNo issue with doctor-invalid-sdk-versionNo issue with doctor-node-modules-missingNo issue with doctor-node-modules-missingNo issue with doctor-react-native-not-installedNo issue with doctor-react-native-not-installedNo issue with doctor-unoptimized-assetsNo issue with doctor-unoptimized-assetsTunnel ready.Tunnel ready.[Info] Enable JS Debugging

No issue with doctor-watchman-versionNo issue with doctor-watchman-versionNo issue with doctor-problem-checking-watchman-versionNo issue with doctor-problem-checking-watchman-versionNo issue with doctor-both-app-and-exp-jsonNo issue with doctor-both-app-and-exp-jsonNo issue with doctor-schema-validationNo issue with doctor-schema-validationNo issue with doctor-validate-asset-fieldsNo issue with doctor-validate-asset-fieldsNo issue with doctor-schema-validation-exceptionNo issue with doctor-schema-validation-exceptionNo issue with doctor-unversionedNo issue with doctor-unversionedNo issue with doctor-versions-endpoint-failedNo issue with doctor-versions-endpoint-failedNo issue with doctor-invalid-sdk-versionNo issue with doctor-invalid-sdk-versionNo issue with doctor-node-modules-missingNo issue with doctor-node-modules-missingNo issue with doctor-react-native-not-installedNo issue with doctor-react-native-not-installedNo issue with doctor-unoptimized-assetsNo issue with doctor-unoptimized-assets
  • Output of the Developer Tools console (Help -> Toggle Developer Tools -> Select Console tab):
[Extension Host] debugger listening on port 43571
workbench.desktop.main.js:sourcemap:3424 [jundat95.react-native-snippet]: Unknown language in `contributes.react-native-snippet.language`. Provided value: jsx
_logMessageInConsole @ workbench.desktop.main.js:sourcemap:3424
workbench.desktop.main.js:sourcemap:230 [Extension Host] [vscode-icons] v9.4.0 activated!
workbench.desktop.main.js:sourcemap:230 [Extension Host] (node:36943) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
t.log @ workbench.desktop.main.js:sourcemap:230
microsoft/vscode-react-native

Answer questions SounD120

Hi @superandrew and thanks for reaching us. I faced such behavior with Expo apps, and I found out that there is https: "false" line in .expo/settings.json file which is most likely blocks https requests inside the app. Could you please check your .expo/settings.json file and let us know if it contains such line?

useful!

Related questions

Error while executing command 'react-native.cmd run-android --no-packager' (error code 101) hot 4
Error while executing command 'react-native run-ios --simulator --no-packager' hot 2
Cannot read property 'getCurrentUserAsync' of undefined hot 1
Current workspace does not contain React Native projects hot 1
Could not debug - error code 604 hot 1
Current workspace does not contain React Native projects hot 1
Version 0.13 breaks running packager from VS Code from different folder hot 1
Error while executing command 'react-native.cmd run-android --no-packager': Error while executing command 'react-native.cmd run-android --no-packager' (error code 101) hot 1
Starting React packager from VSCode fails hot 1
Can't attach packager for debugging hot 1
Cannot bind listener: operation not permitted hot 1
Not all success patterns were matched. (error code 712) hot 1
Current workspace does not contain React Native projects hot 1
Cannot bind listener: operation not permitted hot 1
Could not debug - error code 604 hot 1
Github User Rank List