aptonic / dropzone4-actions

Add-on actions and API Docs for Dropzone 4
https://aptonic.com
363 stars 57 forks source link

YouTube Uploader fails with console error when uploading MP4 #108

Closed gtallen1187 closed 4 years ago

gtallen1187 commented 4 years ago

Hey @aptonic - Thank you for being so responsive to the issues i posted earlier today. It made a big difference for me; i could continue integrating Dropzone even further into my daily workflow. It's been a huge time saver so far!

It looks as though the YouTube Uploader action fails with any mp4 file. I've tried uploading mov, avi, and mpg, all which worked just fine. However whenever I try and upload an mp4 video i get the media type console error below.

Here is the 3.2MB MP4 video that i tried to upload in case its helpful.

[Launching task with command line: runner.rb task-28495]

Task description file task-28495:

ACTION: "/Users/gregallen/Library/Application Support/Dropzone/Actions/YouTube Uploader.dzbundle"
EVENT: "dragged"
VARIABLE: "client_secret" "••••"
VARIABLE: "dragged_type" "files"
VARIABLE: "app_version" "4.0.3"
VARIABLE: "expires_at" "1586910222"
VARIABLE: "refresh_token" "••••"
VARIABLE: "access_token" "••••"
VARIABLE: "client_id" "••••"
VARIABLE: "support_folder" "/Users/gregallen/Library/Application Support/Dropzone"
ITEMS: "/Users/gregallen/Desktop/video_anytrans_2020-04-14-17-02-33/preparing_for_blastoff.mp4"

Determinate: 0
Begin_Message: Connecting to YouTube...
Save_Value_Name: access_token
Save_Value: ya29.a0Ae4lvC2QFOQWHFTn4vpCvNRlIhz22wpXRV5UIqYWH37sMeyQdZ5A0Ci2-fpjgZyyBt29dwYA7xU1Qp6SHgnveRktiHor04N_4FL1XgFipkG-1e15eCRBsfvVZPj9Icz4iMboNUQ-O9cq24k10WJ58LGHkpyFbjlc8jQ
Save_Value_Name: expires_at
Save_Value: 1586916900
Save_Value_Name: privacy
Save_Value: Unlisted
Begin_Message: Uploading preparing_for_blastoff.mp4 to YouTube...
/Applications/Setapp/Dropzone.app/Contents/Actions/lib/bundled-gems/ruby/2.6.0/gems/google-api-client-0.32.1/lib/google/apis/core/http_command.rb:228:in `check_status': badContent Media type 'application/mp4' is not supported. Valid media types [video/*, application/octet-stream] (Google::Apis::ClientError)
from /Applications/Setapp/Dropzone.app/Contents/Actions/lib/bundled-gems/ruby/2.6.0/gems/google-api-client-0.32.1/lib/google/apis/core/api_command.rb:117:in `check_status'
    from /Applications/Setapp/Dropzone.app/Contents/Actions/lib/bundled-gems/ruby/2.6.0/gems/google-api-client-0.32.1/lib/google/apis/core/http_command.rb:193:in `process_response'
    from /Applications/Setapp/Dropzone.app/Contents/Actions/lib/bundled-gems/ruby/2.6.0/gems/google-api-client-0.32.1/lib/google/apis/core/upload.rb:170:in `process_response'
    from /Applications/Setapp/Dropzone.app/Contents/Actions/lib/bundled-gems/ruby/2.6.0/gems/google-api-client-0.32.1/lib/google/apis/core/upload.rb:246:in `execute_once'
    from /Applications/Setapp/Dropzone.app/Contents/Actions/lib/bundled-gems/ruby/2.6.0/gems/google-api-client-0.32.1/lib/google/apis/core/http_command.rb:113:in `block (2 levels) in execute'
    from /Applications/Setapp/Dropzone.app/Contents/Actions/lib/bundled-gems/ruby/2.6.0/gems/retriable-3.1.2/lib/retriable.rb:61:in `block in retriable'
    from /Applications/Setapp/Dropzone.app/Contents/Actions/lib/bundled-gems/ruby/2.6.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `times'
    from /Applications/Setapp/Dropzone.app/Contents/Actions/lib/bundled-gems/ruby/2.6.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `retriable'
    from /Applications/Setapp/Dropzone.app/Contents/Actions/lib/bundled-gems/ruby/2.6.0/gems/google-api-client-0.32.1/lib/google/apis/core/http_command.rb:110:in `block in execute'
    from /Applications/Setapp/Dropzone.app/Contents/Actions/lib/bundled-gems/ruby/2.6.0/gems/retriable-3.1.2/lib/retriable.rb:61:in `block in retriable'
    from /Applications/Setapp/Dropzone.app/Contents/Actions/lib/bundled-gems/ruby/2.6.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `times'
    from /Applications/Setapp/Dropzone.app/Contents/Actions/lib/bundled-gems/ruby/2.6.0/gems/retriable-3.1.2/lib/retriable.rb:56:in `retriable'
    from /Applications/Setapp/Dropzone.app/Contents/Actions/lib/bundled-gems/ruby/2.6.0/gems/google-api-client-0.32.1/lib/google/apis/core/http_command.rb:102:in `execute'
    from /Applications/Setapp/Dropzone.app/Contents/Actions/lib/bundled-gems/ruby/2.6.0/gems/google-api-client-0.32.1/lib/google/apis/core/base_service.rb:360:in `execute_or_queue_command'
    from /Applications/Setapp/Dropzone.app/Contents/Actions/lib/bundled-gems/ruby/2.6.0/gems/google-api-client-0.32.1/generated/google/apis/youtube_v3/service.rb:4029:in `insert_video'
    from /Users/gregallen/Library/Application Support/Dropzone/Actions/YouTube Uploader.dzbundle/youtube.rb:62:in `upload_video'
    from /Users/gregallen/Library/Application Support/Dropzone/Actions/YouTube Uploader.dzbundle/action.rb:26:in `block in dragged'
    from /Users/gregallen/Library/Application Support/Dropzone/Actions/YouTube Uploader.dzbundle/action.rb:25:in `each'
    from /Users/gregallen/Library/Application Support/Dropzone/Actions/YouTube Uploader.dzbundle/action.rb:25:in `dragged'
    from /Applications/Setapp/Dropzone.app/Contents/Actions/lib/runner.rb:74:in `call'
    from /Applications/Setapp/Dropzone.app/Contents/Actions/lib/runner.rb:74:in `<main>'

[Task completed]
aptonic commented 4 years ago

Great to hear! I've just fixed this issue as well. Download and install the updated action (v2.2) from https://github.com/aptonic/dropzone4-actions-zipped/raw/master/YouTube%20Uploader.dzbundle and uploading of mp4s should work.