joedawson / youtube

Upload a video to a single YouTube channel with Laravel 5.
MIT License
175 stars 105 forks source link

Not found exception #123

Closed Jhilik11 closed 1 year ago

Jhilik11 commented 4 years ago

Even after using use Youtube I am getting not found exception

alisholihindev commented 4 years ago

i Had same issue, any solution?

joedawson commented 4 years ago

Can you please show me your code?

alisholihindev commented 4 years ago

This is my code Screen Shot 2020-09-25 at 9 28 31 PM

and this is the response when i try to upload.. Screen Shot 2020-09-25 at 9 29 10 PM

Google_Service_Exception not found

Jhilik11 commented 4 years ago

public function store(Request $request) { //

    $video = Youtube::upload($request->file('video')->getPathName(), [
        'title'       => $request->input('title'),
        'description' => $request->input('description')
    ]));

    return "Video uploaded successfully. Video ID is ". $video->getVideoId();
}
Jhilik11 commented 4 years ago

One more thing I want to ask I am using using https on live server So when I am using https://your_domain/youtube/auth I am getting "Error 400: redirect_uri_mismatch"

joedawson commented 4 years ago

@Ali07 @Jhilik11 preferably your controllers please.

alisholihindev commented 4 years ago

@joedawson am i missing something?

Jhilik11 commented 4 years ago

VideoController.zip

joedawson commented 4 years ago

Can you paste your controllers here?

Jhilik11 commented 4 years ago

class VideoController extends Controller { /**

joedawson commented 4 years ago

@Jhilik11 The full controller please!

joedawson commented 4 years ago

Everything from <?php onwards

Jhilik11 commented 4 years ago

``<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request; use Youtube;

class VideoController extends Controller { /**

joedawson commented 4 years ago

@Jhilik11 have you also registered the alias in config/app.php?

'aliases' => [
    ...
    'Youtube' => Dawson\Youtube\Facades\Youtube::class,
],
Jhilik11 commented 4 years ago

Yes

joedawson commented 4 years ago

Yes

Does running composer dump-autoload resolve your issue?

Jhilik11 commented 4 years ago

I tried still not working

joedawson commented 4 years ago

What version of the package are you using?

Jhilik11 commented 4 years ago

"dawson/youtube": "^5.0",

topclaudy commented 4 years ago

I have the same problem with Laravel 8. Worked with Laravel 7

topclaudy commented 4 years ago

This error happens when executing this line of code: $status = $media->nextChunk($chunk);

topclaudy commented 4 years ago

This is not related to the package. It works after updating my dependencies:

....
  - Updating google/apiclient-services (v0.147 => v0.148): Downloading (100%)         
  - Updating guzzlehttp/promises (v1.3.1 => 1.4.0): Downloading (100%)         
  - Updating guzzlehttp/psr7 (1.6.1 => 1.7.0): Downloading (100%)         
  - Updating laravel/framework (v8.6.0 => v8.7.1): Downloading (100%)           
  - Updating guzzlehttp/guzzle (7.1.0 => 7.1.1): Downloading (100%)         
....

Probably something bogus with the previous version of some guzzle related packages (or guzzlehttp/guzzle itself)

alisholihindev commented 4 years ago

can I see your dependencies? i still get the error.. @topclaudy

topclaudy commented 4 years ago

@Ali07 I listed the related dependencies in my previous post

joedawson commented 4 years ago

@Jhilik11 @Ali07 are either of you still experiencing an issue after updating your packages?

Jhilik11 commented 4 years ago

yes

alisholihindev commented 4 years ago

@joedawson i'm good, i think the problem from the API, took sometime to get the data... thank you..