-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] TypeError: image is null error on newly created user accounts #246
Comments
This is the default, can you if your Pictures or Desktop folders are writable?
It's possible your Distro has read-only for one of those? |
Sadly the notification is not shown because extension fails to start at login with:
I have full permissions on my ~/Pictures/ directory, but I don't know why it fails to create the subdir :/ |
But even creating manually the dir, it keeps failing in the same way. I have tried to enable debug from the extension settings, but it is the same error:
|
Maybe it is failing to download the image? But I cannot see anywhere in the logs where it is trying to fetch it from, and nothing is downloaded to the BingWallpaper folder |
This triggering an error in startup possibly. I don't understand how it's triggering an error there but can you comment out the log function call on row 930 in extension.js?
|
Nice, now it can start and the failure is:
|
I was getting the same "TypeError: image is null" error on my account. I commented out the log call on line 930 as you suggested and it started working for me. So not entirely the same problem as OP reported, but there's clearly a problem with that log line. |
I can also confirm I've encountered the same error, and the same fix has worked successfully. |
There is a missing set of parentheses in the '_selectImage: ' + this.selected_image + ' = ' + (image && image.urlbase) ? image.urlbase : 'not found' is actually equivalent to ('_selectImage: ' + this.selected_image + ' = ' + (image && image.urlbase)) ? image.urlbase : 'not found' and since this conditional will always evaluate to a non-empty string (which is “truthy”) it will always try to dereference The correct statement would be --- a/extension.js
+++ b/extension.js
@@ -927,7 +927,7 @@ class BingWallpaperIndicator extends Button {
if (image)
this.imageIndex = Utils.imageIndex(imageList, image.urlbase);
- log('_selectImage: ' + this.selected_image + ' = ' + (image && image.urlbase) ? image.urlbase : 'not found');
+ log('_selectImage: ' + this.selected_image + ' = ' + (image && image.urlbase ? image.urlbase : 'not found'));
}
}
|
Hello,
I am not sure why extension runs fine on my user account but it doesn't on newly created ones. Maybe some folder (or subfolder) is missing on the newly one, but I am unsure about which one :(
Desktop (please complete the following information):
The following errors are logged:
Thanks for your help
The text was updated successfully, but these errors were encountered: