Giter Site home page Giter Site logo

Comments (19)

EthanChouTW avatar EthanChouTW commented on July 22, 2024 6

I'm getting this error on "react-native": "0.40.0","react-native-keychain": "^1.1.0" and fixes with import * as Keychain from 'react-native-keychain'; instead of import Keychain from 'react-native-keychain';

from react-native-keychain.

Kufert avatar Kufert commented on July 22, 2024 2

Thanks @vonovak, your comment helped me to get it working with android. In addition to the rnpm link, I had to add to MainApplication.java:

...
import com.oblador.keychain.KeychainPackage; // <-- added
....

    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
          new KeychainPackage() // <-- added

That fixed it for Android. Still need to sort out iOS though. FYI @oblador

from react-native-keychain.

Moumene avatar Moumene commented on July 22, 2024 2

Thanks for the response @akullpp
I did this before but what i was doing wrong is the import.
Import Keychain from 'react-native-keychain' instead of
Import * as Keychain .....

from react-native-keychain.

akullpp avatar akullpp commented on July 22, 2024 1

@Moumene see step 2: https://facebook.github.io/react-native/docs/linking-libraries-ios.html

from react-native-keychain.

iamlacroix avatar iamlacroix commented on July 22, 2024

I had the same issue, but a simple re-run of react-native run-ios fixed it for me. Hope this helps someone else who comes across this error.

from react-native-keychain.

Kufert avatar Kufert commented on July 22, 2024

@digitaldavenyc same here... I tried restarting, cleaning rebuilding and what not, but keep getting this error. did you manage so resolve it?

RN: 0.31, react-native-keychain: 3.2, iOS simulator

Update - I compiled the app for Android and run it on a device, and got the same error.

from react-native-keychain.

Kufert avatar Kufert commented on July 22, 2024

I run react-native init test, npm install react-native-keychain and rnpm link.
Then I copied the example code from the readme and run - and got the same error.. so it looks like something is broken when working with RN 0.31.

from react-native-keychain.

vonovak avatar vonovak commented on July 22, 2024

@Kufert I'm running it successfully on RN 0.31 on although I linked it with one of the previous versions. Have you tried it with npm install --save react-native-keychain?

from react-native-keychain.

vonovak avatar vonovak commented on July 22, 2024

@Kufert have you tried following the manual installation steps?

from react-native-keychain.

marcioadr88 avatar marcioadr88 commented on July 22, 2024

@Kufert same for me on iOS, can you get this working?

from react-native-keychain.

durangatan avatar durangatan commented on July 22, 2024

I'm getting this same error anytime I try to login on Android.

RN: 0.35
Keychain: 0.32
Genymotion Simulator

None of the above fixes have solved the problem for me. Can anyone verify that they've gotten it to work on Android with RN 0.35?

from react-native-keychain.

negebauer avatar negebauer commented on July 22, 2024

I'm having the same problem (iOS)
I followed the Readme instructions. Tried with react-native link, with rnpm link, using the Podfile and adding manually.

Still, I keep on getting the same error

{ [TypeError: undefined is not an object (evaluating 'RNKeychainManager.setGenericPasswordForService')]
	  line: 73951,
	  column: 18,
	  sourceURL: 'http://localhost:8081/index.ios.bundle?platform=ios&dev=true&minify=false' }

Any help?

from react-native-keychain.

oun avatar oun commented on July 22, 2024

I face the same problem and successfully solved by changing to version 0.3.2.

from react-native-keychain.

akullpp avatar akullpp commented on July 22, 2024

Any further information? Didn't work for me to change the downgrade the version. Using RN 0.40.0.

from react-native-keychain.

vonovak avatar vonovak commented on July 22, 2024

Please make sure the native module is linked correctly and that you're importing the js module correctly. If you use RN >= 0.40 you need to use the newest release.

from react-native-keychain.

akullpp avatar akullpp commented on July 22, 2024

Thanks, it works now with the latest version on RN >= 0.40 my issue was that the binary wasn't linked.

from react-native-keychain.

Moumene avatar Moumene commented on July 22, 2024

how did you mange to link the binary @akullpp ? i'm in the same error with keychain on ios simulator
thanks buddy

from react-native-keychain.

ferdicus avatar ferdicus commented on July 22, 2024

I feel dumb ... readme is correct and the example works,
don't bother with different imports and such.

package.json if you're wondering how similar it is to yours:

  "dependencies": {
    "react": "16.0.0-alpha.6",
    "react-native": "0.44.0",
    "react-native-i18n": "^1.0.0",
    "react-native-keychain": "^1.2.0",
    "react-native-vector-icons": "^4.1.1",
    "react-navigation": "^1.0.0-beta.11"
  },

I simply forgot to run react-native run-android thus not compiling the android side of things...

from react-native-keychain.

Bierrot avatar Bierrot commented on July 22, 2024

I had the same issue. I resolved it by running pod install on my iOS folder. Voilà, it's working now.

from react-native-keychain.

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.