amplify-js: Keep getting [ERROR] Authenticator - No userPool after re-install of aws-amplify package

Question about manual configure Amplify to sign in against Identity pool / User pool.

New to the javascript world so deleted a few npm packages and had to re-install aws-amplify + aws-amplify-react-native.

And my sign-in stopped working, for no aparent reason (to me, that is 😃). From the beginning I used the Mobile Hub in AWS. But I dont really want all those features and CloudFront + S3 storage and such. So re-created a Cognito User Pool and an Identity Pool that uses that User Pool.

But I’m getting the same errors that I got when I by misstake deleted aws-amplify modules. And that is: [ERROR] Authenticator - No userPool

The complete log (minus timestamp and some key info missing):

2018-03-01 20:24:54.052 [info][tid:main][RCTCxxBridge.mm:902] Invalidating <RCTCxxBridge: 0x6040001d96e0> (parent: <RCTBridge: 0x6000000d1db0>, executor: (null))
2018-03-01 20:24:54.053 [info][tid:main][RCTCxxBridge.mm:210] Initializing <RCTCxxBridge: 0x6000003ccb70> (parent: <RCTBridge: 0x6000000d1db0>, executor: (null))
2018-03-01 20:24:54.054 [warn][tid:main][RCTModuleData.mm:69] Module RCTImageLoader requires main queue setup since it overrides `init` but doesn't implement `requiresMainQueueSetup`. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
2018-03-01 20:24:55.055 [info][tid:com.facebook.react.JavaScript] Load I18n module
2018-03-01 20:24:55.168 [info][tid:com.facebook.react.JavaScript] [DEBUG] 24:55.167 AuthClass - configure Auth
2018-03-01 20:24:55.169 [info][tid:com.facebook.react.JavaScript] [DEBUG] 24:55.168 I18n - configure I18n
2018-03-01 20:24:55.169 [info][tid:com.facebook.react.JavaScript] [DEBUG] 24:55.168 I18n - create I18n instance
2018-03-01 20:24:55.169 [info][tid:com.facebook.react.JavaScript] [DEBUG] 24:55.168 AnalyticsClass - configure Analytics
2018-03-01 20:24:55.169 [info][tid:com.facebook.react.JavaScript] [DEBUG] 24:55.168 AnalyticsClass - Do not have appId yet.
2018-03-01 20:24:55.169 [info][tid:com.facebook.react.JavaScript] [DEBUG] 24:55.169 API - configure API
2018-03-01 20:24:55.169 [info][tid:com.facebook.react.JavaScript] [DEBUG] 24:55.169 API - create API instance
2018-03-01 20:24:55.171 [info][tid:com.facebook.react.JavaScript] { '[DEBUG] 24:55.169 RestClient - API Options': 
   { aws_cognito_identity_pool_id: 'XXXXXXXXXXX',
     aws_cognito_region: 'eu-west-1',
     aws_project_region: 'eu-west-1',
     aws_sign_in_enabled: 'enable',
     aws_user_pools: 'enable',
     aws_user_pools_id: 'eu-west-XXXXXXXXXXX',
     aws_user_pools_mfa_type: 'OFF',
     aws_user_pools_web_client_id: 'XXXXXXXXXXX',
     region: 'eu-west-1',
     header: {} } }
2018-03-01 20:24:55.171 [info][tid:com.facebook.react.JavaScript] [DEBUG] 24:55.171 Storage - configure called
2018-03-01 20:24:55.171 [info][tid:com.facebook.react.JavaScript] [DEBUG] 24:55.171 StorageClass - configure Storage
2018-03-01 20:24:55.171 [info][tid:com.facebook.react.JavaScript] [DEBUG] 24:55.171 StorageClass - Do not have bucket yet
2018-03-01 20:24:55.172 [info][tid:com.facebook.react.JavaScript] [DEBUG] 24:55.171 StorageClass - configure Storage
2018-03-01 20:24:55.172 [info][tid:com.facebook.react.JavaScript] [DEBUG] 24:55.171 StorageClass - Do not have bucket yet
2018-03-01 20:24:55.196 [info][tid:main][RCTRootView.m:302] Running application App ({
    initialProps =     {
    };
    rootTag = 11;
})
2018-03-01 20:24:55.202 [info][tid:com.facebook.react.JavaScript] Running application "App" with appParams: {"rootTag":11,"initialProps":{}}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
2018-03-01 20:24:55.254 [info][tid:com.facebook.react.JavaScript] [ERROR] Authenticator - No userPool

I have seem some various config options in various readmes/guides. So quite unsure exactly what is the best way to do it.

I tried just switching out stuff from the aws-export.js file (as the info is above) to correlate with the new user pool / identity etc.

But I also tried following https://aws.github.io/aws-amplify/media/install_n_config.html.

I’m wrapping the program in the withAuthenticator and I’m at a loss here to what might be wrong. So any help to this react and amplify newbie would be appreciated! 😃

Everything except withAuthenticator is grabbed from aws-amplify and not aws-amplify-react-native.

Using version 0.2.9 of amplify and 0.1.24 of amplify-react-native.

Since the problem started without any changes in AWS I dont think anything is wrong with my user-pool + identity setup (but please let me know if there is anything you need to do when setting these up manually that I might haved missed).

It started when I removed what I thought was an unnecessary npm packaged called “fs”. with npm remove fs and it for some reason removed both aws-amplify and aws-amplify-react-native.

I have since removed my node_modules, cleared npm cache. run npm install. But still no luck.

Thankful for any help!

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (1 by maintainers)

Most upvoted comments

@bilal-korir Thanks for your help. I will also try that route. I only wanted to see if there was a quick and easy way of autogenerating an interface into a DynamoDb table and it turned into a journey down the path of javascript dependency hell!

I got it working in the end after googling around.

Started with the following in package.json:-

"aws-amplify": "^0.1.36",
"aws-amplify-react": "^0.1.43",


	• yarn install
	• Yarn remove aws-amplify
	• Yarn remove aws-amplify-react
	• Yarn add aws-amplify
	• Yarn add aws-amplify-react

Ended with the following in package.json:-

"aws-amplify": "^0.4.1",
"aws-amplify-react": "^0.1.47",

awsmobile run

Logging in and gets past No user pool - error.

I’m getting a ‘No userPool’ error with the orange tag right now…I have no idea what happened, it was working fine, and then when I deleted the graphql package it stopped working, even after i re-added the same package, same version back. I’m not sure if it was directly related or not.

I have checked my aws-exports file, and aws_user_pools is indeed enabled, and aws_user_pools_id matches the same pool id on my cognito settings. I have also rerun awsmobile push and checked the aws-exports file to be sure.

I just checked out my entire repository, undoing every change I’ve made in the last hour (when it was still working) and it still doesn’t work.

Note: I started with the aws mobilehub sample react app.

Ok, so I think I found the issue.

npm had also removed amazon-cognito-auth-js. So I had to run npm install --save amazon-cognito-auth-js and then unlink and link it. After that auth started working again.