GrandyB / SheetsIO

Small configurable Java app that pulls data from a Google Spreadsheet (using v4 api) and writes to files and a local webserver.
GNU Lesser General Public License v3.0
21 stars 3 forks source link

Google API Error But Config Refresh Briefly Fixes It #59

Open Nerdvana12 opened 6 days ago

Nerdvana12 commented 6 days ago

Describe the bug Popup saying "unable to parse response from google - expected json but received the following". Reloading the config fixes it briefly and things run fine but then it pops up again. This happens to both me and another person set up with the sheet

To Reproduce Unsure what's causing it

Expected behavior Popup matching the SS below

Screenshots Screenshot and logs from my PC image app-2024-09-24.log app-2024-09-23.log app-2024-09-25.log

Logs from the other person's PC app-2024-09-23.log app-2024-09-24.log

Desktop (please complete the following information):

Additional context Unsure the version of the other person's PC. I know the OS is windows

GrandyB commented 6 days ago

Thank you for the detailed report! In the last day I've received 4 or so reports of this issue. With one of them, I have gotten them to make the exact same request SheetsIO uses but in the browser, and they can still hit this issue through the browser, which to me suggests that the issue is not strictly SheetsIO's problem.

However, I have a Discord group chat with the 4 of them, trying things out, and looking to improve SheetsIO by being less brittle to responses like this and instead opting to allow the update chain to retry without throwing a hissy fit, and logging that it did this somewhere obvious.

So stay tuned.

GrandyB commented 6 days ago

Aight - sent a few variations of logging over to them and gotten valuable info back. Massive thanks to Ely, Thyme, Joryan and Mileve! I also eventually managed to get it to happen to me locally (only took 16 minutes for it to encounter a 502!).

Either way, here's a very temporary build that adds said logging and skips any >500 response code (>500 codes are usually tied to the server/google having issues basically): https://drive.google.com/file/d/1YcXuK9cni6Zl9JfL5dYpWqbnRgadnxrx/view?usp=sharing

If you need something desperately quick, consider using that - you just delete the .jar file from your SheetsIO directory, put this one in, and then run runJar.bat and it'll load up. It will log the issue in the console as e.g. ERROR: 502 found, but skipped: and skip the current update cycle, but then attempt again on the next loop.

I'll now be working on reducing the # of error popups and introducing a logging view for request issues and producing a more official next release of the tool.