YouTube API, Got Error: 1
-
Hello,
Im having this issue when adding my API:
“Something went wrong, WP YouTube Lyte might not have been able to retrieve information from the YouTube API, got error: 1”If I create a 2nd API and try it, I get:
“API key not OK, your key seems to have expired, please check in the Google Developer Console.”If I clear cache and try the 2nd API again I get the “error 1” again.
I saw this topic
https://www.ads-software.com/support/topic/api-key-wont-work-after-trying-several-settings-youtube-api-got-error-1/Unfortunately the solution wasn’t shared and that topic is closed.
-
Hi Frank,
the exact error I get using the Github version is:“Checking your key …
Something went wrong, WP YouTube Lyte might not have been able to retrieve information from the YouTube API, got error: 1”
And the error log is empty (but let me check why now it is seen as “read-only” file).[EDIT]
It was my fault. Now the error-log is is r\w and here is the log:/web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 536
[01-May-2018 07:08:10 UTC] PHP Warning: Illegal string offset ‘title’ in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 499
[01-May-2018 07:08:10 UTC] PHP Warning: Illegal string offset ‘thumbUrl’ in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 500
[01-May-2018 07:08:10 UTC] PHP Warning: Illegal string offset ‘HQthumbUrl’ in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 501
[01-May-2018 07:08:10 UTC] PHP Warning: Illegal string offset ‘dateField’ in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 502
[01-May-2018 07:08:10 UTC] PHP Warning: Illegal string offset ‘duration’ in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 503
[01-May-2018 07:08:10 UTC] PHP Warning: Illegal string offset ‘description’ in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 504
[01-May-2018 07:08:10 UTC] PHP Warning: Illegal string offset ‘captions_data’ in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 505
[01-May-2018 07:08:10 UTC] PHP Warning: Illegal string offset ‘captions_timestamp’ in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 506
[01-May-2018 07:08:10 UTC] PHP Warning: array_key_exists() expects parameter 2 to be array, string given in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 535
[01-May-2018 07:08:10 UTC] PHP Warning: Illegal string offset ‘title’ in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 536
[01-May-2018 07:08:10 UTC] PHP Warning: Cannot assign an empty string to a string offset in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 536
[01-May-2018 07:08:10 UTC] PHP Warning: array_key_exists() expects parameter 2 to be array, string given in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 535
[01-May-2018 07:08:10 UTC] PHP Warning: Illegal string offset ‘thumbUrl’ in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 536
[01-May-2018 07:08:10 UTC] PHP Warning: Cannot assign an empty string to a string offset in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 536
[01-May-2018 07:08:10 UTC] PHP Warning: array_key_exists() expects parameter 2 to be array, string given in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 535
[01-May-2018 07:08:10 UTC] PHP Warning: Illegal string offset ‘HQthumbUrl’ in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 536
[01-May-2018 07:08:10 UTC] PHP Warning: Cannot assign an empty string to a string offset in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 536
[01-May-2018 07:08:10 UTC] PHP Warning: array_key_exists() expects parameter 2 to be array, string given in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 535
[01-May-2018 07:08:10 UTC] PHP Warning: Illegal string offset ‘dateField’ in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 536
[01-May-2018 07:08:10 UTC] PHP Warning: Cannot assign an empty string to a string offset in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 536
[01-May-2018 07:08:10 UTC] PHP Warning: array_key_exists() expects parameter 2 to be array, string given in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 535
[01-May-2018 07:08:10 UTC] PHP Warning: Illegal string offset ‘duration’ in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 536
[01-May-2018 07:08:10 UTC] PHP Warning: Cannot assign an empty string to a string offset in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 536
[01-May-2018 07:08:10 UTC] PHP Warning: array_key_exists() expects parameter 2 to be array, string given in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 535
[01-May-2018 07:08:10 UTC] PHP Warning: Illegal string offset ‘description’ in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 536
[01-May-2018 07:08:10 UTC] PHP Warning: Cannot assign an empty string to a string offset in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 536
[01-May-2018 07:08:10 UTC] PHP Warning: array_key_exists() expects parameter 2 to be array, string given in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 535
[01-May-2018 07:08:10 UTC] PHP Warning: Illegal string offset ‘captions_data’ in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 536
[01-May-2018 07:08:10 UTC] PHP Warning: Cannot assign an empty string to a string offset in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 536
[01-May-2018 07:08:10 UTC] PHP Warning: array_key_exists() expects parameter 2 to be array, string given in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 535
[01-May-2018 07:08:10 UTC] PHP Warning: Illegal string offset ‘captions_timestamp’ in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 536
[01-May-2018 07:08:10 UTC] PHP Warning: Cannot assign an empty string to a string offset in /web/htdocs/www.MYWEBSITE.COM/home/wp-content/plugins/wp-youtube-lyte-master/wp-youtube-lyte.php on line 536Nicola
- This reply was modified 6 years, 7 months ago by nicolaottomano.
- This reply was modified 6 years, 7 months ago by nicolaottomano.
OK, for all the brave men & women working with me to fix this; I’ve created a “debug” version of LYTE which outputs debug info to the php errorlog. You can download it from https://github.com/futtta/wp-youtube-lyte/archive/debug.zip.
What I would like you to do:
* Disable the normal LYTE
* enable the debug-version
* fill in your API key
* extract the relevant data from your PHP errorlog (I specifically need the log entries that have “AJAX:” and “get YT:” in them)
* mail me those (relevant parts) of the debug log (to avoid long posts with significant amount of debug logging with potentially private info clogging up the forum)
* disable debug-version & re-enable normal versionfrank
This is _probably_ fixed (already confirmed by @mkalina based on the debug version) and I updated the master version on github (download link: https://github.com/futtta/wp-youtube-lyte/archive/master.zip). If I can get 1 or 2 more people confirming this works, I can push out 1.7.1 with confidence ??
I just deleted the version I had and installed the one from the link, I still got this error:
Something went wrong, WP YouTube Lyte might not have been able to retrieve information from the YouTube API, got error: 1
So no confidence. Darn. Can you check your php errorlog for errors @emilyatal?
ah, found the (very stupid) mistake in my fix, hang on ..
ok, so 2 lines to delete in wp-youtube-lyte.php (as seen in this commit) or remove previous version, re-download and re-upload the new zip.
crossing fingers yet again…
Ok, downloaded the new version and now got this message:
Checking your key ... API seems OK, you can Save Changes below now.
Looks like the change worked. Let me know if you still need to see the php errorlog. If so, I’d have to figure out how to activate it on my server.
w00t!!!!!!!!
No need to plough through error-logs, I’ll push out 1.7.1 tonight!
pushed out 1.7.1 which fixes this ugly bug. Thanks @emilyatal, @mkalina, @nicolaottomano, @aminech, @partounian and @nicksws for your help & perseverance! ??
Thanks to you Frank! You did a very nice work with this and Autoptimize plugins.
Perfect, thanks Frank. BTW API-Codes WITH restrictions work, too, now.
- The topic ‘YouTube API, Got Error: 1’ is closed to new replies.