Pong420 / google-tasks-desktop

Unofficial Google Tasks Desktop Client
MIT License
138 stars 16 forks source link

Dont pass the "loading" step #54

Closed cyanodom closed 3 years ago

cyanodom commented 3 years ago

Hello, If this were really able to work well I will be really happy, but on my 3 computers on archlinux, ubuntu, red hat enterprise, none of these passed the step : "loading" tasks, just after I complete google console setup and enter the code allowing the app to access the tasks, the blue bar load until the end, except for the two or three last pixel.

computers : Laptop : i7-8550U - GTX 1050 max-Q - SSD NVME (but don't know which and ... tired to search now) Server : XEON X5677 - SATA HDD 2To (same ... trired, sorry anyway the problem cant come from here) - no CG (via ssh on the 2 other computers) Desktop : I5-10600 - RTX 2080 ti - multiple hardrives ubuntu is on 100GB SATA HDD

what I tried : -> install from appimage but ubuntu says : "failed to register appimage in system via libappimage", I have many appimages that works well, like balena-etcher, unofficial discord so I think the problem comes from your one ... --> open the appimage and choose "run once" from official AppImageLauncher window, installed from official source, that works but ... I'm not interested in, and same loading problem so ... -> so install from deb -> nothing --> run with --no-sandbox but not sure if this change a lot -> nothing -> tweak google console to change things ... in a near to randomly method (i should say that i followed the installation process)

results : -> nothing ... no errors reporting in commandline but the app keeps loading for hours

also maybe you can update your .desktop file to show a correct icon ... i wonder "./public/icon/icon.png" should be replaced by "/usr/share/icon/hicolor/512x512/apps/google-tasks-desktop.png"

Thanks (and sorry my english is ... sometimes not as good as I want, I'm french)

Pong420 commented 3 years ago

Are you using the latest version 3.1.0? Please try Ctrl + Alt + I to open the develop console and see is there any error

Pong420 commented 3 years ago

My Ubuntu 20.04 works fine.

cyanodom commented 3 years ago

Yes latest version, wait i try, on ubuntu 20.04

cyanodom commented 3 years ago

Got the JS error : "Uncaught Error: Tasks API has not been used in project XXXXXXXXXXX before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/tasks.googleapis.com/overview?project=xxxxxxxxxx then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry. at t.Gaxios._request (2.5c412261.chunk.js:2) at async l.requestAsync (2.5c412261.chunk.js:2)"

cyanodom commented 3 years ago

ok I succeed, I needed to enable Task API through the google console page, the URL is noted in past message

cyanodom commented 3 years ago

maybe this is a new google feature and you may specify it in setup process ?

cyanodom commented 3 years ago

Anyway thanks a lot

Pong420 commented 3 years ago

About the app image icon. I don't known how to edit the .desktop file. I am waiting for the next release of electron-builder and it may fix the issue

cyanodom commented 3 years ago

If it dose'nt : 1 - extract the ar archive (".deb" is an ar archive in fact) with "ar x file" command 2 - go to usr/share/application/google-tasks-desktop.desktop (you may login in super user as files may be write protected to normal users 3 - modify icon location as mentioned before so the icon should appear correctly through the ".deb" install process 4 - dpkg-deb --build root_folder_of_your_app

cyanodom commented 3 years ago

I have made a script you can verify it is not harmful if you want ?

Pong420 commented 3 years ago

I am not usually using Ubuntu. But you could post the scripts here. Maybe someone needs.

And this issue could be closed?

cyanodom commented 3 years ago

this script is not only ubuntu compatible, it is POSIX, I'm currently upgrading the cleaness

cyanodom commented 3 years ago
#!/usr/bin/env bash

#configure (you can edit) :
deb_name="google-tasks-desktop_3.1.0_amd64" #the name of the file without ".deb at the end"

#compute configure (don't touch)
deb_file="$deb_name.deb"

#request for SU privileges
if [ -z $USER ]
then
    echo "Advise: I recommend this script not to be run as super user, even if your password will be asked later"
    echo "what's your username ? (if you are logged into root press Ctrl+D)"
    read $USER
    ([ -z $USER ] && echo "Ok exiting !" && exit 0 ) && exit 0
elif [ "$USER" = "root" ]
then
    echo "Advise: I recommend this script not to be run as super user, even if your password will be asked later"
    echo "do want want to continue anyway ? (y/N)"
    read answer
    ([ "$answer" = "y" ] || (echo "Ok exiting !" && exit 1)) || exit 0
    echo "Ok we continue anyway !"
else
    :
fi

sudo bash -c :

#compute files
echo "extract deb archive named $deb_file in current directory"
(sudo mkdir $deb_name &> /dev/null || (echo "failed to create folder : $deb_name : maybe it is already present in this directory ? (delete it)" && exit 1)) || exit 1
(sudo mv $deb_file $deb_name/ggtd.deb &> /dev/null || (echo "$deb_file : No such file in current directory (it's not sure to be compatible with other versions but you can try edit configure section of this script it's pretty simple)" && exit 1)) || exit 1
cd $deb_name &> /dev/null
sudo ar x ggtd.deb &> /dev/null
sudo rm ggtd.deb &> /dev/null
sudo mkdir DEBIAN &> /dev/null
sudo mv control.tar.gz DEBIAN/ &> /dev/null
cd DEBIAN &> /dev/null
sudo tar -xvzf control.tar.gz &> /dev/null
sudo rm control.tar.gz &> /dev/null
cd ../ &> /dev/null
sudo tar -xvf data.tar.xz &> /dev/null
sudo rm data.tar.xz &> /dev/null
cd usr/share/applications/ &> /dev/null

#mod the deb
desktop_file=""
desktop_file+='[Desktop Entry]\n'
desktop_file+='Name=Google Tasks\n'
desktop_file+='Exec="/opt/Google Tasks/google-tasks-desktop" %U\n'
desktop_file+='Terminal=false\n'
desktop_file+='Type=Application\n'
desktop_file+='Icon=/usr/share/icons/hicolor/512x512/apps/google-tasks-desktop.png\n'
desktop_file+='StartupWMClass=google-tasks-desktop\n'
desktop_file+='Encoding=UTF-8\n'
desktop_file+='Comment=Unofficial google tasks desktop application\n'
desktop_file+='Categories=Utility;'
echo "modifying desktop file, new desktop file is :"
echo -e $desktop_file | sudo tee google-tasks-desktop.desktop
echo

#build new deb
cd ../../../..
sudo rm $deb_name/debian-binary &> /dev/null
sudo dpkg-deb --build $deb_name &> /dev/null
sudo rm -rf $deb_name &> /dev/null
sudo chown "$USER":"$USER" $deb_file &> /dev/null

echo "Modifying $deb_name done successfully ! Thanks using this script ! , just install as you would install any .deb file on your system"
cyanodom commented 3 years ago

just for those who dont know how to use this, just :

  1. copy/paste to a .sh file for example :
    $ touch script.sh
    $ nano script.sh

    Ctrl+shift+V to paste - Ctrl + O to save then ENTER to validate - Ctrl + X to exit

  2. give execution rights : $ chmod +x script.sh
  3. then ... click on it or execute it from terminal : $ ./script.sh
cyanodom commented 3 years ago

I advise @Pong420 to execute it on the release file in order for everyone to be able to have icon on deb file without tweaking the file manually or upload to the git (if so i just wish you mention my username somewhere on the project, but it's a wish, you do what you want ^^)

cyanodom commented 3 years ago

Thanks a lot

Pong420 commented 3 years ago

Thanks, but i will not execute it on the release file. I have mention your solution in release page utils the issue fixed