Comments (11)
@vonovak: care to look at this?
from react-native-keychain.
The code that causes the issue:
const Config = {portalUrl: 'https://www.myurl.com/'};
...
componentDidMount() {
....
Keychain.getInternetCredentials(Config.portalUrl)
.then(credentials => {
let {username: email, password} = credentials;
this.setState({email, password});
});
}
_signIn() {
Auth.signIn(this.state.email, this.state.password)
.then(user => {
if (user) {
....
// Save login info
Keychain.setInternetCredentials(
Config.portalUrl,
this.state.email,
this.state.password
).catch(err => console.error(err));
}
})
}
Not sure that these logs are too helpful, but here they are.
Logs in v0.3.0 for getInternetCredentials
:
05-31 18:37:26.469 23797 24840 D KeychainModule : will attempt to decrypt for https://www.myurl.com/AQL2cswUfqA18qpsjApUJdf5tlJnM/B0eEWQ2XirtXDSlLI+SrdHKH3mYlk4idiAelmwWgM=
05-31 18:37:26.469 23797 24840 D KeychainModule : :AQJd2LLAUciJghFPh53t6f41Kdk7xt2J0tqc5ZSnB41QsEVLYqw=
05-31 18:37:26.512 23797 24839 I ReactNativeJS: 'convertError@http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:112986:17\nhttp://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:112883:20\n__invokeCallback@http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:6760:15\nhttp://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:6643:24\nguard@http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:6588:3\ninvokeCallbackAndReturnFlushedQueue@http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false:6642:6\ninvokeCallbackAndReturnFlushedQueue@[native code]\nglobal code'
05-31 18:37:26.513 23797 24839 E ReactNativeJS: [Error: Error]
05-31 18:37:26.520 23797 24840 E unknown:React: Error, stack:
05-31 18:37:26.520 23797 24840 E unknown:React: convertError@112986:17
05-31 18:37:26.520 23797 24840 E unknown:React: <unknown>@112883:20
05-31 18:37:26.520 23797 24840 E unknown:React: __invokeCallback@6760:15
05-31 18:37:26.520 23797 24840 E unknown:React: <unknown>@6643:24
05-31 18:37:26.520 23797 24840 E unknown:React: guard@6588:3
05-31 18:37:26.520 23797 24840 E unknown:React: invokeCallbackAndReturnFlushedQueue@6642:6
Logs in my branch for getInternetCredentials
:
05-31 19:00:00.737 31125 31180 D KeychainModule : will attempt to decrypt for https://www.myurl.com/AQJ4cojg/0e7HOtsRCuvSELsHD2dCNBE/Bu5U9WBuFN/Aj1L74bS/A9b5tUTuX6kFEuLDIQ=
05-31 19:00:00.737 31125 31180 D KeychainModule : :AQJznomEHe5kav/afbJUxc5u+suv47bzc/3gjwyn8zl3XM5w6sI=
from react-native-keychain.
bummer. @codyhazelwood this happens when no credentails are saved or are they there and it fails when decrypting? i see they are there
[Error: Error] helpful :D
from react-native-keychain.
@codyhazelwood do you have the libconceal libraries in build directory?
running git diff on my branch and yours shown only this one change - removal of the libconceal libraries from android lib directory and the change in converError. I suppose they would install from maven during android build..
..or is the problem with the convertError method? will take a look
does your branch work with the latest commit that changed the converError method?
from react-native-keychain.
@codyhazelwood did you test after changing
if (Platform.OS === 'android') {
return err;
}
to
if (Platform.OS === 'android') {
return new Error(err);
}
? It works for me when I revert the change, i.e. the first snippet works. although I'm using genericPassword not internetPassword but that can't make a difference
@oblador https://github.com/oblador/react-native-keychain/blob/master/index.js#L44 any reason why convertError is called twice?
from react-native-keychain.
@vonovak: no that looks like a bug to me.
from react-native-keychain.
This module is pretty ripe for a refactor tbh :-) Would like to use native promise support instead for example which would make the codebase cleaner, do automatic error conversion and even provide a native stack trace. Will break some backwards compatibility though, but likely not an issue.
from react-native-keychain.
@codyhazelwood try the index.js file from my android branch.. it works for me.
from react-native-keychain.
Sorry, I just noticed when I was testing that I had locked my package.json to the commit before, without the error handling change. @vonovak your latest index.js works fine.
from react-native-keychain.
PR #22
from react-native-keychain.
Released as 0.3.1
from react-native-keychain.
Related Issues (20)
- android linux crash HOT 1
- How to store my password keychain in Android keystore using react-native-keychain
- Encrypt and decrypt failing on latest Samsung OS HOT 10
- Warning when using SetGenericPassword with service HOT 2
- No podspec found for `RNKeychain`
- Fingerprint Bypass using Frida and Objection techniques HOT 1
- Using it together with native iOS project HOT 2
- Android crash from adding react-native-keychain package HOT 1
- Unrecognized platform name visionOS error HOT 8
- iOS & android keychain items are not erased when the app is uninstalled HOT 1
- Pods install failed with Invalid `RNKeychain.podspec` file: undefined method `visionos' for #<Pod::Specification name="RNKeychain" HOT 5
- App crash on launch - Only happens on Huawei devices
- Replace `SharedPreferences` with `DataStore` Preferences on Android HOT 2
- Cold start on android took 5-10 seconds longer than before the library update HOT 9
- Example project not building iOS HOT 3
- [RN-Android]: Not able to retrieve credentials from App B after storing credentials from App A. HOT 1
- Android build failed after upgrading to java 21
- Issue building app 8.1.2, 8.1.2 and 8.2.0 HOT 1
- Understanding the key store access life cycle.
- [Enhancement] Support for Passkey
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-keychain.