Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Regression: calling xdl.User.getCurrentUserAsync() throws an error on 56.1.* #864

Closed
ruslan-bikkinin opened this issue Jul 22, 2019 · 11 comments
Labels

Comments

@ruslan-bikkinin
Copy link

ruslan-bikkinin commented Jul 22, 2019

Description

Since 56.1.0 calling require("@expo/xdl").User.getCurrentUserAsync() throws an error TypeError: Cannot read property 'getCurrentUserAsync' of undefined.

Expected Behavior

Update @expo/xdl package to 56.1.0 (or 56.1.1) and continue using of require("@expo/xdl").User.getCurrentUserAsync() as it was before.

Observed Behavior

The following error is thrown:

TypeError: Cannot read property 'getCurrentUserAsync' of undefined
    at Object.<anonymous> (/media/akvelon/work/support/vscode-react-native/testapps/xdlUserIssueDemo/index.js:2:10)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

Environment

Please run expo diagnostics in the project folder and copy the output here:

  Expo CLI 3.0.2 environment info:
    System:
      OS: Linux 4.15 Ubuntu 18.04.2 LTS (Bionic Beaver)
      Shell: 4.4.20 - /bin/bash
    Binaries:
      Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
      Yarn: 1.16.0 - ~/.nvm/versions/node/v10.16.0/bin/yarn
      npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
    npmGlobalPackages:
      expo-cli: 3.0.2

Also specify:

  • Phone/emulator/simulator platform, model and version: it doesn't matter

Reproducible Demo

  • Clone the demo repo: git clone https://github.com/ruslan-bikkinin/xdluserissuedemo.git && cd xdluserissuedemo
  • Install packages: npm i
  • Run simple script utilizing User.getCurrentUserAsync(): node index.js (error will be thrown)
  • Fallback to 56.0.0: npm i @expo/xdl@56.0.0
  • Run script again: node index.js (No error will be thrown)
@SounD120
Copy link

SounD120 commented Aug 9, 2019

Hey guys, do you have any updates on this?

SounD120 added a commit to microsoft/vscode-react-native that referenced this issue Aug 9, 2019
SounD120 added a commit to microsoft/vscode-react-native that referenced this issue Aug 9, 2019
…y builds (#1068)

* Add process.env.NIGHTLY parameter processing

* Fixate xdl version in nightly builds due to: expo/expo-cli#864

* Fix VS Code version reading before downloading
@SounD120
Copy link

@ide Could you please take a look on this issue?

@SounD120
Copy link

Hi @fson . Are there any plans to fix this? I ask because this error causes an issues with Expo debugging scenarios in VS Code React Native Tools debugger.
Thank you.

@superandrew
Copy link

I'm adding my vote for this, because it forces us to uninstall and reinstall an older version of the package while on react native debugging

@bhall2001
Copy link

Adding my vote. Bummer that we have to downgrade to use the debugger in VS Code.

@ide
Copy link
Member

ide commented Sep 25, 2019

This would probably require time to test carefully but be straightforward to send a PR for, if someone would like to do that.

@ide ide unassigned fson Sep 25, 2019
@ide ide added the good first issue Good for newcomers label Sep 25, 2019
@superandrew
Copy link

@ide could you elaborate what should be done to fix it?

@ide
Copy link
Member

ide commented Sep 30, 2019

The root cause of this issue needs to be clearly identified and then a PR with the correct fix and a test plan needs to be submitted. Figuring out what that looks like is part of this work.

@zeight
Copy link

zeight commented Oct 14, 2019

Adding my vote, any updates?

@fson
Copy link
Contributor

fson commented Nov 4, 2019

xdl.User has been renamed to xdl.UserManager. Sorry for the inconvenience and for not having a release note to notify about this!

@SounD120
Copy link

SounD120 commented Nov 5, 2019

Thanks, @fson ! I'll take a look.

@lock lock bot added the outdated label May 5, 2020
@lock lock bot locked and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

7 participants