-
-
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] JSON syntax error on refresh #257
Comments
Journald debug log output:
|
Same problem: #248 (comment) I got the same error in another similar app for Android, but enabling VPN helped me. In the case of the extension, I could not connect it via VPN, it seems the extension doesn't accept the system proxy settings. |
It seems I was mistaken about VPN. I tried to figure out why the code was giving an error. And I placed log messages in the code. And I noticed that a delay of 1-2 seconds ( _processMessageRefresh(message) {
setTimeout(() => {
const decoder = new TextDecoder()
try {
let data =
Soup.MAJOR_VERSION >= 3
? decoder.decode(
this.httpSession.send_and_read_finish(message).get_data()
) // Soup3
: message.response_body.data // Soup 2
log("Recieved " + data.length + " bytes")
this._parseData(data)
if (!this._settings.get_boolean("random-mode-enabled"))
this._selectImage()
} catch (error) {
log("Network error occured: " + error)
notifyError("network error occured\n" + error)
this._updatePending = false
this._restartTimeout(TIMEOUT_SECONDS_ON_HTTP_ERROR)
}
}, 2000)
} Location in the code: bing-wallpaper-gnome-extension/extension.js Line 730 in 074cda6
Now it updates wallpapers without any errors. |
I managed to successfully refresh now without any issues and downloading the image of today. I don't know what the issue was but if a timeout fixed the issue for you @proninyaroslav , maybe some race condition was happening? |
UPD: after some time this problem came back. It seems to be a floating problem. |
On occasions the API will be down, it should keep trying (and it can catch up to get the missed images). If you don't mind, can you say which countries you are in? (One option might be to select a different market in the settings like English rest of world, etc.) Does opening the link to the API end point give any error messages? |
You're right, just like 10 minutes later refreshing brings back the problem |
@neffo |
Hmm, you should get something like this JSON if it works:
|
It seems that this cannot be changed in the extension settings. At least I didn't find it. |
After some attempt to refresh the page it gave me JSON. But once. |
Yeah it's a hidden setting now, you can set the 'market' to something like 'EN-ROW' and you might have some more luck. Probably unlikely, as it's hitting the same end point not a different server. |
Hi, Best regards |
My guess is that something is broken in the API. I even tried Tor to exclude any blocking (from any side), but it just returns an empty result, with rare exceptions. |
How my response looks like:
And how looks a successfull response (after 5-6 times of continuous refresh):
|
It seems like the API is working fine today. Updates are happening without an empty response. |
Describe the bug
There is JSON error on refresh.
Screenshots
To Reproduce
Steps to reproduce the behavior:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: