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

Error: Invalid bucket when upload video #189

Closed
trangianhuan opened this issue Dec 8, 2018 · 28 comments
Closed

Error: Invalid bucket when upload video #189

trangianhuan opened this issue Dec 8, 2018 · 28 comments
Labels

Comments

@trangianhuan
Copy link

I execute example upload with api in laravel 5.7

$client = new Vimeo("", "", "access_token");
     $test = $client->upload('../test.mp4');
    return response()->json($test);
});

i get error

[2018-12-08 04:40:05] local.ERROR: Client error: `POST https://files.tus.vimeo.com/files/vimeo-prod-src-tus-asia` resulted in a `400 Bad Request` response:
{"error":"Invalid bucket"}

 {"exception":"[object] (Vimeo\\Exceptions\\VimeoUploadException(code: 0): Client error: `POST https://files.tus.vimeo.com/files/vimeo-prod-src-tus-asia` resulted in a `400 Bad Request` response:
{\"error\":\"Invalid bucket\"}

 at /var/www/noithat/vendor/vimeo/vimeo-api/src/Vimeo/Vimeo.php:603)
[stacktrace]
#0 /var/www/noithat/vendor/vimeo/vimeo-api/src/Vimeo/Vimeo.php(338): Vimeo\\Vimeo->perform_upload_tus('../test.mp4', 1094036, Array)
#1 /var/www/noithat/routes/api.php(28): Vimeo\\Vimeo->upload('../test.mp4')
#2 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Route.php(198): Illuminate\\Routing\\Router->{closure}(Object(Illuminate\\Http\\Request))
#3 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Route.php(172): Illuminate\\Routing\\Route->runCallable()
#4 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Router.php(679): Illuminate\\Routing\\Route->run()
#5 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#6 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(41): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#7 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#8 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#9 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Middleware/ThrottleRequests.php(58): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#10 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Routing\\Middleware\\ThrottleRequests->handle(Object(Illuminate\\Http\\Request), Object(Closure), 60, '1')
#11 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#12 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#13 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Router.php(681): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#14 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Router.php(656): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#15 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Router.php(622): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#16 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Router.php(611): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#17 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(176): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#18 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(30): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#19 /var/www/noithat/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(65): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#20 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Barryvdh\\Debugbar\\Middleware\\InjectDebugbar->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#21 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#22 /var/www/noithat/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#23 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#24 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#25 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(31): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#26 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#27 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#28 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(31): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#29 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#30 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#31 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#32 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#33 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#34 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(62): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#35 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(151): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#36 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#37 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(104): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#38 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#39 /var/www/noithat/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#40 /var/www/noithat/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#41 {main}
"} 

@erunion
Copy link
Contributor

erunion commented Dec 10, 2018

@trangianhuan Are you seeing this on every upload you make, or just the one from three days ago?

@tallcoder
Copy link

tallcoder commented Dec 14, 2018

I just ran into this error myself. Am curious of the fix, I'm thinking they found a fix on their own and just never reported back. If I figure it out, I'll report back to hopefully save someone some time.

@DavidTrujillo
Copy link

Today i have permissions to upload, but I have the same error.

Client error: POST https://files.tus.vimeo.com/files/vimeo-prod-src-tus-eu resulted in a 400 Bad Request response: {"error":"Invalid bucket"}

@DavidTrujillo
Copy link

oad you

For me, every upload is the same error

@trangianhuan
Copy link
Author

@erunion
now, i get the same error

@erunion
Copy link
Contributor

erunion commented Dec 17, 2018

I've let our upload team know about this, and they're looking into it today.

@erunion erunion self-assigned this Dec 17, 2018
@erunion
Copy link
Contributor

erunion commented Dec 17, 2018

@trangianhuan @DavidTrujillo @tallcoder Can you all confirm what version of Vimeo PHP and ankitpokhrel/tus-php you have installed via Composer?

Also what region are your servers uploading from? US? Europe? Asia?

@DavidTrujillo
Copy link

DavidTrujillo commented Dec 17, 2018

@trangianhuan @DavidTrujillo @tallcoder Can you all confirm what version of Vimeo PHP and ankitpokhrel/tus-php you have installed via Composer?

Also what region are your servers uploading from? US? Europe? Asia?

I have vimeo/laravel 5.2.0 and
"vimeo/vimeo-api",
"version": "3.0.1",
"source": {
"type": "git",
"url": "https://github.com/vimeo/vimeo.php.git",
"reference": "c65d2827fdd20752a68bcfdc527e2c81d8544989"
},

"ankitpokhrel/tus-php": "dev-master#460f00c14b774ec105dc840c61f229cc29c2f405",
"ext-curl": "",
"ext-json": "
",
"php": ">=7.1.0"

I live in Europe

@erunion
Copy link
Contributor

erunion commented Dec 17, 2018

@DavidTrujillo Thank you. Our upload team is looking into it. On the outset, the issue appears to be relegated to EU and Asia regions.

@erunion
Copy link
Contributor

erunion commented Dec 17, 2018

@DavidTrujillo In your composer.lock, can you send me the whole JSON blob for the ankitpokhrel/tus-php entry?

@DavidTrujillo
Copy link

ankitpokhrel/tus-php

"packages": [
{
"name": "ankitpokhrel/tus-php",
"version": "dev-master",
"source": {
"type": "git",
"url": "https://github.com/ankitpokhrel/tus-php.git",
"reference": "33241690e7e70a463caa0c4d1f825948f59bdd1b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ankitpokhrel/tus-php/zipball/33241690e7e70a463caa0c4d1f825948f59bdd1b",
"reference": "33241690e7e70a463caa0c4d1f825948f59bdd1b",
"shasum": ""
},
"require": {
"ext-json": "",
"guzzlehttp/guzzle": "^6.3",
"nesbot/carbon": "^1.26.3 || ^2.0",
"php": "^7.1.3",
"predis/predis": "^1.1",
"ramsey/uuid": "^3.7",
"symfony/console": "^3.4.11 || ^4.0",
"symfony/event-dispatcher": "^3.4.11 || ^4.2",
"symfony/http-foundation": "^3.4.11 || ^4.0"
},
"require-dev": {
"ext-pcntl": "
",
"friendsofphp/php-cs-fixer": "^2.9",
"mockery/mockery": "^1.2.0",
"php-mock/php-mock": "^2.0",
"phpunit/phpunit": "^6.5.13"
},
"bin": [
"bin/tus"
],
"type": "library",
"autoload": {
"psr-4": {
"TusPhp\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Ankit Pokhrel",
"email": "hello@ankit.pl"
}
],
"description": "A pure PHP server and client for the tus resumable upload protocol v1.0.0",
"time": "2018-12-05T06:03:08+00:00"
},

@trangianhuan
Copy link
Author

@erunion
i live in asia.
i used:

"vimeo/laravel": "^5.2"
"name": "vimeo/vimeo-api",
 "version": "3.0.1",

tus:

{
            "name": "ankitpokhrel/tus-php",
            "version": "dev-master",
            "source": {
                "type": "git",
                "url": "https://github.com/ankitpokhrel/tus-php.git",
                "reference": "c4db35ed7cbc1d6f8519f1f07408c064e2761aff"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/ankitpokhrel/tus-php/zipball/c4db35ed7cbc1d6f8519f1f07408c064e2761aff",
                "reference": "c4db35ed7cbc1d6f8519f1f07408c064e2761aff",
                "shasum": ""
            },
            "require": {
                "ext-json": "*",
                "guzzlehttp/guzzle": "^6.3",
                "nesbot/carbon": "^1.26.3 || ^2.0",
                "php": "^7.1.3",
                "predis/predis": "^1.1",
                "ramsey/uuid": "^3.7",
                "symfony/console": "^3.4.11 || ^4.0",
                "symfony/event-dispatcher": "^3.4.11 || ^4.2",
                "symfony/http-foundation": "^3.4.11 || ^4.0"
            },
            "require-dev": {
                "ext-pcntl": "*",
                "friendsofphp/php-cs-fixer": "^2.9",
                "mockery/mockery": "^1.2.0",
                "php-mock/php-mock": "^2.0",
                "phpunit/phpunit": "^6.5.13"
            },
            "bin": [
                "bin/tus"
            ],
            "type": "library",
            "autoload": {
                "psr-4": {
                    "TusPhp\\": "src/"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "Ankit Pokhrel",
                    "email": "hello@ankit.pl"
                }
            ],
            "description": "A pure PHP server and client for the tus resumable upload protocol v1.0.0",
            "time": "2018-12-09T16:13:35+00:00"
        },

@jason-rudland
Copy link

jason-rudland commented Dec 18, 2018

Same error here...using Laravel and servers in Europe.

    {
        "name": "vimeo/laravel",
        "version": "5.2.0",
        "source": {
            "type": "git",
            "url": "https://github.com/vimeo/laravel.git",
            "reference": "32ab87610e876beee64b571401666f5bf59c1496"
        },
        "dist": {
            "type": "zip",
            "url": "https://api.github.com/repos/vimeo/laravel/zipball/32ab87610e876beee64b571401666f5bf59c1496",
            "reference": "32ab87610e876beee64b571401666f5bf59c1496",
            "shasum": ""
        },
        "require": {
            "graham-campbell/manager": "^4.0",
            "illuminate/contracts": "5.7.*",
            "illuminate/support": "5.7.*",
            "php": "^7.1.3",
            "vimeo/vimeo-api": "^3.0"
        },
        "require-dev": {
            "graham-campbell/analyzer": "^2.0",
            "graham-campbell/testbench": "^5.0",
            "mockery/mockery": "^1.0",
            "phpunit/phpunit": "^7.0"
        },
        "type": "library",
        "extra": {
            "branch-alias": {
                "dev-master": "4.0-dev"
            },
            "laravel": {
                "providers": [
                    "Vimeo\\Laravel\\VimeoServiceProvider"
                ],
                "aliases": {
                    "Vimeo": "Vimeo\\Laravel\\Facades\\Vimeo"
                }
            }
        },
        "autoload": {
            "psr-4": {
                "Vimeo\\Laravel\\": "src/"
            }
        },
        "notification-url": "https://packagist.org/downloads/",
        "license": [
            "Apache-2.0"
        ],
        "authors": [
            {
                "name": "Vincent Klaiber",
                "email": "hello@vinkla.com",
                "homepage": "https://vinkla.com"
            },
            {
                "name": "Jon Ursenbach",
                "email": "jonu@vimeo.com"
            }
        ],
        "description": "A Vimeo bridge for Laravel",
        "keywords": [
            "laravel",
            "video",
            "vimeo"
        ],
        "time": "2018-11-19T19:12:30+00:00"
    },
    {
        "name": "vimeo/vimeo-api",
        "version": "3.0.1",
        "source": {
            "type": "git",
            "url": "https://github.com/vimeo/vimeo.php.git",
            "reference": "c65d2827fdd20752a68bcfdc527e2c81d8544989"
        },
        "dist": {
            "type": "zip",
            "url": "https://api.github.com/repos/vimeo/vimeo.php/zipball/c65d2827fdd20752a68bcfdc527e2c81d8544989",
            "reference": "c65d2827fdd20752a68bcfdc527e2c81d8544989",
            "shasum": ""
        },
        "require": {
            "ankitpokhrel/tus-php": "dev-master#460f00c14b774ec105dc840c61f229cc29c2f405",
            "ext-curl": "*",
            "ext-json": "*",
            "php": ">=7.1.0"
        },
        "require-dev": {
            "php-coveralls/php-coveralls": "^1.0",
            "phpunit/phpunit": "^7.4",
            "vimeo/psalm": "^2.0"
        },
        "type": "library",
        "autoload": {
            "psr-4": {
                "Vimeo\\": "src/Vimeo"
            }
        },
        "notification-url": "https://packagist.org/downloads/",
        "license": [
            "Apache-2.0"
        ],
        "authors": [
            {
                "name": "Vimeo",
                "homepage": "http://vimeo.com"
            }
        ],
        "description": "Official PHP library for the Vimeo API.",
        "homepage": "https://github.com/vimeo/vimeo.php",
        "keywords": [
            "video",
            "vimeo"
        ],
        "time": "2018-11-19T19:01:15+00:00"
    },

  {
        "name": "ankitpokhrel/tus-php",
        "version": "dev-master",
        "source": {
            "type": "git",
            "url": "https://github.com/ankitpokhrel/tus-php.git",
            "reference": "c4db35ed7cbc1d6f8519f1f07408c064e2761aff"
        },
        "dist": {
            "type": "zip",
            "url": "https://api.github.com/repos/ankitpokhrel/tus-php/zipball/c4db35ed7cbc1d6f8519f1f07408c064e2761aff",
            "reference": "c4db35ed7cbc1d6f8519f1f07408c064e2761aff",
            "shasum": ""
        },
        "require": {
            "ext-json": "*",
            "guzzlehttp/guzzle": "^6.3",
            "nesbot/carbon": "^1.26.3 || ^2.0",
            "php": "^7.1.3",
            "predis/predis": "^1.1",
            "ramsey/uuid": "^3.7",
            "symfony/console": "^3.4.11 || ^4.0",
            "symfony/event-dispatcher": "^3.4.11 || ^4.2",
            "symfony/http-foundation": "^3.4.11 || ^4.0"
        },
        "require-dev": {
            "ext-pcntl": "*",
            "friendsofphp/php-cs-fixer": "^2.9",
            "mockery/mockery": "^1.2.0",
            "php-mock/php-mock": "^2.0",
            "phpunit/phpunit": "^6.5.13"
        },
        "bin": [
            "bin/tus"
        ],
        "type": "library",
        "autoload": {
            "psr-4": {
                "TusPhp\\": "src/"
            }
        },
        "notification-url": "https://packagist.org/downloads/",
        "license": [
            "MIT"
        ],
        "authors": [
            {
                "name": "Ankit Pokhrel",
                "email": "hello@ankit.pl"
            }
        ],
        "description": "A pure PHP server and client for the tus resumable upload protocol v1.0.0",
        "time": "2018-12-09T16:13:35+00:00"
    },

@erunion
Copy link
Contributor

erunion commented Dec 18, 2018

Just an update, we've narrowed it down to not being region-specific, but that Composer isn't treating our tus-php dependency locking properly. We'll hopefully have a fix out in a few hours.

@erunion
Copy link
Contributor

erunion commented Dec 18, 2018

I've just packaged up 3.0.2 that has a fix to properly lock our ankitpokhrel/tus-php dependency at v0.1.0.

We've done some testing and haven't been able to replicate the invalid bucket error. Please let us know if you are still getting it after upgrading to 3.0.2 (you should also see that ankitpokhrel/tus-php will be downgraded from dev-master c4db35e to v0.1.0)

@erunion
Copy link
Contributor

erunion commented Dec 18, 2018

And if you're using vimeo/laravel, you may need to remove and re-add it from Composer in order for it to properly pull down the latest vimeo/vimeo-api.

@DavidTrujillo
Copy link

And if you're using vimeo/laravel, you may need to remove and re-add it from Composer in order for it to properly pull down the latest vimeo/vimeo-api.

It works!!! In composer.json I put:

"vimeo/vimeo-api": "^3.0.2",
"vimeo/laravel": "^5.2"

Thank you!

@erunion
Copy link
Contributor

erunion commented Dec 18, 2018

Awesome! Sorry for the troubles. Glad it's working again.

@erunion erunion closed this as completed Dec 18, 2018
@trangianhuan
Copy link
Author

yeah! it worked.

@realtebo
Copy link

I'm having the same problem on an PRODUCTION app.

I restricted code to a call to /tutorial to test response and config, and a call to upload using a 1.4 MB Video.

This is the summary of the problem

Array
(
    [body] => Array
        (
            [message] => Success! You just interacted with the Vimeo API. Your dev environment is configured correctly, and the client ID, client secret, and access token that you provided are all working fine.
            [next_steps_link] => https://developer.vimeo.com/api/guides/videos/upload
            [token_is_authenticated] => 1
        )

    [status] => 200
    [headers] => Array
        (
            [Server] => nginx
            [Content-Type] => application/vnd.vimeo.tutorial+json
            [Cache-Control] => private, no-store, no-cache
            [Strict-Transport-Security] => max-age=31536000; includeSubDomains; preload
            [X-RateLimit-Limit] => 500
            [X-RateLimit-Remaining] => 495
            [X-RateLimit-Reset] => 2019-08-22T15:41:35+00:00
            [X-Vimeo-DC] => ge
            [Accept-Ranges] => bytes
            [Via] => 1.1 varnish
            [Age] => 0
            [Content-Length] => 302
            [Date] => Thu, 22 Aug 2019 15:40:56 GMT
            [Connection] => keep-alive
            [X-Served-By] => cache-bwi5145-BWI, cache-mxp19836-MXP
            [X-Cache] => MISS, MISS
            [X-Cache-Hits] => 0, 0
            [X-Timer] => S1566488456.064731,VS0,VE144
            [Vary] => Accept,Vimeo-Client-Id,Accept-Encoding
        )

)

Fatal error: Uncaught Vimeo\Exceptions\VimeoUploadException: Client error: `POST https://files.tus.vimeo.com/files/vimeo-prod-src-tus-eu` resulted in a `400 Bad Request` response: {"error":"Invalid bucket"} in /vendor/vimeo/vimeo-api/src/Vimeo/Vimeo.php:603 Stack trace: #0 /vendor/vimeo/vimeo-api/src/Vimeo/Vimeo.php(338): Vimeo\Vimeo->perform_upload_tus('video.mp4', 1692060, Array) #1 /public/demo_vimeo.php(39): Vimeo\Vimeo->upload('video.mp4', Array) #2 {main} thrown in /vendor/vimeo/vimeo-api/src/Vimeo/Vimeo.php on line 603

@erunion erunion removed their assignment Aug 22, 2019
@hugosenna
Copy link

I'm having the same problem on an PRODUCTION app.

I restricted code to a call to /tutorial to test response and config, and a call to upload using a 1.4 MB Video.

This is the summary of the problem

Array
(
    [body] => Array
        (
            [message] => Success! You just interacted with the Vimeo API. Your dev environment is configured correctly, and the client ID, client secret, and access token that you provided are all working fine.
            [next_steps_link] => https://developer.vimeo.com/api/guides/videos/upload
            [token_is_authenticated] => 1
        )

    [status] => 200
    [headers] => Array
        (
            [Server] => nginx
            [Content-Type] => application/vnd.vimeo.tutorial+json
            [Cache-Control] => private, no-store, no-cache
            [Strict-Transport-Security] => max-age=31536000; includeSubDomains; preload
            [X-RateLimit-Limit] => 500
            [X-RateLimit-Remaining] => 495
            [X-RateLimit-Reset] => 2019-08-22T15:41:35+00:00
            [X-Vimeo-DC] => ge
            [Accept-Ranges] => bytes
            [Via] => 1.1 varnish
            [Age] => 0
            [Content-Length] => 302
            [Date] => Thu, 22 Aug 2019 15:40:56 GMT
            [Connection] => keep-alive
            [X-Served-By] => cache-bwi5145-BWI, cache-mxp19836-MXP
            [X-Cache] => MISS, MISS
            [X-Cache-Hits] => 0, 0
            [X-Timer] => S1566488456.064731,VS0,VE144
            [Vary] => Accept,Vimeo-Client-Id,Accept-Encoding
        )

)

Fatal error: Uncaught Vimeo\Exceptions\VimeoUploadException: Client error: `POST https://files.tus.vimeo.com/files/vimeo-prod-src-tus-eu` resulted in a `400 Bad Request` response: {"error":"Invalid bucket"} in /vendor/vimeo/vimeo-api/src/Vimeo/Vimeo.php:603 Stack trace: #0 /vendor/vimeo/vimeo-api/src/Vimeo/Vimeo.php(338): Vimeo\Vimeo->perform_upload_tus('video.mp4', 1692060, Array) #1 /public/demo_vimeo.php(39): Vimeo\Vimeo->upload('video.mp4', Array) #2 {main} thrown in /vendor/vimeo/vimeo-api/src/Vimeo/Vimeo.php on line 603

I really have a problem. what solution?

@airplanenoise
Copy link

having the same issue, even after trying to downgrade to vimeo-api 3.0.2 and vimeo/laravel 5.3 laboriously downgrading to tus 0.1.0 and still no luck. this was working fine before and we can't seem to track what changed on our end. we are in Europe. any advice/help welcome as this component is crucial to the project we are on.

@supersuphot
Copy link

supersuphot commented Nov 28, 2019

This is my first time using Vimeo PHP. Got this error

Fatal error: Uncaught Vimeo\Exceptions\VimeoUploadException: Client error: POST https://files.tus.vimeo.com/files/vimeo-prod-src-tus-asia resulted in a 400 Bad Request response: {"error":"Invalid bucket"} in /home/webapps/xxxx/vendor/vimeo/vimeo-api/src/Vimeo/Vimeo.php:603

@supersuphot
Copy link

supersuphot commented Nov 28, 2019

#237 This work for me.

@ghost
Copy link

ghost commented Dec 10, 2019

I have used vimeo/vimeo-api v3.0.3 and ankitpokhrel/tus-php v0.1.0 with laravel 5.7 to temp fix this problem. It is working for me now.

@kailasb
Copy link

kailasb commented Mar 4, 2021

@erunion
I'm facing the issue while upload the video.
it's working fine locally but it create the URL with https://asia-files.tus.vimeo.com/files/vimeo-prod-src-tus-asia/3db9d46ef63cdfb01112798c352b05de

but when I upload the video from server it generating URL like https://europe-files.tus.vimeo.com/files/vimeo-prod-src-tus-eu/62566c38373b68318218e1f2b8239eb5 this and getting error "Unable to create resource"

can you help on this?

@erunion
Copy link
Contributor

erunion commented Mar 4, 2021

@kailasb I no longer work at Vimeo so you'll have to reach out to their support team for help. Sorry!

@pankajborad-hyperspace
Copy link

{"exception":"[object] (Vimeo\Exceptions\VimeoUploadException(code: 0): Unable to create resource. at /var/www/html/vendor/vimeo/vimeo-api/src/Vimeo/Vimeo.php:614)

i am using laravel and inside public folder there is one folder inside that folder there is a video
i will to move those video in to vimeo using cro job

here is my code
$uri = Vimeo::upload(public_path("gallery-video")."/".$fileVideoName,['title' => Carbon::now(),'description' => "VIMVIDEO-".Carbon::now()]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests