Error while login into AWS through google in react native - javascript

I working on AWS login through google. I'm following this link https://github.com/patw0929/react-native-cognito-login-example but I'm getting problem with AWS. I have added the lib for aws-sdk-react-native-core as in the link But I'm getting error while running the app.
java:45: error: method does not override or implement a method from a supertype
#Override
^
Note: C:\Users\krishna21\Awsslogin\node_modules\aws-sdk-react-native-core\android\src\main\java\com\amazonaws\reactnative\core\BackgroundRunner.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':aws-sdk-react-native-core:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
I have added aws-sdk-react-native-core manually.

John,
1. First of all, the library which you are using is old and try using AWS Amplify instead, which is far superior in features and it been tested for security and errors.
2. In AWS Federated Login can be done in 2 ways, one using Cognito User
Pool as well as using Cognito Identity Pool. I hope you are using
Cognito Identity Pool.
3. Please add the Google Client ID in Edit identity pool->Authentication providers->Google+
4. Whitelist the domain which you are hitting in Google Developer
account.
Full documention is here https://itnext.io/google-sign-in-using-aws-amplify-and-amazon-cognito-69cc3bf219ad
https://aws.amazon.com/blogs/mobile/amplify-framework-adds-authentication-features-and-enhancements-for-ios-and-android-mobile-sdks/

Related

Trying to use Amplify withAuthenticator, throwing error?

I am trying to sign in on AWS amplify using the withAuthenticator. I am able to make an account but as soon as I try to log in with the correct credentials I always encounter this error.
I am running the app on Expo ios device and the user is saved in cognito. It won't let me sign in and I keep getting this error though.
[ERROR] 49:25.730 AuthClass - Failed to get the signed in user, [Error: Failed to create storage directory.Error Domain=NSCocoaErrorDomain Code=512 "The file “ExponentExperienceData” couldn’t be saved in the folder “Documents”." UserInfo={NSFilePath=/Users/****/Library/Developer/CoreSimulator/Devices/A8619F07-3B7B-47DE-BD92-21B3E8FAB9CE/data/Containers/Data/Application/7CAFFBF4-B523-4E2F-B108-94B0940675C1/Documents/ExponentExperienceData, NSUnderlyingError=0x600002749dd0 {Error Domain=NSPOSIXErrorDomain Code=20 "Not a directory"}}]
at node_modules/#aws-amplify/core/lib-esm/Logger/ConsoleLogger.js:99:15 in prototype._log
at node_modules/#aws-amplify/core/lib-esm/Logger/ConsoleLogger.js:170:23 in prototype.error
at node_modules/#aws-amplify/auth/lib-esm/Auth.js:520:40 in __generator$argument_1
at node_modules/#aws-amplify/auth/node_modules/tslib/tslib.js:141:30 in step
at node_modules/#aws-amplify/auth/node_modules/tslib/tslib.js:122:60 in <anonymous>
at node_modules/#aws-amplify/auth/node_modules/tslib/tslib.js:113:68 in rejected
I have tried creating new accounts as well as trying to use another device. I get the same error.

Cypress Test Runner unexpectedly exited via a exit event with signal SIGSEGV in circleCI

I am stuck in this problem. I am running cypress tests. When I run locally, it runs smoothly. when I run in circleCI, it throws error after some execution.
Here is what i am getting:
[334:1020/170552.614728:ERROR:bus.cc(392)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[334:1020/170552.616006:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[334:1020/170552.616185:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[521:1020/170552.652819:ERROR:gpu_init.cc(441)] Passthrough is not supported, GL is swiftshader
Current behavior:
When I run my specs headless on the circleCI, Cypress closed unexpectedly with a socket error.
Error message:
The Test Runner unexpectedly exited via a exit event with signal
SIGSEGV
Please search Cypress documentation for possible solutions:
https://on.cypress.io
Platform: linux (Debian - 10.5)
Cypress Version: 8.6.0
Issue resolved by reverting back cypress version to 7.6.0.
I had this same issue on within our Azure builds as well. We only recently migrated from Cypress 8.4.0. Going back to that has solved the problem.
downgrade the cypress by running npm install cypress#7.6.0
Downgrade of cypress to 8.3.0 worked for me to solve that, you dont need to go to previous versions.
npm install cypress#8.3.0
SIGSEGV means a segmentation fault error. Read all about it here.
"In practice, a segfault occurs when your program breaks some
fundamental rule set by the operating system. In that case, the
operating system sends your process a signal (SIGSEGV on Mac & Linux,
STATUS_ACCESS_VIOLATION on Windows), and typically the process shuts
down immediately."
This blog post also goes into detail about how this can occur, even if you don't directly interact with the operating system (since we're writing JavaScript). Please read it on the original author's site for context.
But in short - you are likely encountering this error because
a. you upgraded Cypress while on an old version of NodeJS, or
b. you upgraded NodeJS, while you have Cypress code that is directly or indirectly incompatible (this could be your own code, or one of its dependencies) with that NodeJS version
Since SIGSEGV is a complete shutdown, you have no stack trace or debug information to guide you. So you have to debug the old fashioned way, turning tests and/or dependencies on or off to locate the problem in your code.

Unit testing with firebase auth emulator requires real service account?

We are using the firebase emulators to write integration tests. One of our functions modifies the claims on a user. As such, our test checks to see if the claim has been added. In our test, we call the following function:
admin.auth().getUser(user.userId)
Our intention is to then check the claims. Unfortunately, when this function is called, we get an error.
(node:96985) UnhandledPromiseRejectionWarning: Error: Credential
implementation provided to initializeApp() via the "credential"
property failed to fetch a valid Google OAuth2 access token with the
following error: "Error fetching access token: Error while making
request: getaddrinfo ENOTFOUND metadata.google.internal. Error code:
ENOTFOUND".
Keep in mind we are running against the local auth emulator, not a cloud service. We found an issue on github which seems to be related: https://github.com/firebase/firebase-tools/issues/1708
Unfortunately, the recommended course of action in that issue is to use an actual service account file from an actual cloud service. We do not check such files into our repos as this would be a security hazard. Does anyone know of a better way to deal with this situation?
In case it is relevant, we also get the following warning:
{"severity":"WARNING","message":"Warning, FIREBASE_CONFIG and
GCLOUD_PROJECT environment variables are missing. Initializing
firebase-admin will fail"}

deploy twilio react plugin throws error: The requested resource /Configuration was not found

I am doing this tutorial:
https://www.twilio.com/docs/flex/quickstart/getting-started-plugin
I have a twilio trial account. I have a react plugin that I wanted to deploy. Hitting npm run deploy would throw me the following error:
Request get to Configuration failed with status 404 and message The
requested resource /Configuration was not found
This error message tells you that the account that you are using doesn't contain an enabled Flex instance. You probably skipped this step and didn't log in to the CLI with the newly created Flex account.
You can add a new profile to the CLI with twilio profiles:create, while supplying the new account SID and auth token from the console.
Once you have done that, you can either use this profile with the parameter --profile:
twilio flex:plugins:deploy --major --changelog "Adding Bing as search engine" --description "First Plugin on Flex" \n
--profile Flex
or make the profile the default and use the command as instructed in the tutorial:
twilio profiles:use flex
twilio flex:plugins:deploy --major --changelog "Adding Bing as search engine" --description "First Plugin on Flex"

React-native Failed to process resources, see aapt output above for details

I need help with my first React-native app.
It generates
C:\Users\Bradburry\Downloads\Project Vlogee\Hasura>react-native run-android
JS server already running.
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Configure project :app
WARNING: The option 'android.enableAapt2' is deprecated and should not be used anymore.
Use 'android.enableAapt2=true' to remove this warning.
It will be removed at the end of 2018..
C:\Users\Bradburry.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\eaf5e02e0fb5007b45b00a347d77a822\res\values-v24\values-v24.xml:3:5-157: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
C:\Users\Bradburry.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\eaf5e02e0fb5007b45b00a347d77a822\res\values-v24\values-v24.xml:4:5-135: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.
C:\Users\Bradburry.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\eaf5e02e0fb5007b45b00a347d77a822\res\values-v26\values-v26.xml:13:5-16:13: AAPT: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
Failed to process resources, see aapt output above for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 32s
13 actionable tasks: 3 executed, 10 up-to-date
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html

Categories

Resources