Code Monkey home page Code Monkey logo

Comments (16)

gaguirre avatar gaguirre commented on August 19, 2024 2

@GeoffreyPlitt would you mind to try the (hopefully) fix I just pushed to the fix/48 branch?

To do that replace in your package.json this line

"react-native-facebook-account-kit": "[email protected]:underscopeio/react-native-facebook-account-kit.git#fix/48"

then run npm install and finally run the tests again.

Thanks! I'll wait to your answer :)

from react-native-facebook-account-kit.

GeoffreyPlitt avatar GeoffreyPlitt commented on August 19, 2024 1

Sorry for the late replace, but that seems to have fixed it! Merge away, thanks.

from react-native-facebook-account-kit.

GeoffreyPlitt avatar GeoffreyPlitt commented on August 19, 2024

Follow-up: We've definitely done all of the "react-native link" (equivalent to rnpm link) stuff correctly. If we hadn't, it wouldn't work in simulators/devices-- and it works fine in both android/ios simulators and devices.

So this issue is specific to mocha tests, and specific to the Babel integration, transpiling, etc.

from react-native-facebook-account-kit.

gaguirre avatar gaguirre commented on August 19, 2024

Thanks for submitting a new issue @GeoffreyPlitt
I'll take a look on this days! Please post any update you have on this ;)

from react-native-facebook-account-kit.

GeoffreyPlitt avatar GeoffreyPlitt commented on August 19, 2024

Thanks! Here's something new: I suspect the solution might be to make sure this module is compile-able with the "react-native" Babel preset, see https://github.com/facebook/react-native/tree/master/babel-preset

from react-native-facebook-account-kit.

GeoffreyPlitt avatar GeoffreyPlitt commented on August 19, 2024

More context: This doesn't involve either Android or iOS. We're using the framework from https://github.com/futurice/pepperoni-app-kit#testing-setup, and https://github.com/lelandrichardson/react-native-mock so that the Mocha tests can run on the RN codebase without actually touching Android/iOS stuff.

from react-native-facebook-account-kit.

GeoffreyPlitt avatar GeoffreyPlitt commented on August 19, 2024

I got a notification about this comment, but it seemed to have dissapeared, and yet is relevant. Yesteray, Maijid Moujaled said:

I'm seeing this on a fresh react-native project built with 'react-native init MyProject', then npm installed account kit and linked using.

npm install --save react-native-facebook-account-kit
react-native link react-native-facebook-account-kit

As soon as I add the import lines,

import AccountKit, {
Color,
StatusBarStyle,
} from 'react-native-facebook-account-kit'

It shows the exact same error. So I don't think it's confied to just the mocha testing..

from react-native-facebook-account-kit.

GeoffreyPlitt avatar GeoffreyPlitt commented on August 19, 2024

@gaguirre Do you think you can look at this soon?

from react-native-facebook-account-kit.

gaguirre avatar gaguirre commented on August 19, 2024

Hi @GeoffreyPlitt, I can't right now. Maybe I can take a look tonight.
Would you like to send a PR? It would be great if you could!

from react-native-facebook-account-kit.

GeoffreyPlitt avatar GeoffreyPlitt commented on August 19, 2024

@gaguirre I would love to! But I don't know how. The error message showing is NOT enough to solve the problem. This one needs native android expertise from the person who wrote the module.

I time this week, so if you can tell me how to fix it, I can send a PR.

Again, need help because the error message is frustratingly giving no indication of what the bad JSON is, or what in JS land triggered this.

===> Can any other module authors help?

from react-native-facebook-account-kit.

gaguirre avatar gaguirre commented on August 19, 2024

I figured out what's happening (I hope).
Our module creates an instance of RNAccountKit class and its constructor is calling to a NativeModules.RNAccountKit method, which is not defined at all. So this will crash when requiring react-native-facebook-account-kit.

Let me do a quick fix and try it again! I'll let you know ;)

from react-native-facebook-account-kit.

yapitsmalvinder avatar yapitsmalvinder commented on August 19, 2024

Hi @gaguirre
Still facing the same issue
wasted complete day on the same

from react-native-facebook-account-kit.

gaguirre avatar gaguirre commented on August 19, 2024

Hi @yapitsmalvinder,
Which error are you facing exactly? This issue was fixed from version 0.5.2

from react-native-facebook-account-kit.

yapitsmalvinder avatar yapitsmalvinder commented on August 19, 2024

@gaguirre
[please excuse my writing style/words - a newbie]
I am importing
I am using ver: 0.9.0

import AccountKit, { Color, StatusBarStyle } from 'react-native-facebook-account-kit';

Whenever I do
AccountKit.configure()
or any other method
like:
AccountKit.getCurrentAccesToken()

It says
TypeError: cannot read property 'getCurrentAccesToken' of undefined

simulator screen shot - iphone 6 - 2017-12-06 at 19 09 57

from react-native-facebook-account-kit.

gaguirre avatar gaguirre commented on August 19, 2024

Probably the module is not correctly linked.
Try re-installing this module. Follow the Installation and Configuration steps.

from react-native-facebook-account-kit.

yapitsmalvinder avatar yapitsmalvinder commented on August 19, 2024

@gaguirre
Followed all the processes thoroughly
4 times
tried different projects to do the same
Still the same issue:

react: 16.0.0
react-native: 0.50.4
react-native-facebook-account-kit: 0.9.0

from react-native-facebook-account-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.