Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot register device to <API>/1.1/installations #642

Open
Royovo opened this issue May 18, 2021 · 4 comments
Open

Cannot register device to <API>/1.1/installations #642

Royovo opened this issue May 18, 2021 · 4 comments

Comments

@Royovo
Copy link

Royovo commented May 18, 2021

Versions

    "leancloud-installation": "^2.0.1",
    "leancloud-storage": "^4.10.1",

Error

Source

undefined is not a function (near '...}).finally(function () {...') [N/A POST https://xxxxxxxx.push/lncldglobal.com/1.1/installations]

av-core.js (1992:17)


Call Stack

ajax._catch$argument_0
  av-core.js:1992:17

microtask$argument_0
  ex.promise.js:117:29

flush
  microtask.js:27:11

tryCallOne
  core.js:37:14

setImmediate$argument_0
  core.js:123:25

flushedQueue
  [native code]

invokeCallbackAndReturnFlushedQueue
  [native code]

Way to reproduce

  1. Fresh installed RN project
  2. Follow the instructions on: How to Install the JavaScript SDK and the Demo
  3. Error!

Please help to resolve

@leeyeh
Copy link
Contributor

leeyeh commented May 18, 2021

Which version of RN are you using?

@Royovo
Copy link
Author

Royovo commented May 20, 2021

Which version of RN are you using?

react 17.0.1
react-native 0.64.0

@leeyeh
Copy link
Contributor

leeyeh commented May 20, 2021

leancloud-installation was updated 4 years ago and targeted leancloud-storage@3. Things has been significantly changed since the last update.

The error message suggested (Promise)#finally is not defined. This is not expected as you are using the latest RN. Another guess is that another leancloud-storage@3 was auto installed as a peerDependencies of leancloud-installation。You can check if it is true by npm ls leancloud-storage

If It is not the case, would you please provide a minimal reproducable example? Thanks.

@Royovo
Copy link
Author

Royovo commented May 20, 2021

Here is the output. Why it is invalid?

❯ npm ls leancloud-storage
sun-trip-app@0.0.1 /Users/xxxxxxxxxxx/Documents/Projects/xxxxxxxxxxx/app
├─┬ leancloud-installation@2.0.1
│ └── leancloud-storage@4.10.1 deduped invalid
└── leancloud-storage@4.10.1 invalid

npm ERR! code ELSPROBLEMS
npm ERR! invalid: leancloud-storage@4.10.1 /Users/xxxxxxxxxxx/Documents/Projects/xxxxxxxxxxx/app/node_modules/leancloud-storage

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/xxxxxxxxxxx/.npm/_logs/2021-05-20T06_55_01_219Z-debug.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants