OS: linux x64
Adapter node: v10.2.0 x64
vscode-chrome-debug-core: 6.7.46
Could not debug. Cannot read property 'getCurrentUserAsync' of undefined
[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
/home/dj/Desktop/Myapp
[Info] Packager started.
[Info] Prewarming bundle cache. This may take a while ...
[Info] Building and running application.
[Error] TypeError: Cannot read property 'getCurrentUserAsync' of undefined
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:238 [Extension Host] rejected promise not handled within 1 second: TypeError: Cannot read property 'getCurrentUserAsync' of undefined
t.log @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:238
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:238 [Extension Host] stack trace: TypeError: Cannot read property 'getCurrentUserAsync' of undefined
at getPackage.then (/home/dj/.vscode/extensions/msjsdiag.vscode-react-native-0.10.2/src/extension/exponent/xdlInterface.js:62:33)
at _fulfilled (/home/dj/.vscode/extensions/msjsdiag.vscode-react-native-0.10.2/node_modules/q/q.js:834:54)
at Promise.then.Q.nextTick.self.promiseDispatch.done (/home/dj/.vscode/extensions/msjsdiag.vscode-react-native-0.10.2/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/home/dj/.vscode/extensions/msjsdiag.vscode-react-native-0.10.2/node_modules/q/q.js:796:13)
at /home/dj/.vscode/extensions/msjsdiag.vscode-react-native-0.10.2/node_modules/q/q.js:857:14
at runSingle (/home/dj/.vscode/extensions/msjsdiag.vscode-react-native-0.10.2/node_modules/q/q.js:137:13)
at flush (/home/dj/.vscode/extensions/msjsdiag.vscode-react-native-0.10.2/node_modules/q/q.js:125:13)
at process._tickCallback (internal/process/next_tick.js:61:11)
t.log @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:238
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:1406 ERR Cannot read property 'getCurrentUserAsync' of undefined: TypeError: Cannot read property 'getCurrentUserAsync' of undefined
at getPackage.then (/home/dj/.vscode/extensions/msjsdiag.vscode-react-native-0.10.2/src/extension/exponent/xdlInterface.js:62:33)
at _fulfilled (/home/dj/.vscode/extensions/msjsdiag.vscode-react-native-0.10.2/node_modules/q/q.js:834:54)
at Promise.then.Q.nextTick.self.promiseDispatch.done (/home/dj/.vscode/extensions/msjsdiag.vscode-react-native-0.10.2/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/home/dj/.vscode/extensions/msjsdiag.vscode-react-native-0.10.2/node_modules/q/q.js:796:13)
at /home/dj/.vscode/extensions/msjsdiag.vscode-react-native-0.10.2/node_modules/q/q.js:857:14
at runSingle (/home/dj/.vscode/extensions/msjsdiag.vscode-react-native-0.10.2/node_modules/q/q.js:137:13)
at flush (/home/dj/.vscode/extensions/msjsdiag.vscode-react-native-0.10.2/node_modules/q/q.js:125:13)
at process._tickCallback (internal/process/next_tick.js:61:11)
/usr/share/code/resources/app/out/vs/workbench/workbench.main.js:238 [Extension Host] (node:7564) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
t.log @ /usr/share/code/resources/app/out/vs/workbench/workbench.main.js:238
Same problem occurs with the configuration below :
VSCODE Version: 1.36.1
React-Native VS Code extension version: 0.10.2
Node.js: 10.15.1
OS: Win32 x64
Expo: 3.0.2
Update : Reverting back to 0.10.0 didn't solve the problem. Other IDE functions are working properly
Hi guys, thanks for letting us know. It seems to be an @expo/xdl package regression: https://github.com/expo/expo-cli/issues/864. To workaround it simply reinstall @expo/xdl package in extension directory:
cd YOUR_HOME_DIRECTORY/.vscode/extensions/msjsdiag.vscode-react-native-0.10.2 npm uni --no-save @expo/xdlnpm i --no-save @expo/[email protected]When the original issue will be resolved and expo will release a patch, just reinstall the extension and problem will go away automatically.
Thanks, @ruslan-bikkinin, it worked for me.
thanks @ruslan-bikkinin , that worked like a charm.
Thanks, @ruslan-bikkinin, it worked. You saved my day.
thanks, helped a lot
it really worked for me!
@ruslan-bikkinin answer works, but you will need repeat the process if the vscode-react-native gets updated, mine now is msjsdiag.vscode-react-native-0.11.0
@jaikme unfortunately, yes. We can't do much about it because this is Expo issue. If you want to get it resolved quicker, I'd suggest to go to the issue page and vote for it/leave a comment.
So, I apply the @expo/xdl downgrade workaround suggested by @ruslan-bikkinin above, which gets rid of the get "Cannot read property 'getCurrentUserAsync' of undefined" and everything appears to be good. However, when I try to run the app in my android Expo client app, I get a message that the "Packager not running at...." and it all comes to a stop. Running VS code1.38 with React Native Tools 0.11 but have also tried earlier versions with the same result. Any ideas anyone?
Most helpful comment
Hi guys, thanks for letting us know. It seems to be an
@expo/xdlpackage regression: https://github.com/expo/expo-cli/issues/864. To workaround it simply reinstall@expo/xdlpackage in extension directory:cd YOUR_HOME_DIRECTORY/.vscode/extensions/msjsdiag.vscode-react-native-0.10.2npm uni --no-save @expo/xdlnpm i --no-save @expo/[email protected]When the original issue will be resolved and expo will release a patch, just reinstall the extension and problem will go away automatically.