Skip to content
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

Google wants to prove something with weather widget #934

Closed
frederic2de opened this issue Feb 26, 2022 · 23 comments
Closed

Google wants to prove something with weather widget #934

frederic2de opened this issue Feb 26, 2022 · 23 comments
Labels
Bug Something isn't working fixed

Comments

@frederic2de
Copy link

Hi,

since approx. 2 weeks, I have the problem that weather widget shows a notification that Google wants to have something approved. But due to the limitations of the widget window I am not able to do it.

grafik

@valinet
Copy link
Owner

valinet commented Feb 26, 2022

Yeah, idk, it seems to be a Germany specific popup, someone mentioned it earlier as well.

The solution is for someone facing this to recompile the app with developer tools enabled, grab the id of the button and then I can write some JavaScript that will click the button automatically, same as I do for the “cookie consent” banner.

Want to help with this? I can add an option to the weather widget to enable dev tools and context menus so you can look for the id using that, then I can compile a version with the fix, send it to you, test that and if it’s all good I push that to the repo as well. That’s a way to properly fix this.

Another way to workaround this is to clear the widget data, which will postpone the popup for some additional time but it won’t really resolve the root problem. I’d advise not to do that, and to rather help me fix it properly as described above.

Thanks

@frederic2de
Copy link
Author

Sure I want to help. Thank you for your great work and support!

@valinet
Copy link
Owner

valinet commented Feb 26, 2022

So I pushed the update a couple of hours ago. You can set WeatherDevMode=1 as DWORD in HKCU\SOFTWARE\ExplorerPatcher. Then, you will be able to right click in the widget and see the context menu, from there Inspect which will open the dev tools and from there determine what the button is (its id).

@frederic2de
Copy link
Author

Hi, could you please advise what to do exactly in DevTools? My problem is that i cannot see the buttom cause there is no scroll bar in the window which I had to use to find the buttom.

@valinet
Copy link
Owner

valinet commented Feb 26, 2022

Hi

I have pushed a new commit. In a few minutes, a new pre-release will be generated. This allows you to resize and move the window. Then, you can simply open the widget, enlarge the window so that the page fits reasonably on the screen, then right click the "Accept" button or however it is called, then choose "Inspect", and then identify the id of that element (you can also post a screen crop of how the DOM looks there). That's mainly what I need, I think.

Thanks

@frederic2de
Copy link
Author

Hi,
thank worked fine. Please find two screenshots. I did not press the button yet, as I do not know, if the screenshots satisfy you.
Screenshot 2022-02-27 003432
Screenshot 2022-02-27 003919

@valinet
Copy link
Owner

valinet commented Feb 26, 2022

Hi

Thanks. Don't press it yet. Let me develop a fix and push it and then you can test it (the widget should dismiss the pop-up on its own automatically).

Thank you

@valinet
Copy link
Owner

valinet commented Feb 26, 2022

Actually, can you go to the console and run this: document.getElementsByClassName("fsXkBc")? Just click "Console", type that in and hit Enter. Thanks.

@valinet
Copy link
Owner

valinet commented Feb 26, 2022

Also, can you run this in the console as well: if (document.getElementsByClassName("Gfzyee VDgVie DKlyaf Loxgyb").length > 1) { document.getElementsByClassName("Gfzyee VDgVie DKlyaf Loxgyb")[1].click();}. That should be the fix basically. Once you run that, the "OK" button should be pressed and the pop-up dismissed. Thanks.

@frederic2de
Copy link
Author

Sure. But I guess nothing happened?
grafik

@valinet
Copy link
Owner

valinet commented Feb 26, 2022

Wait a bit, don't run the second command

@frederic2de
Copy link
Author

ok

@valinet
Copy link
Owner

valinet commented Feb 26, 2022

Sure. But I guess nothing happened?

My bad, copy pasting from screenshots is hard. It should be capital S instead of lower case s. So: document.getElementsByClassName("fSXkBc"). It should return length 1 basically. That is what is in the screenshot, I just copy pasted wrong.

Also, second command, you can double check as well, the thing is case sensitive:

if (document.getElementsByClassName("Gfzyee VDgVie DKlyaf Loxgyb").length > 1) { document.getElementsByClassName("Gfzyee VDgVie DKlyaf Loxgyb")[1].click(); }

It should match the things in here:

image

Also, I think you can save the state of the browser, so we can reproduce the popup again: disable the weather widget from the Properties window, go to %APPDATA%\ExplorerPatcher and copy the ep_weather_host folder somewhere else. That contains the current state of the browser, cookies, etc. Then reenable the widget and then run the second command and hopefully by restoring the folder, if needed, we might be able to trigger the popup again. If not, then if it works, that's the fix anyway and I can push that and that should be it. Thanks.

@frederic2de
Copy link
Author

Here is just a screenshot what happens with first command
grafik

The rest I will do tomorrow.
Have a good night!

@frederic2de
Copy link
Author

So it is not lenght 1 but length 2. Is that a problem?

@valinet
Copy link
Owner

valinet commented Feb 27, 2022

Man, please type the second command now so I can finish with this. It's just a command, it takes 5 seconds, after we went through this...

@valinet
Copy link
Owner

valinet commented Feb 27, 2022

Type it and the pop up should be gone, I am 99% sure it works, we can confirm it, make the commit and call it a day.

@valinet
Copy link
Owner

valinet commented Feb 27, 2022

Forget about backing up ep_weather_host, it should work, just do that. Thanks.

@frederic2de
Copy link
Author

Yes it worked.

@frederic2de
Copy link
Author

No backup as you told...

@valinet
Copy link
Owner

valinet commented Feb 27, 2022

Thanks. I will make the commit. Thanks for the help and confirmation. Good night.

No backup as you told...

Yeah, fuck that, idk, probably wouldn't have worked anyway, idk. It's good that we confirmed that, I can paste it in the code and that should be it. Thank you.

@valinet valinet closed this as completed Feb 27, 2022
@frederic2de
Copy link
Author

Thanks for the extraordinary support. Will donate something for that.

@valinet
Copy link
Owner

valinet commented Feb 27, 2022

Thanks for the extraordinary support. Will donate something for that.

Thanks. And thank you as well. These kinds of issues are very nasty, as basically it's a server-side thing - even if I used a VPN for example, maybe the pop-up wouldn't appear for me, or maybe I would have to wait 2 weeks or something stupid like that. But with a bit of help from anyone, everything can be solved after all. Thanks for sticking with me through this.

The fix is similar to how I dismiss the GDPR notice as well, it is just that I have to know those IDs (that Gfzyee VDgVie DKlyaf Loxgyb non-sense).

I mean, yeah, these are the pitfalls when you don't control the service 100%, but the bright sides are much more than the down sides.

Thanks again, have a good night!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

2 participants