profile
viewpoint

Ask questionsCannot read property 'getCurrentUserAsync' of undefined

Issue

  1. I am unable to debug in exponent due to error "Cannot read property 'getCurrentUserAsync' of undefined".

Software versions

  • React-Native VS Code extension version: 0.10.2
  • VSCode version: 1.35.1
  • OS platform and version: Ubuntu 16.04, Linux x64 4.4.0-154-generic
  • NodeJS version: 10.2.0
  • React Native version: 0.59.8
  • Expo SDK version (include if relevant):33.0.0

Outputs (Include if relevant)

  • Output of the Debug Console (View -> Toggle Debug Console):
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
  • 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
   /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
  • Output of the Developer Tools console (Help -> Toggle Developer Tools -> Select Console tab):
/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
microsoft/vscode-react-native

Answer questions abhinavkhajuria

Thanks, @ruslan-bikkinin, it worked for me.

useful!

Related questions

[Error] TypeError: ConfigUtils(...).configFilenameAsync is not a function hot 134
Can't attach packager for debugging hot 106
Error while executing command 'react-native.cmd run-android --no-packager' (error code 101) hot 99
/bin/sh: 1: adb: not found on Linux hot 55
Cannot bind listener: operation not permitted hot 49
Error while executing command 'react-native run-ios --simulator --no-packager' hot 39
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 33
Cannot bind listener: operation not permitted hot 23
Current workspace does not contain React Native projects hot 22
Unable to resolve module `../Components/AccessibilityInfo/AccessibilityInfo` message hot 21
Version 0.13 breaks running packager from VS Code from different folder hot 15
Could not debug - error code 604 hot 13
Not all success patterns were matched. (error code 712) hot 12
Current workspace does not contain React Native projects hot 11
Expo app doesn't connect to packager hot 10
Github User Rank List