ghostboard / ghost-purge-images

CLI tool to display & purge the uploaded images, video and audio files that currently are not used in any post, page or meta data
MIT License
90 stars 4 forks source link

❌ Error: API Pages - Not valid response #14

Closed sgofferj closed 3 years ago

sgofferj commented 3 years ago

Ghost: 3.33.0 - "Official" docker image

Docker file:

FROM ghost:latest                                                                                                                                                                
USER root                                                                                                                                                                        
RUN npm install -g --production --loglevel verbose --no-save ghost-purge-images                                                                                                  

Command issued inside the container (docker exec...) Command output:

❌ Error: API Pages - Not valid response

Ghost log:

app_1  | [2020-09-15 16:55:43] INFO "GET /ghost/api/v3/content/authors/?limit=100&page=1&fields=cover_image,profile_image&key=03978e1fdea21f903d8e481c65" 301 3ms
app_1  | [2020-09-15 16:55:43] INFO "GET /ghost/api/v3/content/authors/?limit=100&page=1&fields=cover_image%2Cprofile_image&key=03978e1fdea21f903d8e481c65" 200 18ms
app_1  | [2020-09-15 16:55:43] INFO "GET /ghost/api/v2/admin/pages/?limit=100&page=1&formats=html,mobiledoc" 301 5ms
app_1  | [2020-09-15 16:55:43] ERROR "GET /ghost/api/v2/admin/pages/?limit=100&page=1&formats=html%2Cmobiledoc" 403 5ms
app_1  | 
app_1  | Authorization failed
app_1  | 
app_1  | "Unable to determine the authenticated user or integration. Check that cookies are being passed through if using session authentication."
app_1  | 
app_1  | Error ID:
app_1  |     4b0cab90-f774-11ea-a43c-9570ff40ccb4
app_1  | 
app_1  | ----------------------------------------
app_1  | 
app_1  | NoPermissionError: Authorization failed
app_1  |     at new NoPermissionError (/var/lib/ghost/versions/3.33.0/node_modules/ghost-ignition/lib/errors/index.js:134:23)
app_1  |     at authorizeAdminApi (/var/lib/ghost/versions/3.33.0/core/server/services/auth/authorize.js:28:25)
app_1  |     at Layer.handle [as handle_request] (/var/lib/ghost/versions/3.33.0/node_modules/express/lib/router/layer.js:95:5)
app_1  |     at next (/var/lib/ghost/versions/3.33.0/node_modules/express/lib/router/route.js:137:13)
app_1  |     at authenticate (/var/lib/ghost/versions/3.33.0/core/server/services/auth/session/middleware.js:24:13)
app_1  |     at processTicksAndRejections (internal/process/task_queues.js:97:5)
app_1  | 
dburgos commented 3 years ago

hey @sgofferj I can not reproduce it

Please check:

Let me know any question, if you still have the issue please provide more info