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 calendar access disabled #339

Open
szucskrisztian opened this issue Dec 5, 2022 · 70 comments
Open

Google calendar access disabled #339

szucskrisztian opened this issue Dec 5, 2022 · 70 comments

Comments

@szucskrisztian
Copy link

When I try to connect to Gcal and click on the link in the widget settings, the browser opens and say that the request is invalid and I should contact with the developer.

Issue details:
"400 hibakód: invalid_request
The out-of-band (OOB) flow has been blocked in order to keep users secure. Follow the Out-of-Band (OOB) flow migration guide linked in the developer docs below to migrate your app to an alternative method.
A kérelem adatai: redirect_uri=urn:ietf:wg:oauth:2.0:oob"

@mkwsnyder
Copy link

I got something similar, albeit more generic:

You can’t sign in because KDE Event Calendar Widget sent an invalid request. You can try again later, or contact the developer about this issue. Learn more about this error
If you are a developer of KDE Event Calendar Widget, see error details.
Error 400: invalid_request

@szucskrisztian
Copy link
Author

r

And have you found any solution?

@mkwsnyder
Copy link

mkwsnyder commented Dec 5, 2022

I have not; from the error message you got it sounds like Google changed how third party apps need to authenticate. Hopefully it won't be too difficult of a change, but without digging into the code and Google's documentation (something I can't do for a week or two) I'm not sure.

I even tried copying over the authentication token found in ~/.config/plasma-org.kde.plasma.desktop-appletsrc from a machine I'd previously authenticated on and that didn't work.

Edit: it appears this is a duplicate issue of both #331 and #333 so I'd recommend closing it. It looks like what I tried above is working for some people in said issues; I'd recommend trying it yourself to see if it works.

@etoven
Copy link

etoven commented Dec 6, 2022

Yea having the same issue

@etoven
Copy link

etoven commented Dec 6, 2022

I have not; from the error message you got it sounds like Google changed how third party apps need to authenticate. Hopefully it won't be too difficult of a change, but without digging into the code and Google's documentation (something I can't do for a week or two) I'm not sure.

I even tried copying over the authentication token found in ~/.config/plasma-org.kde.plasma.desktop-appletsrc from a machine I'd previously authenticated on and that didn't work.

Edit: it appears this is a duplicate issue of both #331 and #333 so I'd recommend closing it. It looks like what I tried above is working for some people in said issues; I'd recommend trying it yourself to see if it works.

That's not a fix if you cannot recover a token from a existing install.

@mkwsnyder
Copy link

That's not a fix if you cannot recover a token from a existing install.

I agree, it's a temporary band-aid solution until the project owner can implement an actual fix. I'm simply mentioning it here so that it can help those that do have an existing install.

@FeryET
Copy link

FeryET commented Dec 7, 2022

Have the same issue. Is there anyway to genereate the token manually?

@etoven
Copy link

etoven commented Dec 8, 2022 via email

@JackDinn
Copy link

Please just fix. Iv tried all other calenders and they all have something that stops me from using them.

I wont be holding my breath.

@etoven
Copy link

etoven commented Dec 15, 2022 via email

@cognitus
Copy link

@Zren is possible fix this?

@cruz94
Copy link

cruz94 commented Dec 20, 2022

same issue here @Zren

@TassieDevyl
Copy link

Like many others, I'm experiencing the same problem.

It was mentioned in another thread that the code can be extracted from a config file and re-entered as a work around.

Which is good to know.

Unfortunately I did a completely fresh install, after some hardware upgrades.

Reformatted the old HDD and no longer have access to the file in question.

Which brings to mind a question, despite some recent changes in the last 4 months, (translation), is this applet actively maintained anymore?

Perhaps there is an active fork?

Anyone have any insights?

@tategotoazarasi
Copy link

Same issue.

@rosenblueh
Copy link

The akonadi stuff can synchronize with google calendar, so maybe via that...

@Evgeny-del

This comment was marked as outdated.

@deivid11
Copy link

deivid11 commented Jan 9, 2023

Same issue here, cannot use google calendar sync

@wokawoka
Copy link

I'm experiencing the same problem :(

@mcasaccio
Copy link

same issue here
image

@tomholvey
Copy link

I'm also seeing this issue

@jackmonty
Copy link

I'm also seeing this issue.

@Sriramgireesh
Copy link

I am also facing this issue

@MoarcyVega
Copy link

MoarcyVega commented Jan 19, 2023

I've found a way to show my events from google calendar:
It works to import them from kalendar (because of kdepim-addons).
The only thing that doesn't work this way:
If you have a few calendars in your google calendar with different colors, the events don't get the color from your google calendar.

So i still hope for a fix.

@Evgeny-del
Copy link

#339 (comment)
Не могли бы Вы подробнее рассказать об этом способе, который Вы нашли?

@ruanpereira
Copy link

same issue, invalid request when clicking in the link

@ruanpereira
Copy link

you can do it with korganizer, but isn't the same thing

@HornetoMano
Copy link

How you do this bro?

@miko-techsys
Copy link

#339 (comment) Не могли бы Вы подробнее рассказать об этом способе, который Вы нашли?

Install kdepim-addons and kde kalendar. Import your google calendar into kde kalendar and after this import from widget like PIM events.

@ruanpereira
Copy link

ruanpereira commented Feb 8, 2023

@HornetoMano just like @ArTikOnesh said. With KDE kalendar, go to the settings and add your google account with the events. Go back and activate the PIM events. If you use a KDE desktop environment, the PIM events can be activated in the configuration of the clock.

@Salvaju29ro
Copy link

Salvaju29ro commented Feb 9, 2023

@HornetoMano just like @ArTikOnesh said. With KDE kalendar, go to the settings and add your google account with the events. Go back and activate the PIM events. If you use a KDE desktop environment, the PIM events can be activated in the configuration of the clock.

Is Google working again with Akonadi? I switched to Event Calendar because Kalendar didn't let me add events to Google (Korganizer also didn't let me)

@rnc
Copy link

rnc commented Feb 15, 2023

I have just tried this tool (although I still had a working accessToken) and it does correctly generate a new accessToken/accessTokenExpiresAt/accessTokenType and refreshToken values in the browser. I see it parses the existing .config/plasma-org.kde.plasma.desktop-appletsrc configuration looking for a [Configuration][Google Calendar] block - if I modify my existing configuration so that block doesn't exist then I can reproduce the above error. I am guessing @bigo72 does not have a correctly configured applet with a google calendar?

@bigo72
Copy link

bigo72 commented Feb 15, 2023

No, I was never able to config the applet with Google calendar. That's why I found this page.
I'm on Garuda Linux with KDE

@kanocz
Copy link

kanocz commented Feb 15, 2023

yes, I need ClientToken and ClientSecret from existing config, so first you need open widget configuration and go to google calendar page... you don't need to click on URL there but at this moment widget will generate part of config I need to read

@rnc
Copy link

rnc commented Feb 15, 2023

@kanocz It might be worth adding some error handling if sessionClientSecret and sessionClientId cannot be found in an existing config?

@kanocz
Copy link

kanocz commented Feb 15, 2023

sure :) it was just 10-minute quick coding... I'm going to vacation in few days and have very limited time... after I'll return I'll adjust code to automate process to few clicks and no manual copy and so on

@kanocz
Copy link

kanocz commented Feb 15, 2023

or maybe I'll found some time today-tomorrow - will try

@miminno
Copy link

miminno commented Feb 15, 2023

yes, I need ClientToken and ClientSecret from existing config, so first you need open widget configuration and go to google calendar page... you don't need to click on URL there but at this moment widget will generate part of config I need to read

No matter how many times I try going to google calendar page in the settings, widget does not generate ClientToken and ClientSecret :( What's the secret?

@kanocz
Copy link

kanocz commented Feb 15, 2023

hm... strange... ok, I'll try to do better solution asap :) I've just found part of code how to execute external tool just from QML, so I'll pass clientID and clientSecret as arguments directly... and return config via stdout, so no copy-paste will be needed...

@kanocz
Copy link

kanocz commented Feb 15, 2023

ok.... #341
this fill just fix everything - no copy-paste needed and so on
P.S.: you need to have golang installed before ./install executing, then you can remove it if you want

@lucafulgenzi
Copy link

@kanocz I just tried it and it works perfectly.
Excellent work 👍🏻

@bigo72
Copy link

bigo72 commented Feb 15, 2023

I can't try now! I'm at work! I can't wait!
I'll let you know, but I'm pretty sure it will work.
Thank you so much!

@tomholvey
Copy link

This worked for me too, thank you!

@miminno
Copy link

miminno commented Feb 15, 2023

That works perfectly, thanks!

@bigo72
Copy link

bigo72 commented Feb 15, 2023

OK, I'm terrible!
I did git clone https://github.com/kanocz/plasma-applet-eventcalendar.git eventcalendar
then cd eventcalendar
then ./install
and I got this as output:
Aggiornamento pacchetto da file: /home/alex/eventcalendar/eventcalendar/package Aggiornamento di /home/alex/eventcalendar/eventcalendar/package riuscito. plasmashell: nessun processo trovato Omitting both --window and --windowclass arguments is not recommended kf.plasma.quick: Applet preload policy set to 1 qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead. org.kde.plasma.containmentlayoutmanager: Error: cannot change the containment to AppletsLayout

What am I missing?

PS. maybe my go installation is gone? Going to check that ....
PPS go is installed (just go, not go tools)

@kanocz
Copy link

kanocz commented Feb 15, 2023

I think it's ok - many deprecated APIs are used in this applet... just go to settings and this may work :)

@mkwsnyder
Copy link

@kanocz the current version currently errors out with the following (sorry it doesn't have more than this):

invalid params
exit status 2

If I use yesterday's (2023-02-14) commit it seems to run correctly.

Regardless, thank you for your work and rapid responses to people's requests!

@kanocz
Copy link

kanocz commented Feb 15, 2023

@mkwsnyder you don't need to run it manually anymore! just git clone of my version, then ./install and use UI of the widget

@lucafulgenzi
Copy link

@bigo72 to be safe uninstall the old version first and then reinstalls from the fork, you don't need to run the script, but just go to the component configuration in the Google tab

@bigo72
Copy link

bigo72 commented Feb 15, 2023

Thanks @lucafulgenzi , I did it before, but unfortunately it still doesn't work for me. I'm thinking ... does this script take auth from somewhere else? Is this "somewhere else" the "online accounts"?

@kanocz
Copy link

kanocz commented Feb 16, 2023

@bigo72 no... it just redirects you to Google oauth page and then read back some values, gets token and returns to widget which updates config in usual way...
P.S.: if you want you can record screen and I'll try to help

@bigo72
Copy link

bigo72 commented Feb 16, 2023

It worked!!!
I was still using the old version! I'm so sorry @kanocz
I had to manually remove /usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/ directory, then I gitcloned your repo again and installed as usual (and this time without any error).
Thanks again for everything you did.

@kanocz
Copy link

kanocz commented Feb 17, 2023

sorry, one more commit added to pull request which is not connected to this issue... I just used master branch and forgot that's connected to pull request :(

P.S.: it's just configuration for different color for events in past, so I hope this doesn't metter

image

image

@felipelutz
Copy link

Thank you @kanocz. It worked flawlessly!

@podxboq
Copy link

podxboq commented Feb 25, 2023

ok.... #341 this fill just fix everything

It works perfectly. You are my hero.

@TLPNull
Copy link

TLPNull commented Mar 8, 2023

@kanocz thanks, I am able to login now, but I am unable to sync my calendar
I enabled debugging and here are some logs

qml: [eventcalendar:debug] upcomingEvents.onAllDataFetched 2023-02-22T03:00:00.000Z 2023-03-08T16:02:32.167Z 2023-04-07T03:00:00.000Z
qml: HTTP 0 Headers:

file:///home/user/.local/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/config/GoogleLoginManager.qml:147: TypeError: Cannot call method 'debugJSON' of null
qml: XMLHttpRequest.onerror 0
file:///home/user/.local/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/config/GoogleLoginManager.qml:147: TypeError: Cannot call method 'debugJSON' of null
qml: HTTP 0 Headers:

qml: fetchGoogleTasklistList.response HTTP Error 0  0
file:///home/user/.local/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/config/GoogleLoginManager.qml:179: TypeError: Cannot call method 'debugJSON' of null
qml: XMLHttpRequest.onerror 0
qml: fetchGoogleTasklistList.response HTTP Error 0 null 0
file:///home/user/.local/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/config/GoogleLoginManager.qml:179: TypeError: Cannot call method 'debugJSON' of null
qml: [eventcalendar:debug] isExpanded true
qml: [eventcalendar:debug] setToday qua mar 8 13:03:10 2023 GMT-0300
qml: [eventcalendar:debug] currentTime qua mar 8 13:03:10 2023 GMT-0300
qml: [eventcalendar:debug] isExpanded false
qml: [logger:debug] updateCalendarList
qml: [logger:debug] accessToken ////REMOVED_TOKEN////
qml: HTTP 0 Headers:

qml: [logger:debug] fetchGCalCalendars.response.data
qml: XMLHttpRequest.onerror 0
qml: [logger:debug] fetchGCalCalendars.response.data null
qml: [logger:debug] updateCalendarList
qml: [logger:debug] accessToken ////REMOVED_TOKEN////
kdeinit5: Got EXEC_NEW '/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/http.so' from launcher.
kdeinit5: preparing to launch '/usr/lib/x86_64-linux-gnu/qt5/plugins/kf5/kio/http.so'
qml: HTTP 0 Headers:

qml: fetchGoogleTasklistList.response HTTP Error 0  0
qml: [logger:debug] fetchGoogleTasklistList.response.data
qml: XMLHttpRequest.onerror 0
qml: fetchGoogleTasklistList.response HTTP Error 0 null 0
qml: [logger:debug] fetchGoogleTasklistList.response.data null
qml: HTTP 0 Headers:

qml: [logger:debug] fetchGCalCalendars.response.data
qml: XMLHttpRequest.onerror 0
qml: [logger:debug] fetchGCalCalendars.response.data null
qml: HTTP 0 Headers:

qml: [logger:debug] fetchGCalCalendars.response.data
qml: XMLHttpRequest.onerror 0
qml: [logger:debug] fetchGCalCalendars.response.data null

@kanocz
Copy link

kanocz commented Mar 8, 2023

@TLPNull sorry, but I have no idea... this can be affected by many things like proxy settings or something else... and I really has almost no idea about how this thing works :) I've just fixed login and haven't examined whole code to the deep...

@geraldosimiao
Copy link

geraldosimiao commented May 10, 2023

@kanocz Thank you verymuch. Your fork with oauth-helper buildin fixed the problems for me too and I'm very happy to use again eventcalendar synched with my google calendars.

Screenshot_20230509_234043

BTW this is my system:

Operating System: Fedora Linux 37
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
Kernel Version: 6.2.14-200.fc37.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-3632QM CPU @ 2.20GHz

@blackPantherOS
Copy link

Today, with latest git (version 76):

"400 error code: invalid_request
The out-of-band (OOB) flow has been blocked in 
order to keep users secure. Follow the Out-of-Band (OOB) 
flow migration guide linked in the developer docs below 
to migrate your app to an alternative method.
Data: redirect_uri=urn:ietf:wg:oauth:2.0:oob"

@kanocz
Copy link

kanocz commented May 21, 2023

Today, with latest git (version 76):

"400 error code: invalid_request
The out-of-band (OOB) flow has been blocked in 
order to keep users secure. Follow the Out-of-Band (OOB) 
flow migration guide linked in the developer docs below 
to migrate your app to an alternative method.
Data: redirect_uri=urn:ietf:wg:oauth:2.0:oob"

yes, because repo owner hasn't merged any version of fix yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests