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!
source:https://uonfu.com/
Github User Rank List