Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
REST API
Amplify Categories
api
Environment information
```
System:
OS: macOS 12.4
CPU: (8) arm64 Apple M1 Pro
Memory: 525.47 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 16.13.0 - ~/virtenv/bin/node
Yarn: 1.22.19 - ~/tada_frontend/node_modules/.bin/yarn
npm: 8.1.0 - ~/virtenv/bin/npm
Browsers:
Chrome: 102.0.5005.115
Firefox: 101.0.1
Safari: 15.5
npmPackages:
@aws-sdk/client-cognito-identity: 3.85.0 => 3.85.0 (3.6.1)
@aws-sdk/client-sts: 3.85.0 => 3.85.0 (3.48.0)
@aws-sdk/credential-provider-cognito-identity: 3.85.0 => 3.85.0 (3.6.1)
@testing-library/jest-dom: 5.16.4 => 5.16.4
@testing-library/react: 13.2.0 => 13.2.0
@testing-library/user-event: 14.1.1 => 14.1.1
@types/react-router-dom: 5.3.3 => 5.3.3
aws-amplify: 4.3.21 => 4.3.21
aws-amplify-react: 5.1.9 => 5.1.9
aws4fetch: 1.0.13 => 1.0.13
concurrently: 7.1.0 => 7.1.0
electron: 18.2.0 => 18.2.0
electron-builder: 23.0.3 => 23.0.3
electron-is: 3.0.0 => 3.0.0
eslint: 7.32.0 => 7.32.0
eslint-plugin-react: 7.29.4 => 7.29.4 (7.30.0)
is-electron: 2.2.1 => 2.2.1
nanoid: 3.3.3 => 3.3.3 (3.3.4)
prettier: 2.6.2 => 2.6.2
rc-slider: 9.7.5 => 9.7.5
react: 17.0.2 => 17.0.2
react-bootstrap: 1.6.4 => 1.6.4
react-bootstrap-sweetalert: 5.2.0 => 5.2.0
react-bootstrap/AbstractNav: undefined ()
react-bootstrap/AbstractNavItem: undefined ()
react-bootstrap/Accordion: undefined ()
react-bootstrap/AccordionCollapse: undefined ()
react-bootstrap/AccordionContext: undefined ()
react-bootstrap/AccordionToggle: undefined ()
react-bootstrap/Alert: undefined ()
react-bootstrap/Badge: undefined ()
react-bootstrap/BootstrapModalManager: undefined ()
react-bootstrap/Breadcrumb: undefined ()
react-bootstrap/BreadcrumbItem: undefined ()
react-bootstrap/Button: undefined ()
react-bootstrap/ButtonGroup: undefined ()
react-bootstrap/ButtonToolbar: undefined ()
react-bootstrap/Card: undefined ()
react-bootstrap/CardColumns: undefined ()
react-bootstrap/CardContext: undefined ()
react-bootstrap/CardDeck: undefined ()
react-bootstrap/CardGroup: undefined ()
react-bootstrap/CardImg: undefined ()
react-bootstrap/Carousel: undefined ()
react-bootstrap/CarouselCaption: undefined ()
react-bootstrap/CarouselItem: undefined ()
react-bootstrap/CloseButton: undefined ()
react-bootstrap/Col: undefined ()
react-bootstrap/Collapse: undefined ()
react-bootstrap/Container: undefined ()
react-bootstrap/Dropdown: undefined ()
react-bootstrap/DropdownButton: undefined ()
react-bootstrap/DropdownItem: undefined ()
react-bootstrap/DropdownMenu: undefined ()
react-bootstrap/DropdownToggle: undefined ()
react-bootstrap/ElementChildren: undefined ()
react-bootstrap/Fade: undefined ()
react-bootstrap/Feedback: undefined ()
react-bootstrap/Figure: undefined ()
react-bootstrap/FigureCaption: undefined ()
react-bootstrap/FigureImage: undefined ()
react-bootstrap/Form: undefined ()
react-bootstrap/FormCheck: undefined ()
react-bootstrap/FormCheckInput: undefined ()
react-bootstrap/FormCheckLabel: undefined ()
react-bootstrap/FormContext: undefined ()
react-bootstrap/FormControl: undefined ()
react-bootstrap/FormFile: undefined ()
react-bootstrap/FormFileInput: undefined ()
react-bootstrap/FormFileLabel: undefined ()
react-bootstrap/FormGroup: undefined ()
react-bootstrap/FormLabel: undefined ()
react-bootstrap/FormText: undefined ()
react-bootstrap/Image: undefined ()
react-bootstrap/InputGroup: undefined ()
react-bootstrap/Jumbotron: undefined ()
react-bootstrap/ListGroup: undefined ()
react-bootstrap/ListGroupItem: undefined ()
react-bootstrap/Media: undefined ()
react-bootstrap/Modal: undefined ()
react-bootstrap/ModalBody: undefined ()
react-bootstrap/ModalContext: undefined ()
react-bootstrap/ModalDialog: undefined ()
react-bootstrap/ModalFooter: undefined ()
react-bootstrap/ModalHeader: undefined ()
react-bootstrap/ModalTitle: undefined ()
react-bootstrap/Nav: undefined ()
react-bootstrap/NavContext: undefined ()
react-bootstrap/NavDropdown: undefined ()
react-bootstrap/NavItem: undefined ()
react-bootstrap/NavLink: undefined ()
react-bootstrap/Navbar: undefined ()
react-bootstrap/NavbarBrand: undefined ()
react-bootstrap/NavbarCollapse: undefined ()
react-bootstrap/NavbarContext: undefined ()
react-bootstrap/NavbarToggle: undefined ()
react-bootstrap/Overlay: undefined ()
react-bootstrap/OverlayTrigger: undefined ()
react-bootstrap/PageItem: undefined ()
react-bootstrap/Pagination: undefined ()
react-bootstrap/Popover: undefined ()
react-bootstrap/PopoverContent: undefined ()
react-bootstrap/PopoverTitle: undefined ()
react-bootstrap/ProgressBar: undefined ()
react-bootstrap/ResponsiveEmbed: undefined ()
react-bootstrap/Row: undefined ()
react-bootstrap/SafeAnchor: undefined ()
react-bootstrap/SelectableContext: undefined ()
react-bootstrap/Spinner: undefined ()
react-bootstrap/SplitButton: undefined ()
react-bootstrap/Switch: undefined ()
react-bootstrap/Tab: undefined ()
react-bootstrap/TabContainer: undefined ()
react-bootstrap/TabContent: undefined ()
react-bootstrap/TabContext: undefined ()
react-bootstrap/TabPane: undefined ()
react-bootstrap/Table: undefined ()
react-bootstrap/Tabs: undefined ()
react-bootstrap/ThemeProvider: undefined ()
react-bootstrap/Toast: undefined ()
react-bootstrap/ToastBody: undefined ()
react-bootstrap/ToastContext: undefined ()
react-bootstrap/ToastHeader: undefined ()
react-bootstrap/ToggleButton: undefined ()
react-bootstrap/ToggleButtonGroup: undefined ()
react-bootstrap/Tooltip: undefined ()
react-bootstrap/createChainedFunction: undefined ()
react-bootstrap/createWithBsPrefix: undefined ()
react-bootstrap/divWithClassName: undefined ()
react-bootstrap/helpers: undefined ()
react-bootstrap/transitionEndListener: undefined ()
react-bootstrap/triggerBrowserReflow: undefined ()
react-bootstrap/types: undefined ()
react-bootstrap/usePopperMarginModifiers: undefined ()
react-bootstrap/useWrappedRefWithWarning: undefined ()
react-cron-generator: 1.3.5 => 1.3.5
react-data-table-component: 7.5 => 7.5.2
react-dom: 17.0.2 => 17.0.2
react-dropzone: 11.4.2 => 11.4.2
react-icons: 4.2.0 => 4.2.0
react-js-stepper: 1.2.6 => 1.2.6
react-notifications-menu: 1.0.6 => 1.0.6
react-papaparse: 3.17.2 => 3.17.2
react-router-bootstrap: 0.25.0 => 0.25.0
react-router-dom: 5.3.0 => 5.3.0
react-scripts: 4.0.3 => 4.0.3
sass: 1.43.3 => 1.43.3
styled-components: 5.3.3 => 5.3.3
styled-components/macro: undefined ()
styled-components/native: undefined ()
styled-components/primitives: undefined ()
wait-on: 6.0.1 => 6.0.1
web-vitals: 2.1.4 => 2.1.4
websocket: 1.0.34 => 1.0.34
npmGlobalPackages:
corepack: 0.10.0
npm: 8.1.0
```
Describe the bug
When building a React app using yarn and using AWS Amplify for JS v4.3.21,
there are at least ten warnings about Amplify's use of an old (and unsafe) version of UUID.
Example:
warning aws-amplify > @aws-amplify/core > @aws-sdk/client-cognito-identity > @aws-sdk/middleware-retry > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
Expected behavior
No warnings.
Reproduction steps
In your package.json file, make sure you are using:
"dependencies": {
"aws-amplify": "4.3.21",
"react": "17.0.2",
Code Snippet
// Put your code below this line.
Log output
// Put your logs below this line
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
Hi @slimandslam 👋 thanks for raising this issue 😃 It appears the issue stems from the aws-sdk depending on the older version of uuid
. We will look into this and see what might be preventing the upgrade.
I not only that the version is UUID is outdated with version 3.4.0, is that different also packages of @aws-amplify use different versions too.
@aws-amplify/datastore, @aws-amplify/pubsub for example include UUID 3.3.2, but @aws-amplify/api-graphql includes 3.3.4. So sometimes even older.
The UUID version dependency is a bit messed-up
Closing this as duplicate of #8464