yt-watchme
yt-watchme copied to clipboard
Authentication error
When i run this project then got error of authentication.
com.google.android.apps.watchme E/GooglePlayServicesUtil﹕ The Google Play services resources were not found. Check your project configuration to ensure that the resources are included. 11-05 15:23:37.214 4356-4402/com.google.android.apps.watchme E/WatchMe﹕ com.google.api.client.googleapis.extensions.android.gms.auth.UserRecoverableAuthIOException at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential$RequestHandler.intercept(GoogleAccountCredential.java:284) at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:859) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460) at com.google.android.apps.watchme.util.YouTubeApi.getLiveEvents(YouTubeApi.java:155) at com.google.android.apps.watchme.MainActivity$GetLiveEventsTask.doInBackground(MainActivity.java:332) at com.google.android.apps.watchme.MainActivity$GetLiveEventsTask.doInBackground(MainActivity.java:315) at android.os.AsyncTask$2.call(AsyncTask.java:287) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) at java.util.concurrent.FutureTask.run(FutureTask.java:137) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) at java.lang.Thread.run(Thread.java:856) Caused by: com.google.android.gms.auth.UserRecoverableAuthException: NeedPermission at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source) at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source) at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential.getToken(GoogleAccountCredential.java:255) at com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential$RequestHandler.intercept(GoogleAccountCredential.java:279) at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:859) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:410) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:343) at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:460) at com.google.android.apps.watchme.util.YouTubeApi.getLiveEvents(YouTubeApi.java:155) at com.google.android.apps.watchme.MainActivity$GetLiveEventsTask.doInBackground(MainActivity.java:332) at com.google.android.apps.watchme.MainActivity$GetLiveEventsTask.doInBackground(MainActivity.java:315) at android.os.AsyncTask$2.call(AsyncTask.java:287) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305) at java.util.concurrent.FutureTask.run(FutureTask.java:137) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569) at java.lang.Thread.run(Thread.java:856)
Try to pull latest changes, this error was fixed https://github.com/youtube/yt-watchme/commit/4b28ed6b50c4e30e87a2fe7d7276dd00356acdff
ok,thank. but after that got another error com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden { "code": 403, "errors": [ { "domain": "usageLimits", "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project.", "reason": "accessNotConfigured" } ], "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project." }
i checked that Google+ API ,YouTube Analytics API ,YouTube Data API v3 On with my account. also created Client ID for Android application
please reply here
Make sure that you running signed APK.
yes, i run with signed APK and also added SHA1 with certificate
which apis require for youtube live streaming ?
please reply here.
ok, above issue solved but got below error. { "code": 403, "errors": [ { "domain": "youtube.liveBroadcast", "message": "The user is not enabled for live streaming.", "reason": "liveStreamingNotEnabled", "extendedHelp": "https://www.youtube.com/features" } ], "message": "The user is not enabled for live streaming." } Can you please help for this ?
You should enable this feature in the YouTube account. Sorry, i don't remember details how i did this :) . Go to the Creator Studio and try do create live event there. In my case youtube show me some license form, and then send confirmation SMS. Also, cold you explain how do you solve "com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden" error?
ok,thanks i created live event and got event list. but when click on video then got error of Ffmpeg.
Process: com.google.android.apps.watchmenew, PID: 15117
java.lang.UnsatisfiedLinkError: Couldn't load ffmpeg from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.google.android.apps.watchmenew-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.google.android.apps.watchmenew-2, /vendor/lib, /system/lib]]]: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:358)
at java.lang.System.loadLibrary(System.java:526)
at com.google.android.apps.watchmenew.Ffmpeg.
Why this error got ? can you help here?
Now you should build ffmpeg library and include it to the project.
yes. Thanks for your support
where can i input my client key ? i registed a new android client key in https://console.developers.google.com , but i did find which file i can input it
Hi,
I am using the same sample application. Getting error,
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden { "code": 403, "errors": [ { "domain": "usageLimits", "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project.", "reason": "accessNotConfigured" } ], "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project." }
Where do I need to place API key?
@anuragcm, Actually you don't need to do that. When you've generating new Android Client key, you should type your app package name. This is enough for authentication.
I have solved this problem after some RnD. The thing is first enable youtubeapi v3 and google+ api then go to crediantial and before generating android api key first generate the client id by clicking "create new client id" then select installed application and choose android. Below you have to give the exact package name of you app and sha1 fingerprint then select deep linking and atlast create client id. After created then create the android api key for player youtube video. It will definately work for you. Then your api key will be working. Remember in filling your package name, your package name will be same with your app in eclipe or studio. If after creating client id, you changed your package name then you key will not work. Remember pckg name is restricted here, and will not have to be changed......
We just keep getting the same error "com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden ...." and the url is showing "https://console.developers.google.com/apis/api/youtube/overview?project=608941808256".
We have created our API key and updated it in MainActivity.java. Any suggestions? (I'm writing to you after 2 days of wall banging!"
Thanks, Rohit
I was solve above problem.....but when i am streaming then it show exception "java.lang.UnsatisfiedLinkError: Couldn't load ffmpeg from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.google.android.apps.watchmenew-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.google.android.apps.watchmenew-2, /vendor/lib, /system/lib]]]".....
Any suggestions?
@moonandroid Please tell me how you resolve the problrem with { "code": 403, "errors": [ { "domain": "usageLimits", "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project.", "reason": "accessNotConfigured" } ], "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project." } I signed my app too and change name APP_NAME and USER_EMAIL, but still have this error. I changed APP_NAME to name of my project in google console