darkGrimoire / hoyolab-daily-bot

Genshin Impact's Hoyolab Daily Check-in Bot
MIT License
115 stars 44 forks source link

Bot not finding login credentials in Chrome and new version of Firefox #19

Closed DeniablePlausibility closed 2 years ago

DeniablePlausibility commented 2 years ago

This had been working flawlessly for about a week. After it did the check-in yesterday successfully, I noticed a new version of Firefox was available, so I updated (version 106.0). Today I noticed the the bot failed and reported:

Login information not found! Please login first to hoyolab once in Chrome/Firefox/Opera/Edge/Chromium before using the bot. LOGIN ERROR: cookies not found

I checked Firefox and it was already authenticated for Hoyolab as usual, no problems. So I uninstalled the bot and tried to reinstall it. Now it won't even install as a task, giving the same error as above. In the meantime, Firefox released an incremental update, 106.0.1, but it still doesn't work. I tried logging into Chrome (version 106.0.5249.119) instead, and verified that it is logged in, but got the same result with the bot reporting the same error and doesn't install as a task.

The bot configuration file is what it shipped with except that DELAY_MINUTE has been set to 2.

I have verified that Firefox has Hoyolab cookies set by dumping them out (actual cookie values removed):

.www.hoyolab.com TRUE / FALSE 253402257600 G_ENABLED_IDPS .hoyolab.com TRUE / FALSE 1697826658 mi18nLang .hoyolab.com TRUE / FALSE 1697826658 DEVICEFP_SEED_ID .hoyolab.com TRUE / FALSE 1697826658 DEVICEFP_SEED_TIME .hoyolab.com TRUE / FALSE 1697826659 DEVICEFP .hoyolab.com TRUE / FALSE 1697826660 _MHYUUID .hoyolab.com TRUE / TRUE 1697826661 ltoken .hoyolab.com TRUE / TRUE 1697826661 ltuid

I redownloaded version 1.15 and tried overwriting the existing files to see if it would make any difference, and sadly it did not.

DeniablePlausibility commented 2 years ago

Additional info: I noticed your script looks for "cookie_token" which exists in Chrome after logging on to Hoyolab but not in Firefox. I tried forcing the config file to choose Chrome but it still reported the same error.

DeniablePlausibility commented 2 years ago

Please close this request. I installed a cookie manager plugin on Firefox, logged out of Hoyolab, then force-deleted all cookies for that domain from the manager. After logging in fresh, the missing "cookie_token" cookie finally showed up and I got the script working. Sorry to jump the gun on a problem that was entirely on my end.