Code Monkey home page Code Monkey logo

Comments (26)

wuno avatar wuno commented on August 29, 2024 3

On a fresh install I have this same issue. For my use case I do not want to use any of the other features. I just need a clean way of accepting a pin from a user.

The flow I am trying to accomplish is like this,

The first time a user uses the application -

  • User enters a pin.
  • User verifies the pin a second time.
  • I never store the pin on the phone and instead I encrypt some data in the mobile app with the pin.

The next time the user uses the mobile app I request their pin to decrypt their saved data -

  • Once the user's data is decrypted, they have access to use the mobile application as a logged in user.

On a fresh install, I see the error mentioned above,

Cannot read property 'SECURITY_LEVEL_ANY' of undefined

Example of usage,

npm install --save @haskkor/react-native-pincode

import PINCode from '@haskkor/react-native-pincode';

class Auth extends Component {
  render() {
    return (
      <Container style={styles.container}>
        <PINCode
          status="choose"
          finishProcess={async () => {
            this.props.navigation.navigate('someNewPage');
          }}
          maxAttempts={5}
          pinCodeVisible={true}
          storePin={pin => this._HandleStoredPin(pin)}
        />
      </Container>
    );
  }
}

from react-native-pincode.

thaiphan avatar thaiphan commented on August 29, 2024 2

Have you guys tried running the following commands?

yarn add react-native-keychain
cd ios
pod install

from react-native-pincode.

kevinwolfcr avatar kevinwolfcr commented on August 29, 2024 1

@Haskkor this is because this package is requiring react-native-keychain@^3.0.0-rc.3, I created PR #72 locking the version to the last stable version.

from react-native-pincode.

jeremy-farnault avatar jeremy-farnault commented on August 29, 2024 1

I at last experienced this issue when upgrading keychain to 5.0.1.
However following this: oblador/react-native-keychain#221
And then the instructions on keychain:

Run yarn add react-native-keychain

1 a. Only for React Native <= 0.59: $ react-native link react-native-keychain and check MainApplication.java to verify the package was added. See manual installation below if you have issues with react-native link.

it fixed itself.
I don't know what else can cause this.

from react-native-pincode.

MrRefactor avatar MrRefactor commented on August 29, 2024

I've got same issue

from react-native-pincode.

jeremy-farnault avatar jeremy-farnault commented on August 29, 2024

Hi there,

I can't reproduce it. Did you link the libraries etc?

Cheers,
Jeremy

from react-native-pincode.

MrRefactor avatar MrRefactor commented on August 29, 2024

Well, I've just reinstalled that today and its working, at monday I did it several times and it didnt work. Now working just fine.

from react-native-pincode.

jeremy-farnault avatar jeremy-farnault commented on August 29, 2024

Thanks for the feedback.
I'll leave this open and keep on investigating.

Cheers,
Jeremy

from react-native-pincode.

tskorupka avatar tskorupka commented on August 29, 2024

@Haskkor try without permissions for fingerprint I think that fixed it in my case.

from react-native-pincode.

jeremy-farnault avatar jeremy-farnault commented on August 29, 2024

Hey,

I'm so sorry to read that as I can't reproduce. Could any of you try to use a previous version (1.12.2 might be a good one) and tell me if it fixes the issue? If so, I'll rollback the changes and keep on investigating.

Thanks,
Jeremy

from react-native-pincode.

athulmurali avatar athulmurali commented on August 29, 2024

I installed it today and facing the same issue.

Once, I import the package I am getting this issue.
import PINCode from '@haskkor/react-native-pincode'

from react-native-pincode.

jeremy-farnault avatar jeremy-farnault commented on August 29, 2024

Thanks for that.
It's merged. Help it'll fix it for you all.

from react-native-pincode.

nileshprajapati007444 avatar nileshprajapati007444 commented on August 29, 2024

I have same error. can anyone help me to fix it ?

from react-native-pincode.

kevinwolfcr avatar kevinwolfcr commented on August 29, 2024

I have the same error. can anyone help me to fix it?

It is weird since dependency was locked on the PR I opened.

  • May you have a package-lock.json or a yarn.lock that may be still downloading the buggy version?
  • Did you upgrade to latest version of react-native-pincode?

from react-native-pincode.

TchernyavskyDaniil avatar TchernyavskyDaniil commented on August 29, 2024

I have same issue for new version of react-native-pincode

from react-native-pincode.

gokulanath avatar gokulanath commented on August 29, 2024

I have the same issue in v1.21.1
react-native - v0.59.9

from react-native-pincode.

k-varma avatar k-varma commented on August 29, 2024

I am getting same is in 0.61.0, But it was working fine in the same version yesterday, i have did some changes for iOS and reverted them, but still get the issue

from react-native-pincode.

akhilsanker avatar akhilsanker commented on August 29, 2024

Hi @wuno ,
Have you solved the error?
I am facing the same error.

from react-native-pincode.

akhilsanker avatar akhilsanker commented on August 29, 2024

Any solution?

from react-native-pincode.

akhilsanker avatar akhilsanker commented on August 29, 2024

@tskorupka
Is this is working component??

from react-native-pincode.

jeremy-farnault avatar jeremy-farnault commented on August 29, 2024

Hi @akhilsanker
I'm really sorry to hear that you can't make it work. It's working fine for us and it's used by 50+ other repos...
I really don't know why some of you are experiencing this issue...

from react-native-pincode.

fonderkin avatar fonderkin commented on August 29, 2024

Same problem
react-native-keychain 3.1.3
react-native 0.61.5
react-native-pincode 1.21.1 "

Solved
Manual installation of react-native-keychain helped

npm install react-native-keychain

from react-native-pincode.

ftlno avatar ftlno commented on August 29, 2024

Same problem..
"react-native-keychain": "^4.0.5",
"react-native": "0.61.5",

I have tried automatic, cocoapods and manual install. iOS is building successfully. But when I import * as Keychain from 'react-native-keychain'; in RN, I am getting null is not an object (evaluating 'RNKeychainManager.SECURITY_LEVEL_ANY')

Please help :)

from react-native-pincode.

EliaFederico avatar EliaFederico commented on August 29, 2024

It is because last version (1.21.1) did update again the dependency 'react-native-keychain' to 3.1.3.

I solved this problem downgrading this library to version 1.21.0 which uses 'react-native-keychain' v3.0.0

from react-native-pincode.

jeremy-farnault avatar jeremy-farnault commented on August 29, 2024

Is this solution working ok for all of you?
If so I'll downgrade keychain back to v3.0.0 😄
Thanks @EliaFederico

from react-native-pincode.

cihanbas avatar cihanbas commented on August 29, 2024

I had same problem but when i installed react-native-keychain then this problem solved

from react-native-pincode.

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.