Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Just update aws-amplify to newest version - no user pool error #3287

Closed
rpostulart opened this issue May 15, 2019 · 22 comments
Closed

Just update aws-amplify to newest version - no user pool error #3287

rpostulart opened this issue May 15, 2019 · 22 comments
Labels
React Native React Native related issue to-be-reproduced Used in order for Amplify to reproduce said issue

Comments

@rpostulart
Copy link

rpostulart commented May 15, 2019

I just updated the aws-amplify package to the the newest version and now receive this error

errror from signIn: No userPool

Before the set up was working

@sammartinez
Copy link
Contributor

@rpostulart Can you provide a little more information on which framework this is happening along with the versions in your package.json?

@rpostulart
Copy link
Author

rpostulart commented May 16, 2019

Of course. It's on react native.

package.json:
"dependencies": {
"@aws-amplify/cli": "^1.6.8",
"@aws-amplify/pushnotification": "^1.0.23",
"aws-amplify": "^1.1.28",
"aws-amplify-react-native": "^2.0.8",
"react": "16.6.3",
"react-native": "0.58.3",

index.js
import Amplify, { Analytics } from "aws-amplify";
import config from "./aws-exports";
Amplify.configure(config);
Analytics.configure(config);

This was always working, but now I have to configure each Amplify services manually. Like:
Amplify.configure(config);
Analytics.configure(config);
Auth.configure(config); -> when not included, then I receive no user pool
API.configure(config); -> when not included, then I receive API not configured

This happend after updating aws-amplify and cli package, while I didn't change the index.js and app.js files.

@rpostulart
Copy link
Author

Just get the same now with storage:
No plugin found in Storage for the provider, then add manualy

Storage.configure(config);

and then the error is gone.

@sammartinez sammartinez added React Native React Native related issue to-be-reproduced Used in order for Amplify to reproduce said issue labels May 16, 2019
@jordanranz
Copy link
Contributor

jordanranz commented May 24, 2019

Hey @rpostulart, can you try to delete your node_modules and rerun npm or yarn in your application.

If this does not help, did you use the Amplify CLI to set up Auth as mentioned here?

If all of the categories you mention above (Auth, Analytics, API, Storage) were set up using the Amplify CLI, you should only have to include Amplify.configure(config), otherwise configuration can be instantiated in multiple places. If any of these categories were not set up in the Amplify CLI, you will need to provide manual configuration to the .configure method exemplified here.

@rpostulart
Copy link
Author

Of course I had: Amplify.configure()

But after the update that was not werking anymore

@jordanranz
Copy link
Contributor

jordanranz commented May 24, 2019

@rpostulart, I mentioned a possible fix, then asked about what you set up with the Amplify CLI.

Please re-read my comment above and respond appropriately.

@rpostulart
Copy link
Author

Sorry I am on a location with bad internet connectivity and was in a rush, I will check this next week and let you know! Thx

@rpostulart
Copy link
Author

rpostulart commented May 27, 2019

@jordanranz I removed node_modules and reinstalled it with no success. Still same issue!
Everything has been set up by the AWS CLI. Here is my code:

import React from "react";
import { AppRegistry } from "react-native";

// redux

import Amplify, { Analytics, Auth, API, Storage} from "aws-amplify";
import codePush from "react-native-code-push";
import { PushNotificationIOS } from "react-native";
import PushNotification from "@aws-amplify/pushnotification";

import { Provider } from "react-redux";
import thunk from "redux-thunk";
import { createStore, applyMiddleware } from "redux";
import App from "./src/App";
import rootReducer from "./src/reducers";
import config from "./aws-exports";
import CodePush from "react-native-code-push";

let codePushOptions = {
  checkFrequency: CodePush.CheckFrequency.MANUAL
};
//disable this to remove update window when codepush updates
codePush.sync({
  updateDialog: true,
  installMode: codePush.InstallMode.IMMEDIATE
});

const store = createStore(rootReducer, applyMiddleware(thunk));
Amplify.configure(config);
//Analytics.configure(config);
//Auth.configure(config);
//API.configure(config);
//Storage.configure(config);

PushNotification.configure(config);
// App

const ReduxApp = () => (
  <Provider store={store}>
    <App />
  </Provider>
);
// const CodePushApp = codePush(codePushOptions)(ReduxApp);

AppRegistry.registerComponent("App", () =>
  codePush(codePushOptions)(ReduxApp)
);

@rpostulart
Copy link
Author

Any other ideas? I also get this error now:

AWSS3Provider - ensure credentials error No Auth module registered in Amplify

with this code:

Amplify.configure(config);
Analytics.configure(config);
API.configure(config);
Storage.configure(config);
Auth.configure(config);

@manueliglesias
Copy link
Contributor

Hi @rpostulart

Can you verify that you don't have multiple versions of Amplify packages in your project?

yarn list --pattern "amplify"

or

npm list | grep "amplify"

@rpostulart
Copy link
Author

I see this list

NLMB22A5-PO2992:pgb ramon$ npm list | grep "amplify"
├─┬ @aws-amplify/[email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
│ │ ├── [email protected] deduped
│ │ ├── [email protected] deduped
│ ├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
npm ERR! peer dep missing: acorn@^6.0.0, required by [email protected]
npm ERR! peer dep missing: react-native-fs@^2.12.1, required by [email protected]
npm ERR! peer dep missing: react-native-sound@^0.10.9, required by [email protected]
npm ERR! peer dep missing: react-native-voice@^0.2.6, required by [email protected]
npm ERR! peer dep missing: react-native-vector-icons@^4.2.0, required by [email protected]
npm ERR! peer dep missing: inquirer@^5.0.0 || ^6.0.0, required by [email protected]
npm ERR! peer dep missing: react-native-vector-icons@^4.2.0, required by [email protected]
npm ERR! invalid: [email protected] /Users/ramon/pgb/node_modules/babel-jest
npm ERR! peer dep missing: acorn@^6.0.0, required by [email protected]
npm ERR! invalid: [email protected] /Users/ramon/pgb/node_modules/jest
npm ERR! invalid: [email protected] /Users/ramon/pgb/node_modules/babel-jest
npm ERR! invalid: [email protected] /Users/ramon/pgb/node_modules/metro-react-native-babel-preset
npm ERR! peer dep missing: [email protected], required by [email protected]
npm ERR! peer dep missing: acorn@^6.0.0, required by [email protected]
npm ERR! invalid: [email protected] /Users/ramon/pgb/node_modules/react-test-renderer
│ ├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
│ │ ├── [email protected] deduped
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ ├─┬ [email protected]
│ ├─┬ [email protected]
│ ├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
│ │ ├── [email protected] deduped
├─┬ @aws-amplify/[email protected]
│ └─┬ @aws-amplify/[email protected]
├─┬ [email protected]
│ ├─┬ @aws-amplify/[email protected]
│ │ ├── @aws-amplify/[email protected] deduped
│ │ ├─┬ @aws-amplify/[email protected]
│ ├─┬ @aws-amplify/[email protected]
│ │ ├── @aws-amplify/[email protected] deduped
│ │ ├── @aws-amplify/[email protected] deduped
│ │ ├─┬ @aws-amplify/[email protected]
│ ├─┬ @aws-amplify/[email protected]
│ │ ├── @aws-amplify/[email protected] deduped
│ │ ├─┬ @aws-amplify/[email protected]
│ ├─┬ @aws-amplify/[email protected]
│ │ └─┬ @aws-amplify/[email protected]
│ ├─┬ @aws-amplify/[email protected]
│ ├─┬ @aws-amplify/[email protected]
│ │ └─┬ @aws-amplify/[email protected]
│ ├─┬ @aws-amplify/[email protected]
│ │ ├─┬ @aws-amplify/[email protected]
│ ├─┬ @aws-amplify/[email protected]
│ │ └─┬ @aws-amplify/[email protected]
│ ├── @aws-amplify/[email protected]
│ └─┬ @aws-amplify/[email protected]
│   └─┬ @aws-amplify/[email protected]
├─┬ [email protected]


@manueliglesias
Copy link
Contributor

@rpostulart

i see you have multiple versions of @aws-amplify/core:

@aws-amplify/[email protected]
@aws-amplify/[email protected]

Looks like you need to upgrade to @aws-amplify/[email protected] to avoid the package duplication of @aws-amplify/core (see c736165)

@rpostulart
Copy link
Author

rpostulart commented May 31, 2019

I upgraded push notifications and uninstalled @aws-amplify/[email protected] but the error is the same.

NLMB22A5-PO2992:pgb ramon$ npm list | grep "amplify"
├─┬ @aws-amplify/[email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
│ │ ├── [email protected] deduped
│ │ ├── [email protected] deduped
│ ├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
npm ERR! peer dep missing: acorn@^6.0.0, required by [email protected]
npm ERR! peer dep missing: react-native-fs@^2.12.1, required by [email protected]
npm ERR! peer dep missing: react-native-sound@^0.10.9, required by [email protected]
npm ERR! peer dep missing: react-native-voice@^0.2.6, required by [email protected]
npm ERR! peer dep missing: react-native-vector-icons@^4.2.0, required by [email protected]
npm ERR! peer dep missing: inquirer@^5.0.0 || ^6.0.0, required by [email protected]
npm ERR! peer dep missing: react-native-vector-icons@^4.2.0, required by [email protected]
npm ERR! invalid: [email protected] /Users/ramon/pgb/node_modules/babel-jest
npm ERR! peer dep missing: acorn@^6.0.0, required by [email protected]
npm ERR! invalid: [email protected] /Users/ramon/pgb/node_modules/jest
npm ERR! invalid: [email protected] /Users/ramon/pgb/node_modules/babel-jest
npm ERR! invalid: [email protected] /Users/ramon/pgb/node_modules/metro-react-native-babel-preset
npm ERR! peer dep missing: [email protected], required by [email protected]
npm ERR! peer dep missing: acorn@^6.0.0, required by [email protected]
npm ERR! invalid: [email protected] /Users/ramon/pgb/node_modules/react-test-renderer
│ ├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
│ │ ├── [email protected] deduped
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
│ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ ├─┬ [email protected]
│ ├─┬ [email protected]
│ ├─┬ [email protected]
│ ├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected] deduped
│ │ ├── [email protected] deduped
├─┬ @aws-amplify/[email protected]
│ └─┬ @aws-amplify/[email protected]
├─┬ [email protected]
│ ├─┬ @aws-amplify/[email protected]
│ │ ├── @aws-amplify/[email protected] deduped
│ │ ├─┬ @aws-amplify/[email protected]
│ ├─┬ @aws-amplify/[email protected]
│ │ ├── @aws-amplify/[email protected] deduped
│ │ ├── @aws-amplify/[email protected] deduped
│ │ ├─┬ @aws-amplify/[email protected]
│ ├─┬ @aws-amplify/[email protected]
│ │ ├── @aws-amplify/[email protected] deduped
│ │ ├─┬ @aws-amplify/[email protected]
│ ├─┬ @aws-amplify/[email protected]
│ │ └─┬ @aws-amplify/[email protected]
│ ├─┬ @aws-amplify/[email protected]
│ ├─┬ @aws-amplify/[email protected]
│ │ └─┬ @aws-amplify/[email protected]
│ ├─┬ @aws-amplify/[email protected]
│ │ ├─┬ @aws-amplify/[email protected]
│ ├─┬ @aws-amplify/[email protected]
│ │ └─┬ @aws-amplify/[email protected]
│ ├── @aws-amplify/[email protected]
│ └─┬ @aws-amplify/[email protected]
│   └─┬ @aws-amplify/[email protected]
├─┬ [email protected]
NLMB22A5-PO2992:pgb ramon$ 

@manueliglesias
Copy link
Contributor

@rpostulart can you completely delete your node modules and do npm i or yarn again?

@haverchuck
Copy link
Member

@rpostulart I'm closing this issue due to inactivity. If the response from @manueliglesias isn't helpful, feel free to repost.

@AnisDerbel
Copy link

+1!

@sanudatta11
Copy link

+1

@oliverandersencox
Copy link

yep this is happening on IOS with Ionic - but running locally in angular is absolutely fine!

@vikasmca05
Copy link

+1

@MiqueiasGFernandes
Copy link

MiqueiasGFernandes commented Dec 17, 2020

+1, why close this issue if error doesn't has a solution?

@Deiiv
Copy link

Deiiv commented Jan 10, 2021

I'm not sure what the root cause is, but I got the same from updating and it was fixed by deleting the node modules as mentioned above, rerunning npm installl and now it's fine

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
React Native React Native related issue to-be-reproduced Used in order for Amplify to reproduce said issue
Projects
None yet
Development

No branches or pull requests