-
Notifications
You must be signed in to change notification settings - Fork 56
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
large uploads fail #8
Comments
I'm having the same issue happening repeatedly as well as of today. I'm uploading a video of around 350mb. My videos also successfully upload to Mux dashboard like @good-idea |
Thank you for this – we'll investigate. |
@david-j-davis as a little workaround -- if you're using the Structure plugin, you can manually add your Mux assets with a setup like this: import S from '@sanity/desk-tool/structure-builder'
export default () =>
S.list()
.title('My Site')
.items([
S.listItem()
.title('Pages')
.child(S.documentTypeList('page')),
S.listItem()
.title('Videos')
.child(S.documentTypeList('mux.videoAsset')),
]) It's a bit of a "hack", and the display title for all of the documents will be "ready", but you can add a new one, manually enter Then, back in your video field, you can select Browse instead of upload, and you should the the thumbnail |
Thanks @good-idea for the back-up plan. My client can wait maybe a week before I'll have to do this if there isn't a fix in place by the Sanity team. |
@david-j-davis no problem. If it's helpful at all, I wrote a simple CLI for uploading directly to Mux. My client had a big batch of videos to upload, and this made it a lot easier. https://github.com/good-idea/100-year-plan/tree/master/mux-upload Packaged as a standalone script (just a zip from my dropbox): https://www.dropbox.com/s/wdge4i4xalewocg/mux-upload.zip?dl=0 (run that with The Readme there says to create a You'll still need to manually enter the asset & playback IDs - but, it wouldn't be too difficult to write another "syncing" script that fetches all of your video assets from MUX and creates the proper documents in Sanity |
Hi! We have released |
Still experiencing this issue with larger videos. The assets are successfully uploaded to mux and are hosted there, however, when mux starts processing the video after upload, the error is presented on sanity even though there is no error on mux. |
Are you sure you're running the latest version @sachinkaria? What is the error (screenshot please)? What is the output of Please note that the plugin module must be upgraded manually in order to use the latest version (we bumped it to a new minor version): If using Yarn: Or if using NPM: |
Hi @skogsmaskin we narrowed down the issue to the pollUpload - maxTries variable (we set it to 200 to test), for larger videos this worked.. Not sure if this helps anyone! |
Hi, trying to upload a 15gb file (5 hours long video) and experiencing a timeout issue as well. It gets about 20% of the way through and then stops. As an alternative, I tried this https://github.com/muxinc/stream.new and was able to successfully upload the file but it does not appear in my Mux library within Sanity. I then tried the above method @good-idea suggested but having trouble with the video because it's perhaps "signed". Any ideas? Using "sanity-plugin-mux-input": "^2.2.3" and "sanity": "^3.18.0". Entire package json below {
"private": true,
"scripts": {
"build": "next build",
"postbuild": "next-sitemap",
"dev": "next",
"dev-local": "npx next dev -H 192.168.1.196 -p 3000",
"format": "npx prettier --write . --ignore-path .gitignore --cache",
"lint": "next lint -- --ignore-path .gitignore",
"lint:fix": "npm run format && npm run lint -- --fix",
"start": "next start",
"studio:deploy": "npx vercel env pull && npm --prefix studio run deploy",
"studio:dev": "npm --prefix studio run start",
"type-check": "tsc --noEmit"
},
"prettier": {
"semi": false,
"singleQuote": true
},
"dependencies": {
"@headlessui/react": "^1.7.13",
"@mux/mux-node": "^7.3.0",
"@mux/mux-player-react": "^1.11.4",
"@mux/videojs-kit": "^0.11.4",
"@portabletext/react": "^2.0.2",
"@react-pdf/renderer": "^3.1.9",
"@sanity/block-content-to-react": "^3.0.0",
"@sanity/color-input": "^3.0.2",
"@sanity/image-url": "^1.0.1",
"@sanity/scheduled-publishing": "^1.2.1",
"@sanity/vision": "^3.8.3",
"@sanity/webhook": "^2.0.0",
"algoliasearch": "^4.17.0",
"auto-text-size": "^0.2.2",
"classnames": "^2.3.1",
"date-fns": "^2.29.1",
"framer-motion": "^10.12.4",
"hls.js": "^1.4.0",
"i": "^0.3.7",
"intl-segmenter-polyfill": "^0.4.4",
"moment": "^2.29.4",
"moment-timezone": "^0.5.43",
"next": "^13.3.0",
"next-sanity": "^4.1.6",
"next-sitemap": "^4.1.3",
"next-use-contextual-routing": "^3.0.1",
"nextjs-google-analytics": "^2.3.3",
"npm": "^9.6.5",
"plyr-react": "^5.2.0",
"react": "^18.2.0",
"react-accessible-accordion": "^5.0.0",
"react-countdown": "^2.3.5",
"react-dom": "^18.2.0",
"react-hook-form": "^7.38.0",
"react-icons": "^4.8.0",
"react-idle-timer": "^5.6.2",
"react-instantsearch-dom": "^6.39.1",
"react-intersection-observer": "^9.4.0",
"react-modal": "^3.16.1",
"react-moment-countdown": "^0.4.2",
"react-player": "^2.12.0",
"react-tabs": "^5.2.0",
"reduce-css-calc": "^2.1.8",
"sanity": "^3.18.0",
"sanity-algolia": "^1.1.0",
"sanity-plugin-mux-input": "^2.2.3",
"satori": "^0.4.7",
"styled-components": "^5.3.9",
"suspend-react": "^0.0.9",
"swiper": "^9.2.0",
"swr": "^2.1.3",
"typewriter-effect": "^2.19.0",
"use-fit-text": "^2.4.0",
"use-mailchimp-form": "^3.1.0",
"video.js": "^8.3.0"
},
"devDependencies": {
"@types/node": "18.15.11",
"autoprefixer": "^10.4.8",
"eslint": "^8.38.0",
"eslint-config-next": "^13.3.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
"postcss": "^8.4.14",
"prettier": "^2.8.7",
"prettier-plugin-packagejson": "^2.4.3",
"prettier-plugin-tailwindcss": "^0.2.7",
"react-moment-proptypes": "^1.8.1",
"tailwindcss": "^3.3.1",
"typescript": "5.0.4"
},
"engines": {
"node": ">=16"
}
} |
hey, @DanielHirunrusme im having similar issues, did u manage to do it successfully in the end? |
Perhaps the same as #5, but, the POST data is showing up fine in the network tab.
I'm uploading a 500mb video file, which is taking about 6 minutes on my connection. After the upload reaches 100%, I see "Unexpected error occurred":
In the network tab, the request has failed with a 400 status. Here's what is in the Chrome network tab:
General
Response Headers
Request Headers
Query String Parameters
The video has successfully uploaded to MUX, it shows up in the dashboard there. But, it's never registered as an asset in Sanity, so it can't be added to the document later.
Edit: I just tried uploading a smaller video (30mb) with the network throttled. It took 5.9 minutes and failed in the same way.
The text was updated successfully, but these errors were encountered: