jack-mil / bing-rewards

A script to automate daily Bing rewards points
MIT License
177 stars 23 forks source link

Running via cron signs out of MS account #14

Closed tobfromme closed 1 year ago

tobfromme commented 1 year ago

I ran this on Arch with no issues. I recently migrated to Fedora 36 and have the following:

  1. Chrome installed (google-chrome-stable-107.0.5304.87-1.x86_64)
  2. Python 3.10.7
  3. Cron daemon is via cronie-1.5.7-5.fc36.x86_64
  4. Cron entry is:

15 3,5 * DISPLAY=:0 /usr/local/bin/bing-rewards --exe=/usr/bin/google-chrome-stable & > /home/tobfromme/rewards.out 2>&1

  1. Installed bing-rewards via "pip install bing-rewards"
  2. SELinux disabled via "selinux=0" at boot and /etc/selinux/config set to Permissive

If I launch Chrome manually and sign into my MS account, I can then launch bing-rewards any number of times with no issue. If I have bing-rewards launched via cron, even once, it signs me out. Further, if I launch Chrome manually after the cron job, I am signed out of my MS account.

tobfromme commented 1 year ago

I'm not sure why this happens, but whenever I open a ticket, I think of some additional way to troubleshoot.

I simply put Chrome in a cron entry and it signed me out, leaving bing-rewards out of the mix. However, if you have any ideas of why this might be happening, I'm all ears.

tobfromme commented 1 year ago

And like that, I figured it out, after spending hours on it. To solve, I did the following:

  1. Add a cron entry to launch Chrome
  2. Sign into MS account
  3. Exit Chrome
  4. Update cron entry to launch Chrome again
  5. Ensure it is still signed into MS account
  6. Enable the cron job for bing-rewards

Sorry for the clutter.

jack-mil commented 1 year ago

Glad you figured it out. I haven't tried using cron or Chrome on linux before, but sounds too mee it was any issue with Chrome not remembering your cookies/user preferences. Perhaps there is a way to launch chrome with a specific profile selected.