Vscode-react-native: [Bug] [Error] XDLError: ValidationError: "devClient" is not allowed

Created on 29 Dec 2020  路  9Comments  路  Source: microsoft/vscode-react-native

I'm getting this error when trying to debug an Expo project.

[Error] XDLError: ValidationError: "devClient" is not allowed

The project previously worked without issue. Is this possibly connected to Expo v40? I can't remember if I've used debugging since updating a few weeks back.

Thanks!

bug investigating

Most helpful comment

I'm getting this error when trying to debug an Expo project.

[Error] XDLError: ValidationError: "devClient" is not allowed

The project previously worked without issue. Is this possibly connected to Expo v40? I can't remember if I've used debugging since updating a few weeks back.

Thanks!

  • [x] i solve my problem by remove .expo in my project folder

All 9 comments

I'm getting this error when trying to debug an Expo project.

[Error] XDLError: ValidationError: "devClient" is not allowed

The project previously worked without issue. Is this possibly connected to Expo v40? I can't remember if I've used debugging since updating a few weeks back.

Thanks!

@GollyJer me also , i get the same error

I'm getting this error when trying to debug an Expo project.

[Error] XDLError: ValidationError: "devClient" is not allowed

The project previously worked without issue. Is this possibly connected to Expo v40? I can't remember if I've used debugging since updating a few weeks back.

Thanks!

  • [x] i solve my problem by remove .expo in my project folder

Hi @GollyJer and thank you for the report. We have faced the similar problem while debugging an Expo SDK 40 project on an iOS simulator. Now we are investigating this issue. Could you please tell us which OS you are using and and which mobile platform you use for running the Expo application on (iOS or Android)? Could you please also send us your debug configuration for Expo from the launch.json file?

  • Windows 10
  • Android (real device) and iOS (real device)
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Debug Expo Project",
      "cwd": "${workspaceFolder}",
      "type": "reactnative",
      "request": "launch",
      "platform": "exponent",
      "openExpoQR": false,
      "expoHostType": "local"
    }
  ]
}

settings.json (in the .expo folder) was updated to include two new properties: scheme and devClient in this commit 13 days ago:
https://github.com/expo/expo-cli/commit/9e3cb1eb154d689d3c7fbe18345e6b32cf59ad7b#diff-412633fe3f2f4d6e1c8e75ab06fc6711542ec887fe07765f2aadbc0af93b381a

I can trigger this same error when using expo start, via the following steps:

  • Have latest expo-cli installed. (Currently 4.0.17)
  • Init a new project, e.g. expo init test -t blank
  • expo start then ctrl-c. This creates a settings.json file in the .expo folder that contains the new scheme property, but not yet the devClient property.
  • expo start again. It is at this point that I see a devClient=false property inside settings.json.
  • ctrl-c then downgrade expo-cli to a previous version (I used latest 3.x version, 3.28.6)
  • expo start again and the ValidationError: "devClient" is not allowed error message is seen, because expo-cli is using the cached settings.json from .expo that includes devClient.
  • Deleting the .expo folder at this point and forcing expo-cli to recreate it at the next expo-start with correct settings for this version of expo-cli will resolve the issue.
  • Alternatively, updating to the latest expo-cli version should also resolve this issue, but that is not always desirable as it can cause other compatibility issues.

@minaelee, thank you for the investigation, we also came to the same conclusion.

Under the hood the extension uses @expo/xdl package to run Expo apps. The extension downloads the latest version of the package on the fist start of Expo debugging and then uses the cached package. Due to the latest changes in Expo-CLI, the old cached @expo/xdl package mightn't support the added parameters in .expo/settings.json file. The easiest way to update @expo/xdl package on your side is to reinstall the extension.

@GollyJer Could you please reinstall the extension the following way and then try to debug an Expo app again?

  • Uninstall the extension
  • Close VS Code
  • Open VS Code
  • Install the extension

Please let us know about your results.

@RedMickey That worked. Thanks!

in my case it was because I was running node 10 via nvm instead of node 14

in my case it was because I was running node 10 via nvm instead of node 14

Hey, having the same issue here configuring a new Mac M1. The thing is the version of Expo I use don't support Node 14. What did you do?

Edit: Updating Expo CLI fixed it for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AlexandreLouisnard picture AlexandreLouisnard  路  3Comments

molant picture molant  路  3Comments

vsccarl picture vsccarl  路  3Comments

yuki2006 picture yuki2006  路  5Comments

andreyleonardo picture andreyleonardo  路  3Comments