nicolaslopezj / meteor-apollo-accounts

Meteor accounts in GraphQL
MIT License
146 stars 37 forks source link

RN: Crash on Android when trying to loginWithFacebook #85

Open Almaju opened 6 years ago

Almaju commented 6 years ago

This works perfectly on iOS but I get a crash on Android.

I use Expo and the bundled Expo Facebook Login feature. I can properly get the status and token but when calling await loginWithFacebook({ accessToken: token }, apollo);, here is what I get:

undefined is not a function (evaluating 'Object.setPrototypeOf(_this, ApolloError.prototype)')
ApolloError
    bundle.umd.js:145:22
error

error
    zen-observable.js:198:24
error
    bundle.umd.js:19:8
error
    zen-observable.js:198:24
error
    zen-observable.js:198:24
<unknown>

tryCallOne
    core.js:37:14
<unknown>
    core.js:123:25
<unknown>
    JSTimers.js:301:23
_callTimer
    JSTimers.js:154:6
_callImmediatesPass
    JSTimers.js:202:17
callImmediates
    JSTimers.js:470:11
__callImmediates
    MessageQueue.js:329:4
<unknown>
    MessageQueue.js:147:6
__guardSafe
    MessageQueue.js:316:6
flushedQueue
    MessageQueue.js:146:17
callFunctionReturnFlushedQueue
    MessageQueue.js:121:11

Here are my dependencies:

"dependencies": {
    "@expo/vector-icons": "^6.2.2",
    "apollo-boost": "^0.1.3",
    "expo": "^25.0.0",
    "graphql": "^0.13.2",
    "graphql-tag": "^2.8.0",
    "lodash": "^4.17.5",
    "meteor-apollo-accounts": "^2.0.3",
    "moment": "^2.21.0",
    "prop-types": "^15.6.0",
    "react": "^16.2.0",
    "react-apollo": "^2.1.0",
    "react-native": "https://github.com/expo/react-native//archive/sdk-25.0.0.tar.gz",
    "react-native-animatable": "^1.2.4",
    "react-native-easy-grid": "^0.1.17",
    "react-native-google-places-autocomplete": "^1.3.6",
    "react-native-iphone-x-helper": "^1.0.2",
    "react-native-maps-directions": "^1.6.0",
    "react-native-modal-datetime-picker": "^4.13.0",
    "react-native-router-flux": "^4.0.0-beta.28",
    "react-native-segmented-control-tab": "^3.2.2",
    "react-native-status-bar-height": "^2.0.0",
    "react-native-vector-icons": "^4.5.0",
    "react-redux": "^5.0.7",
    "redux": "^3.7.2",
    "redux-form": "^7.3.0"
},
Almaju commented 6 years ago

After some investigations, it's related to apollo-client@2.2.8. Downgrading to 2.2.7 solved the issue.

See: https://github.com/apollographql/apollo-client/issues/3236