neffo / bing-wallpaper-gnome-extension

GNOME shell extension that syncs your desktop & lock screen wallpaper to Microsoft Bing's Image of the Day.
https://extensions.gnome.org/extension/1262/bing-wallpaper-changer/
GNU General Public License v3.0
293 stars 55 forks source link

Suddenly will not dowload new images [BUG] #241

Open matt-matt1 opened 1 month ago

matt-matt1 commented 1 month ago

NOTE: GNOME will sometimes report errors associated extensions if you manually update them via the extensions website. These errors can be resolved by restarting GNOME shell (logging out and then back in again). If it's still creating errors, then please go ahead create an issue.

Describe the bug There are dozens of previous images and it seemed to work fine. The last image is dated about a week ago. (I manually downloaded an image from Bing and it then displayed fine after renaming it.) Suddenly it displayed the same image into the next day. Since then no new images have been downloaded into the folder. (I can set it to random and a random image displays fine - I guess from the ones already downloaded.)

Screenshots No image to show because there is any.

To Reproduce Not sure this issue exists on other systems.

Desktop (please complete the following information):

Additional context see Describe the bug.

neffo commented 1 month ago

Hi matt-matt1, can you enable debug mode find any relevant items in the log?

I'm not able to replicate this issue in a VM.

Screenshot from 2024-07-28 17-30-06

matt-matt1 commented 1 month ago

Set, but is the debug log kept? (Perhaps put a open button - like "Download folder."..) Today: gnome-shell-screenshot-5fneff Then I open the main window (from the gnome icon in the top panel). As I press the back button, only the description changes. Until I click back about 10 times then also a small preview appears and background changes as expected.
image As I then click the forward button the same preview is there, the description changes and the background stays the same - this happens on each sequential click of the forward button. I suspect there's a owner/permissions issue - a while back I made and use another user - but that shouldn't have an effect.

neffo commented 1 month ago

Quick way to do this is to monitor the system journal:

matt-matt1 commented 1 month ago

Jul 30 11:09:36 yuma-Z270P-D3 gnome-shell[8358]: BingWallpaper extension: selected image changed to: CorbettTigers_EN-CA4355248170 Jul 30 11:09:36 yuma-Z270P-D3 gnome-shell[8358]: BingWallpaper extension: /th?id=OHR.CorbettTigers_EN-CA4355248170 Jul 30 11:09:36 yuma-Z270P-D3 gnome-shell[8358]: BingWallpaper extension: Downloading https://www.bing.com/th?id=OHR.CorbettTigers_EN-CA4355248170_UHD.jpg to file:///home/public/bing/20240729-CorbettTigers_EN-CA4355248170_UHD.jpg Jul 30 11:09:36 yuma-Z270P-D3 gnome-shell[8358]: BingWallpaper extension: Storing state as JSON: {"maxlongdate":202407300400,"title":"Tiger siblings in Jim Corbett National Park, Uttarakhand, India","explanation":"Bing Wallpaper of the Day for 2024-07-28","copyright":"© Sourabh Bharti/Getty Images","longstartdate":"202407290400","imageinfolink":"https://www.bing.com/search?q=International+Tiger+day&form=hpcapt&filters=HpDate%3a%2220240729_0400%22","imageURL":"https://www.bing.com/th?id=OHR.CorbettTigers_EN-CA4355248170_UHD.jpg","filename":"/home/public/bing/20240729-CorbettTigers_EN-CA4355248170_UHD.jpg","favourite":false} Jul 30 11:09:37 yuma-Z270P-D3 gnome-shell[8358]: BingWallpaper extension: Error writing file: Gio.IOErrorEnum: Error opening file “/home/public/bing/20240729-CorbettTigers_EN-CA4355248170_UHD.jpg”: Permission denied Jul 30 11:09:39 yuma-Z270P-D3 gnome-shell[8358]: BingWallpaper extension: selected image changed to: BeachHutsSweden_EN-CA0435377423 Jul 30 11:09:39 yuma-Z270P-D3 gnome-shell[8358]: BingWallpaper extension: /th?id=OHR.BeachHutsSweden_EN-CA0435377423 Jul 30 11:09:39 yuma-Z270P-D3 gnome-shell[8358]: BingWallpaper extension: Downloading https://www.bing.com/th?id=OHR.BeachHutsSweden_EN-CA0435377423_UHD.jpg to file:///home/public/bing/20240728-BeachHutsSweden_EN-CA0435377423_UHD.jpg Jul 30 11:09:39 yuma-Z270P-D3 gnome-shell[8358]: BingWallpaper extension: Storing state as JSON: {"maxlongdate":202407300400,"title":"Bathing huts on the beach in Skåne County, Sweden","explanation":"Bing Wallpaper of the Day for 2024-07-27","copyright":"© Martin Wahlborg/Getty Images","longstartdate":"202407280400","imageinfolink":"https://www.bing.com/search?q=Skane+County+Sweden&form=hpcapt&filters=HpDate%3a%2220240728_0400%22","imageURL":"https://www.bing.com/th?id=OHR.BeachHutsSweden_EN-CA0435377423_UHD.jpg","filename":"/home/public/bing/20240728-BeachHutsSweden_EN-CA0435377423_UHD.jpg","favourite":false} Jul 30 11:09:39 yuma-Z270P-D3 gnome-shell[8358]: BingWallpaper extension: Error writing file: Gio.IOErrorEnum: Error opening file “/home/public/bing/20240728-BeachHutsSweden_EN-CA0435377423_UHD.jpg”: Permission denied Jul 30 11:09:41 yuma-Z270P-D3 gnome-shell[8358]: BingWallpaper extension: selected image changed to: CorbettTigers_EN-CA4355248170 Jul 30 11:09:41 yuma-Z270P-D3 gnome-shell[8358]: BingWallpaper extension: /th?id=OHR.CorbettTigers_EN-CA4355248170 Jul 30 11:09:41 yuma-Z270P-D3 gnome-shell[8358]: BingWallpaper extension: Downloading https://www.bing.com/th?id=OHR.CorbettTigers_EN-CA4355248170_UHD.jpg to file:///home/public/bing/20240729-CorbettTigers_EN-CA4355248170_UHD.jpg Jul 30 11:09:41 yuma-Z270P-D3 gnome-shell[8358]: BingWallpaper extension: Storing state as JSON: {"maxlongdate":202407300400,"title":"Tiger siblings in Jim Corbett National Park, Uttarakhand, India","explanation":"Bing Wallpaper of the Day for 2024-07-28","copyright":"© Sourabh Bharti/Getty Images","longstartdate":"202407290400","imageinfolink":"https://www.bing.com/search?q=International+Tiger+day&form=hpcapt&filters=HpDate%3a%2220240729_0400%22","imageURL":"https://www.bing.com/th?id=OHR.CorbettTigers_EN-CA4355248170_UHD.jpg","filename":"/home/public/bing/20240729-CorbettTigers_EN-CA4355248170_UHD.jpg","favourite":false} Jul 30 11:09:41 yuma-Z270P-D3 gnome-shell[8358]: BingWallpaper extension: Error writing file: Gio.IOErrorEnum: Error opening file “/home/public/bing/20240729-CorbettTigers_EN-CA4355248170_UHD.jpg”: Permission denied

I did 2xback + 1xforward Why did I get Permission denied? PS. $ ls -ld /home/public/bing
Permissions Size User Date Modified Name drwxr-xr-x - nobody 22 Jul 11:43 /home/public/bing

$ getfacl /home/public/bing/20240305-BangkokCircle_EN-CA9121846654_UHD.jpg
getfacl: Removing leading '/' from absolute path names

file: home/public/bing/20240305-BangkokCircle_EN-CA9121846654_UHD.jpg

owner: nobody

group: nogroup

user::rwx group::r-x other::r-x

neffo commented 1 month ago

Right, so the extension currently does notify if there is an access issue (we probably should). It should be readable and writable for your current username. The extension requires access to write files to that directory and GNOME itself needs to be able to access the images for the wallpaper. (This should all be the same user.)

I'd recommend chown the directory to your current username and make sure your username has read, write and exec to that directory.

matt-matt1 commented 1 month ago

Thanks that did it!