Giter Site home page Giter Site logo

Not found exception about youtube HOT 27 CLOSED

Jhilik11 avatar Jhilik11 commented on August 20, 2024
Not found exception

from youtube.

Comments (27)

alisholihindev avatar alisholihindev commented on August 20, 2024

i Had same issue, any solution?

from youtube.

joedawson avatar joedawson commented on August 20, 2024

Can you please show me your code?

from youtube.

alisholihindev avatar alisholihindev commented on August 20, 2024

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

from youtube.

Jhilik11 avatar Jhilik11 commented on August 20, 2024

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();
}

from youtube.

Jhilik11 avatar Jhilik11 commented on August 20, 2024

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"

from youtube.

joedawson avatar joedawson commented on August 20, 2024

@Ali07 @Jhilik11 preferably your controllers please.

from youtube.

alisholihindev avatar alisholihindev commented on August 20, 2024

@joedawson am i missing something?

from youtube.

Jhilik11 avatar Jhilik11 commented on August 20, 2024

VideoController.zip

from youtube.

joedawson avatar joedawson commented on August 20, 2024

Can you paste your controllers here?

from youtube.

Jhilik11 avatar Jhilik11 commented on August 20, 2024

class VideoController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Http\Response|\Illuminate\View\View
*/
public function index()
{
//
return view('video');
}

/**
 * Show the form for creating a new resource.
 *
 * @return \Illuminate\Http\Response
 */
public function create()
{
    //
}

/**
 * Store a newly created resource in storage.
 *
 * @param  \Illuminate\Http\Request  $request
 * @return string
 */
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();
}

/**
 * Display the specified resource.
 *
 * @param  int  $id
 * @return \Illuminate\Http\Response
 */
public function show($id)
{
    //
}

/**
 * Show the form for editing the specified resource.
 *
 * @param  int  $id
 * @return \Illuminate\Http\Response
 */
public function edit($id)
{
    //

}

/**
 * Update the specified resource in storage.
 *
 * @param  \Illuminate\Http\Request  $request
 * @param  int  $id
 * @return \Illuminate\Http\Response
 */
public function update(Request $request, $id)
{
    //
}

/**
 * Remove the specified resource from storage.
 *
 * @param  int  $id
 * @return \Illuminate\Http\Response
 */
public function destroy($id)
{
    //
}

}

from youtube.

joedawson avatar joedawson commented on August 20, 2024

@Jhilik11 The full controller please!

from youtube.

joedawson avatar joedawson commented on August 20, 2024

Everything from <?php onwards

from youtube.

Jhilik11 avatar Jhilik11 commented on August 20, 2024

``<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Youtube;

class VideoController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Http\Response|\Illuminate\View\View
*/
public function index()
{
//
return view('video');
}

/**
 * Show the form for creating a new resource.
 *
 * @return \Illuminate\Http\Response
 */
public function create()
{
    //
}

/**
 * Store a newly created resource in storage.
 *
 * @param  \Illuminate\Http\Request  $request
 * @return string
 */
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();
}

/**
 * Display the specified resource.
 *
 * @param  int  $id
 * @return \Illuminate\Http\Response
 */
public function show($id)
{
    //
}

/**
 * Show the form for editing the specified resource.
 *
 * @param  int  $id
 * @return \Illuminate\Http\Response
 */
public function edit($id)
{
    //

}

/**
 * Update the specified resource in storage.
 *
 * @param  \Illuminate\Http\Request  $request
 * @param  int  $id
 * @return \Illuminate\Http\Response
 */
public function update(Request $request, $id)
{
    //
}

/**
 * Remove the specified resource from storage.
 *
 * @param  int  $id
 * @return \Illuminate\Http\Response
 */
public function destroy($id)
{
    //
}

}

from youtube.

joedawson avatar joedawson commented on August 20, 2024

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

'aliases' => [
    ...
    'Youtube' => Dawson\Youtube\Facades\Youtube::class,
],

from youtube.

Jhilik11 avatar Jhilik11 commented on August 20, 2024

Yes

from youtube.

joedawson avatar joedawson commented on August 20, 2024

Yes

Does running composer dump-autoload resolve your issue?

from youtube.

Jhilik11 avatar Jhilik11 commented on August 20, 2024

I tried still not working

from youtube.

joedawson avatar joedawson commented on August 20, 2024

What version of the package are you using?

from youtube.

Jhilik11 avatar Jhilik11 commented on August 20, 2024

"dawson/youtube": "^5.0",

from youtube.

topclaudy avatar topclaudy commented on August 20, 2024

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

from youtube.

topclaudy avatar topclaudy commented on August 20, 2024

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

from youtube.

topclaudy avatar topclaudy commented on August 20, 2024

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)

from youtube.

alisholihindev avatar alisholihindev commented on August 20, 2024

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

from youtube.

topclaudy avatar topclaudy commented on August 20, 2024

@Ali07 I listed the related dependencies in my previous post

from youtube.

joedawson avatar joedawson commented on August 20, 2024

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

from youtube.

Jhilik11 avatar Jhilik11 commented on August 20, 2024

yes

from youtube.

alisholihindev avatar alisholihindev commented on August 20, 2024

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

from youtube.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.