Zren / plasma-applet-eventcalendar

https://store.kde.org/p/998901/
469 stars 92 forks source link

Error loading QML file (Qt 5.9 / Kubuntu 18.04) (Fix in comments) #153

Open timtinan37 opened 4 years ago

timtinan37 commented 4 years ago

Error trace:

Error loading QML file: file:///home/timtinan37/.local/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/main.qml:108:37: Type PopupView unavailable
file:///home/timtinan37/.local/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/PopupView.qml:288:3: Type TimerView unavailable
file:///home/timtinan37/.local/share/plasma/plasmoids/org.kde.plasma.eventcalendar/contents/ui/TimerView.qml:91:5: Cannot assign to non-existent property "icon"

KDE Plasma version: 5.12.9 KDE Frameworks version: 5.44.0 Qt version: 5.9.5 Ubuntu 18.04 Kernel version: 4.15.0-112-generic

Zren commented 4 years ago

Qt 5.9? What distro are you using? I ported most things to QtQuick.Controls 2 in v69. Button { icon.name: '' } was added in Quick Controls 2.3 which Qt 5.12 (supported until December 2021) definitely has.

Zren commented 4 years ago

You could try an older version (don't forget to relog after installing a new version). Just know that v69 had a crapton of improvements. Don't go below v64 though as a very serious bug was fixed in it.

timtinan37 commented 4 years ago

Re-installing the widget by downloading the plasmoid file from https://store.kde.org/p/998901 removes the problem. Previously I'd installed it from Plasma add-on installer.

pmsobrado commented 3 years ago

I'm having the exact same issue, even installing manually :(

KDE Plasma version: 5.12.9 KDE Frameworks version: 5.44.0 Qt version: 5.9.5 Ubuntu 18.04 Kernel version: 5.4.0-42-generic

Zren commented 3 years ago

Recent EventCalendar versions requires a newer version of Qt. You need to install an older version of EventCalendar then restart Plasma (logout + login). Not sure which older version works.

pmsobrado commented 3 years ago

Could you tell me which version would be necessary? Thanks.

Zren commented 3 years ago

No idea. Not downloading 18.04 to check or skimming 200 code patches to guess. Try the most recent, relog. If it doesn't work then uninstall, install the next, then relog. There's 4 versions available on 1 should probably work.

Use the following to make sure you've properly installed the older versions. The "Download new widgets" GUI has a few issues atm when uninstalling widgets. That might be a Plasma 5.18+ bug though. Not sure if it affects Plasma 5.12 which was released 3 years ago.

grep Version ~/.local/share/plasma/plasmoids/org.kde.plasma.eventcalendar/metadata.desktop /usr/share/plasma/plasmoids/org.kde.plasma.eventcalendar/metadata.desktop
pmsobrado commented 3 years ago

OK, thanks. I'll keep you posted.

Zren commented 3 years ago

Hmmm, I don't think I wrote instructions above on how to install them.

To install from source using the .zip links I linked above, extract the v68.zip.

Then:

kpackagetool5 --type=Plasma/Applet -r org.kde.plasma.eventcalendar # Uninstall installed version
kpackagetool5 --type=Plasma/Applet -i ~/Downloads/v68/package # Install the package dir in the older version

Make sure to extract v68, as the git repo nest's the widgets metadata.desktop and other source code under package/metadata.desktop so you need to install the "package" directory. If you install the "v68" directory instead with all the install scripts + ReadMe.md it won't install because metadata.desktop will be missing from the folder.

pmsobrado commented 3 years ago

Thanks.

pmsobrado commented 3 years ago

v68 seems to work, thanks!

pmsobrado commented 3 years ago

It's a shame though that I can't get any updates now... for example, google event would be better for me if they are notified 10 minutes before, and not at the starting time...

OckhamOdyssey commented 3 years ago

I have a computer with Ubuntu 18.04 LTS. I have the same error and now is not possible go to an older version after the #177 solution. The net admin doesn't allow me upgrade to 20.04, any possible way to make it work?

Zren commented 3 years ago

v69 - July 27 2020

  • Refactor to use PlasmaComponents3/QtQuickControls2, and Kirigami Units/Colors in the config.

Fiiiine, since v68 works you can use the following instructions to use an API client id+secret specifically for it (or anything above v64).

  1. Install v68
    • Download https://github.com/Zren/plasma-applet-eventcalendar/archive/v68.zip
    • Extract v68.zip
    • Uninstall the current version of the widget (probably v71)
      • kpackagetool5 --type=Plasma/Applet -r org.kde.plasma.eventcalendar
    • Install the package dir from the downloaded older version (v68) containing the metadata.desktop file.
      • kpackagetool5 --type=Plasma/Applet -i ~/Downloads/v68/plasma-applet-eventcalendar-68/package
  2. Restart plasmashell (relog)
  3. Open EventCalendar's config and enable Debugging
  4. A new Advanced config tab should have appeared, open it.
  5. Edit client_id and client_secret to:
    • client_id: 391436299960-8h0m09bckek77cpnu7sdpiikav6dlit2.apps.googleusercontent.com
    • client_secret: Lj0z0yxpGxhBWK_ohX2dH-AI
    • Make sure there isn't any spaces before or after the string of characters.
  6. If Google Calendar detects you as logged in, logout.
  7. Login to Google Calendar again.

Edit: Please remember to update to v69 (or whatever is the latest version of the widget) when you update to Kubuntu 20.04 with Qt 5.15.1. Otherwise plasmashell will segfault (Issue #154).

OckhamOdyssey commented 3 years ago

I change the plasmoid version, relog and change the client id and client secret. Now, when I clic the accounts.google.com link, it give me a 400 google error.

imagen

Zren commented 3 years ago

Make sure there isn't any spaces before or after the string of characters.

The link should be the following. If it isn't then you copied and pasted the client_id incorrectly.

https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcalendar%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ftasks&response_type=code&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&client_id=391436299960-8h0m09bckek77cpnu7sdpiikav6dlit2.apps.googleusercontent.com

OckhamOdyssey commented 3 years ago

It works, thanks.

80avin commented 3 years ago

Hey! If you want to use v74, I've managed to run it on Kubuntu 18.04. Since 18.04 support has been dropped officially, I've forked the project and added that support myself.

You can see it here: https://github.com/80avin/plasma-applet-eventcalendar

pmsobrado commented 3 years ago

Hey! If you want to use v74, I've managed to run it on Kubuntu 18.04. Since 18.04 support has been dropped officially, I've forked the project and added that support myself.

You can see it here: https://github.com/80avin/plasma-applet-eventcalendar

Thanks, I'll give it a try!