nanostudio-org / nanogp2 Goto Github PK
View Code? Open in Web Editor NEWGoogle Photos provider for nanogallery2
Home Page: https://nanogallery2.nanostudio.org
Google Photos provider for nanogallery2
Home Page: https://nanogallery2.nanostudio.org
Hello,
I created a docker-image for nanogp2 (https://cloud.docker.com/u/joshuabeny/repository/docker/joshuabeny/nanogp2).
But the issue has nothing to do with this. It was already in my old installation. I tried now with the docker image to run nanogp2 on an own subdomain because I use it for more than one website. So I tested a new installation with the latest version of nanogp2. But this seems not to resolve the issue.
The authorization of the accounts works perfectly. But if I want to use any google album with nanogallery2 it loads 1 minute and afterwards following error Message appears:
nanogallery2: Could not retrieve Google data. Error: error, error readyState=4
getResponseHeader=function(a){var b;if(2===t){if(!f){f={};while(b=gb.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b}
getAllResponseHeaders=function(){return 2===t?e:null}
setRequestHeader=function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this}
overrideMimeType=function(a){return t||(k.mimeType=a),this}
statusCode=function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this}
abort=function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}
state=function(){return c}
always=function(){return e.done(arguments).fail(arguments),this}
then=function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()}
promise=function(a){return null!=a?n.extend(a,d):d}
pipe=function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()}
done=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
fail=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
progress=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
complete=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
success=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
error=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
status=404
statusText=error
URL:https://MYHOST/nanogp2.php?nguserid=MYUSERID&ngalbumid=MYALBUMID&alt=json&v=3&kind=photo& [my_nanogallery]
In the developer console of the browser, I see an error 504 - Gateway Timeout.
In the logs.txt it is really strange that it always tries to obtain a new access token for a minute.
...
[21/Sep/2019:18:33:04] new access token obtained - MYUSERID
[21/Sep/2019:18:33:04] new access token obtained - MYUSERID
[21/Sep/2019:18:33:04] new access token obtained - MYUSERID
[21/Sep/2019:18:33:05] new access token obtained - MYUSERID
[21/Sep/2019:18:33:05] new access token obtained - MYUSERID
[21/Sep/2019:18:33:05] new access token obtained - MYUSERID
[21/Sep/2019:18:33:05] new access token obtained - MYUSERID
[21/Sep/2019:18:33:05] new access token obtained - MYUSERID
[21/Sep/2019:18:33:06] new access token obtained - MYUSERID
[21/Sep/2019:18:33:06] new access token obtained - MYUSERID
[21/Sep/2019:18:33:06] new access token obtained - MYUSERID
[21/Sep/2019:18:33:06] new access token obtained - MYUSERID
[21/Sep/2019:18:33:06] new access token obtained - MYUSERID
[21/Sep/2019:18:33:07] new access token obtained - MYUSERID
[21/Sep/2019:18:33:07] new access token obtained - MYUSERID
[21/Sep/2019:18:33:07] new access token obtained - MYUSERID
[21/Sep/2019:18:33:07] new access token obtained - MYUSERID
[21/Sep/2019:18:33:07] new access token obtained - MYUSERID
[21/Sep/2019:18:33:08] new access token obtained - MYUSERID
[21/Sep/2019:18:33:08] new access token obtained - MYUSERID
[21/Sep/2019:18:33:08] new access token obtained - MYUSERID
[21/Sep/2019:18:33:08] new access token obtained - MYUSERID
[21/Sep/2019:18:33:09] new access token obtained - MYUSERID
...
I already tried to revoke and reauthorize my user. This didn't help. I also tried another google account with only a few albums, but this one also did not work.
I hope you could help me fix the issue.
I'm trying to use Nanogp2 in a multi-domain environment. It works, my Photo Gallery is shown like before. However, Nanogp2 is in a shared directory. Is it possible to use authorize.php for different users? I know Nanogp worked like that as I just migrated to Nanogp2, but Nanogp2 is always using my authorization and not creating new ones for new users. Is it even possible?
I´m open this thread cause my issue not solved.
There's an issue in your Google Console API settings.
Please check theAuthorized redirect URIs
The path must be "http://www.domain.com/nanogp2/authorize.php" or "http://www.domain.com/nanogp2/" ??
Hi, sorry cant understand the problem
http://pjk.ee/nanogp2/test.html
report working.
Thank You
Hi,
I followed every step described in the readme, but no album is being loaded. I keep running into this error:
nanogallery2: Could not retrieve Google data. Error: parsererror, SyntaxError: Unexpected token < readyState=4
getResponseHeader=function(a){var b;if(2===t){if(!f){f={};while(b=ic.exec(e))f[b[1].toLowerCase()]=b[2]}b=f[a.toLowerCase()]}return null==b?null:b}
getAllResponseHeaders=function(){return 2===t?e:null}
setRequestHeader=function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this}
overrideMimeType=function(a){return t||(k.mimeType=a),this}
statusCode=function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this}
abort=function(a){var b=a||u;return c&&c.abort(b),x(0,b),this}
state=function(){return c}
always=function(){return e.done(arguments).fail(arguments),this}
then=function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()}
promise=function(a){return null!=a?n.extend(a,d):d}
pipe=function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()}
done=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
fail=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
progress=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
complete=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
success=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
error=function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this}
responseText=
Fatal error: Maximum execution time of 30 seconds exceeded in /home/keeken23/domains/hopsjlokkers.nl/public_html/nanogp2/nanogp2.php on line 142
status=200
statusText=OK
Am I missing something? I created a test page on https://www.hopsjlokkers.nl/test.php
Kind regards,
Rick
Hello, I really want to launch this gallery.
I installed nanogallery2 and nanogp2 on my web server and completed all the steps as I know. What I am trying to achieve is google photos albums, but then I load a template I get this error.
What causes this, can I get some help, please?
In nanogp2.php, when retrieving the list of albums, it seems that
$request['pageSize'] = '50'
should be $request['pageSize'] = 50
Hi,
After updating my gallery to use nanogp2 the load time of the gallery seems to have drastically increased. The gallery used to load much quicker with the previous version. I also setup the gallery to just load the first 10 rows and have a more button to increase the performance, however it still takes long to load.
I did record the performace while the gallery was loading and noticed that their is multiple records for Recalculating style and applying style changes.
Your help with this would be highly appreciated.
Bonjour,
J'ai bien récupéré mon ID utilisateur après affichage de "Cette application n'est pas vérifiée".
J'ai également obtenu la liste des albums sur le serveur dans "users".
Je peux bien visionner les albums qui ont été traités selon ces nouveaux codes.
Le problème vient de la récupération des listes d'albums ; lorsque je demande une nouvelle liste (après avoir supprimé l'ancienne), j'ai ce message d'erreur : [{"nano_status":"error","nano_message":"Missing access token. Please grant authorization."}] et je ne peux plus poursuivre mes mises à jour.
D'avance merci de votre aide.
Does this version of Nanogallery2 still work with Google Photos and PHP 8.1? We've moved to a new server with PHP 8.1 and Nanogallery2 is having problems. It worked on your old server with a lower PHP version.
nanogallery2: Could not retrieve Google data. Error: error, error readyState=4
Hi,
Recently I received a mail from Google Developers nanogp2, being inactive and/or not in compliance with Google's OAuth URI validation rules. I wonder if I have to worry / take action / ...
MAIL SUBJECT
[Action Advised] Inactive registered OAuth URIs for your project(s) will be removed from Google Developer Console by July 12, 2021, for non-compliance with URI validation rules
MAIL BODY
We are writing to let you know that you have inactive OAuth redirect URIs and JavaScript origins in your Google Cloud project that are not in compliance with Google’s OAuth URI validation rules.
What do I need to do to be compliant?
The following Google Cloud project(s), which has/have registered OAuth redirect URIs and JavaScript origins without usage for over 90 days, and which will be removed by July 12, 2021:
Project ID: nanogallery2gp-...
Client: ...-...apps.googleusercontent.com
URI: http://.../nanogp2/authorize.php
URI: http://.../nanogp2/authorize.php
If you have any questions or concerns regarding these changes, please review the documentation provided above in this email.
Sincerely,
The Google Developer Team
Hi, I was trying to authroize my gallery to my website but after clicking allow on the google permissions, when i get redirected back to my website, i get a 404 error despite the redirect URI setup correctly. Your assistance with this would be highly appreciated.
Thanks
After we have authorize the Api. we are not getting user id screen instead getting following error
Error. Page cannot be displayed. Please contact your service provider for more details. (20)
I am trying to use nanogp2 along with nanogallery2 and I have followed all steps describe on this Github page, authorization was successful, but when I opened my gallery page I saw the following error on Chrome (dev) console (shown further down) and nothing is shown on my gallery page. Below is the html markup on my gallery page. Any idea?
<div id="nanogallery2" data-nanogallery2='{ "kind": "google2", "userID": "<obscured>", "album": "<obscured>", "google2URL": "http://my.domain.com/nanogp2/nanogp2.php", "thumbnailHeight": 150, "thumbnailWidth": "auto" }'></div>
jquery.nanogallery2.data_google2.min.js:10 Uncaught TypeError: Cannot read property 'openSearch$startIndex' of undefined
at Object.success (jquery.nanogallery2.data_google2.min.js:10)
at u (jquery-3.3.1.min.js:2)
at Object.fireWith [as resolveWith] (jquery-3.3.1.min.js:2)
at k (jquery-3.3.1.min.js:2)
at XMLHttpRequest. (jquery-3.3.1.min.js:2)
(anonymous) @ jquery.nanogallery2.data_google2.min.js:10
u @ jquery-3.3.1.min.js:2
fireWith @ jquery-3.3.1.min.js:2
k @ jquery-3.3.1.min.js:2
(anonymous) @ jquery-3.3.1.min.js:2
load (async)
send @ jquery-3.3.1.min.js:2
ajax @ jquery-3.3.1.min.js:2
w.(anonymous function) @ jquery-3.3.1.min.js:2
getJSON @ jquery-3.3.1.min.js:2
s @ jquery.nanogallery2.data_google2.min.js:10
i @ jquery.nanogallery2.data_google2.min.js:10
jQuery.nanogallery2.data_google2 @ jquery.nanogallery2.data_google2.min.js:10
ia @ jquery.nanogallery2.min.js:22
m @ jquery.nanogallery2.min.js:21
initiateGallery2 @ jquery.nanogallery2.min.js:25
d.init @ jquery.nanogallery2.min.js:25
a.nanogallery2 @ jquery.nanogallery2.min.js:25
(anonymous) @ jquery.nanogallery2.min.js:26
each @ jquery-3.3.1.min.js:2
each @ jquery-3.3.1.min.js:2
jQuery.fn.nanogallery2 @ jquery.nanogallery2.min.js:26
(anonymous) @ jquery.nanogallery2.min.js:41
l @ jquery-3.3.1.min.js:2
c @ jquery-3.3.1.min.js:2
setTimeout (async)
(anonymous) @ jquery-3.3.1.min.js:2
u @ jquery-3.3.1.min.js:2
fireWith @ jquery-3.3.1.min.js:2
fire @ jquery-3.3.1.min.js:2
u @ jquery-3.3.1.min.js:2
fireWith @ jquery-3.3.1.min.js:2
ready @ jquery-3.3.1.min.js:2
_ @ jquery-3.3.1.min.js:2
jquery.nanogallery2.min.js:25 Uncaught TypeError: Cannot read property 'baseEltID' of undefined
at String.a.NanoConsoleLog (jquery.nanogallery2.min.js:25)
at a.NanoAlert (jquery.nanogallery2.min.js:25)
at jquery.nanogallery2.data_google2.min.js:10
a.NanoConsoleLog @ jquery.nanogallery2.min.js:25
a.NanoAlert @ jquery.nanogallery2.min.js:25
(anonymous) @ jquery.nanogallery2.data_google2.min.js:10
setTimeout (async)
i @ jquery.nanogallery2.data_google2.min.js:10
jQuery.nanogallery2.data_google2 @ jquery.nanogallery2.data_google2.min.js:10
ia @ jquery.nanogallery2.min.js:22
m @ jquery.nanogallery2.min.js:21
initiateGallery2 @ jquery.nanogallery2.min.js:25
d.init @ jquery.nanogallery2.min.js:25
a.nanogallery2 @ jquery.nanogallery2.min.js:25
(anonymous) @ jquery.nanogallery2.min.js:26
each @ jquery-3.3.1.min.js:2
each @ jquery-3.3.1.min.js:2
jQuery.fn.nanogallery2 @ jquery.nanogallery2.min.js:26
(anonymous) @ jquery.nanogallery2.min.js:41
l @ jquery-3.3.1.min.js:2
c @ jquery-3.3.1.min.js:2
setTimeout (async)
(anonymous) @ jquery-3.3.1.min.js:2
u @ jquery-3.3.1.min.js:2
fireWith @ jquery-3.3.1.min.js:2
fire @ jquery-3.3.1.min.js:2
u @ jquery-3.3.1.min.js:2
fireWith @ jquery-3.3.1.min.js:2
ready @ jquery-3.3.1.min.js:2
_ @ jquery-3.3.1.min.js:2
I went through all the steps to connect nanogp2 with Google Photos successfully but whenever I run something by using the nanogp2.php I get an error 500 like this:
nanogallery2: Could not retrieve Google data. Error: error, readyState=4
getResponseHeader=function(e){var t;if(c){if(!s){s={};while(t=Ot.exec(a))s[t[1].toLowerCase()]=t[2]}t=s[e.toLowerCase()]}return null==t?null:t}
getAllResponseHeaders=function(){return c?a:null}
setRequestHeader=function(e,t){return null==c&&(e=T[e.toLowerCase()]=T[e.toLowerCase()]||e,b[e]=t),this}
overrideMimeType=function(e){return null==c&&(h.mimeType=e),this}
statusCode=function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)x[t]=[x[t],e[t]];return this}
abort=function(e){var t=e||C;return i&&i.abort(t),k(0,t),this}
state=function(){return r}
always=function(){return o.done(arguments).fail(arguments),this}
catch=function(e){return i.then(null,e)}
pipe=function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()}
then=function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t<o)){if((e=r.apply(s,u))===n.promise())throw new="" typeerror("thenable="" self-resolution");l="e&&("object"==typeof" e||"function"="=typeof" e)&&e.then,g(l)?i?l.call(e,a(o,n,i,i),a(o,n,w,i)):(o++,l.call(e,a(o,n,i,i),a(o,n,w,i),a(o,n,i,n.notifywith))):(r!="=I&&(s=void" 0,u="[e]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(e){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(e,c.stackTrace),t+1">=o&&(r!==W&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:I,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:I)),n[2][3].add(a(0,e,g(r)?r:W))}).promise()}
promise=function(e){return null!=e?w.extend(e,i):i}
progress=function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){w.each(n,function(n,r){g(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&t(r)})}(arguments),n&&!t&&u()),this}
done=function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){w.each(n,function(n,r){g(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&t(r)})}(arguments),n&&!t&&u()),this}
fail=function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){w.each(n,function(n,r){g(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&t(r)})}(arguments),n&&!t&&u()),this}
responseText=
status=500
statusText=error
URL:https://domain.tld/nanogp2/nanogp2.php?nguserid=1043523540641907022472&alt=json&v=3&kind=album&rnd=1630498081819 [nanogallery2]</o)){if((e=r.apply(s,u))===n.promise())throw>
PHP version: 7.4.22
Free disk space: 199773024256
Even if I just want to run the report I get an error 500
Bonjour,
Comme indiqué, j'ai créé une nouvelle autorisation API semblable à l'ancienne, mais commençant par nanogallery2gp, pour laquelle j'avais obtenu le consentement.
Actuellement, lorsque je lance l'URL : http://prod.chasse-autreches.xyz/nanogp2/authorize.php
j'obtiens le message suivant :
400. C'est une erreur.
Erreur: invalid_request
Valeur de paramètre non valide pour redirect_uri: Autorité manquante: http: ///nanogp2/authorize.php
Mon dossier nanogp2 est bien présent chez l'hébergeur et son dossier config.php bien renseigné.
Je ne comprends pas l'origine de mon erreur.
Pouvez-vous m'aider. D'avance, merci.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.