slice-machine: cannot push slices after updating to V1.0.1
Versions
- slice-machine-ui: 1.0.1
- node: 18.13.0
Reproduction
I’ve upgraded toslice-machine-ui@1.0.0. It migrated the files, I updated my slice-simulator.js page (this change was not mentioned in the change log or in the docs). I then noticed v1.0.1 was released, so I updated to slice-machine-ui@1.0.1. When I opened slicemachine, all slices came up as changed. When I push these changes, it gets stuck. The upload fails with the following error.
An error happened while pushing your changes
Error: Unable to upload screenshot with status code: 400
at ScreenshotsManager.uploadScreenshot (PROJECT_FOLDER/node_modules/@slicemachine/manager/dist/managers/screenshots/ScreenshotsManager.cjs:216:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PROJECT_FOLDER/node_modules/@slicemachine/manager/dist/managers/slices/SlicesManager.cjs:398:34
at async Promise.all (index 0)
at async SlicesManager.updateSliceModelScreenshotsInPlace (PROJECT_FOLDER/node_modules/@slicemachine/manager/dist/managers/slices/SlicesManager.cjs:375:24)
at async PROJECT_FOLDER/node_modules/@slicemachine/manager/dist/managers/prismicRepository/PrismicRepositoryManager.cjs:221:44
at async Promise.all (index 21)
at async PrismicRepositoryManager.pushChanges (PROJECT_FOLDER/node_modules/@slicemachine/manager/dist/managers/prismicRepository/PrismicRepositoryManager.cjs:188:26)
at async Module.handleRPCRequest (PROJECT_FOLDER/node_modules/@slicemachine/manager/dist/_node_modules/r19/dist/handleRPCRequest.cjs:58:11)
at async IncomingMessage.<anonymous> (PROJECT_FOLDER/node_modules/@slicemachine/manager/dist/_node_modules/r19/dist/createRPCMiddleware.cjs:17:45)
node -v
If not the error above I get this error:
An error happened while pushing your changes
FetchError: request to https://s3.amazonaws.com/prismic-io failed, reason: socket hang up
at ClientRequest.<anonymous> (PROJECT_FOLDER/node_modules/@slicemachine/manager/dist/_node_modules/node-fetch/src/index.cjs:69:14)
at ClientRequest.emit (node:events:525:35)
at ClientRequest.emit (node:domain:489:12)
at TLSSocket.socketOnEnd (node:_http_client:520:9)
at TLSSocket.emit (node:events:525:35)
at TLSSocket.emit (node:domain:489:12)
at endReadableNT (node:internal/streams/readable:1359:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET',
erroredSysCall: undefined
}
Additional Details
"dependencies": {
"@afosto/components": "^1.0.24",
"@afosto/hooks": "^1.0.5",
"@afosto/instant-search-client": "^1.0.9",
"@afosto/instant-search-widget": "^0.2.10",
"@afosto/utils": "^1.0.3",
"@apollo/client": "^3.7.2",
"@emotion/babel-plugin": "^11.9.2",
"@emotion/cache": "^11.9.3",
"@emotion/is-prop-valid": "^1.1.3",
"@emotion/react": "^11.9.3",
"@emotion/server": "^11.4.0",
"@emotion/styled": "^11.9.3",
"@hookform/resolvers": "^2.9.7",
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.1",
"@mui/utils": "^5.9.1",
"@prismicio/client": "^6.7.1",
"@prismicio/helpers": "^2.3.5",
"@prismicio/next": "^1.0.3",
"@prismicio/react": "^2.5.0",
"@prismicio/slice-simulator-react": "^0.2.2",
"@u-wave/react-vimeo": "^0.9.10",
"axios": "^1.1.3",
"clsx": "^1.2.1",
"cookies-next": "^2.1.1",
"framer-motion": "^6.5.1",
"fzf": "^0.5.1",
"graphql": "^16.6.0",
"instantsearch.js": "^4.48.0",
"lodash.throttle": "^4.1.1",
"next": "13.2.4",
"next-seo": "^5.4.0",
"nextjs-google-analytics": "^2.2.0",
"number-to-words": "^1.2.4",
"postmark": "^3.0.14",
"prop-types": "^15.8.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-facebook-pixel": "^1.0.4",
"react-hook-form": "7.33.1",
"react-hook-recaptcha": "^1.0.5",
"react-instantsearch-hooks-web": "^6.36.0",
"react-intl": "^6.0.5",
"react-linkedin-insight": "^0.1.3",
"react-markdown": "^8.0.7",
"react-reddit-pixel": "^1.0.0",
"react-syntax-highlighter": "^15.5.0",
"rehype-parse": "^8.0.4",
"rehype-pretty-code": "^0.9.5",
"remark-gfm": "^3.0.1",
"sharp": "^0.30.7",
"shiki": "^0.14.1",
"swiper": "^8.3.1",
"unified": "^10.1.2",
"yup": "^0.32.11",
"yup-phone": "^1.3.2"
},
"devDependencies": {
"@emotion/eslint-plugin": "^11.7.0",
"@formatjs/cli": "^5.0.6",
"@slicemachine/adapter-next": "^0.1.1",
"@storybook/addon-actions": "^6.5.12",
"@storybook/addon-essentials": "^6.5.12",
"@storybook/addon-interactions": "^6.5.12",
"@storybook/addon-links": "^6.5.12",
"@storybook/builder-webpack5": "^6.5.12",
"@storybook/manager-webpack5": "^6.5.12",
"@storybook/react": "^6.5.12",
"@storybook/testing-library": "^0.0.13",
"eslint": "8.20.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-next": "13.2.4",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-jsconfig": "^1.1.0",
"eslint-import-resolver-webpack": "^0.13.2",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.0",
"eslint-plugin-storybook": "^0.6.1",
"prettier": "^2.7.1",
"slice-machine-ui": "^1.0.1"
}
What is expected?
I expect the changes to get pushed to prismic.
What is actually happening?
The push fails due to the errors mentioned above.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 21 (7 by maintainers)
@hypervillain updated to 1.0.2 and it worked like a charm! Seems even faster than v0!
Pushing seems to work fine in 1.0.2. At least for me!
We’ve released a new version of slice-machine-ui, can you try upgrading to 1.0.2 (you will also need to upgrade your adapter to 0.1.2) which should fix the huge amount of time that pushing changes took on your side.
Can you give it a try?