Roukys / HHauto

GNU General Public License v3.0
45 stars 44 forks source link

Stuck in Seasons [5.3-beta.24] - Script stuck on Seasons #98

Closed dadanda closed 3 years ago

dadanda commented 3 years ago

5.3-beta.20 issue Describe the bug Get stuck at seasons when you lose/win the match.

Lose log: (after trying to crush opponent) VM19442 userscript.html:4580 no event VM19442 userscript.html:4190 Time to fight in Season. VM19442 userscript.html:2102 Performing auto Season. VM19442 userscript.html:2174 Switching to Season screen. VM19442 userscript.html:554 going battle lang-en->season VM19442 userscript.html:667 GotoPage : /season.html VM19442 userscript.html:4314 autoLoop Disabled VM19442 userscript.html:4580

Win log: (after trying to crush opponent) userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:4580 no event userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:4190 Time to fight in Season. userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:2102 Performing auto Season. userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:2174 Switching to Season screen. userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:554 going battle lang-en->season userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:667 GotoPage : /season.html userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:4314 autoLoop Disabled userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:4580

To Reproduce Steps to reproduce the behavior: Turn on MasterSwitch and AutoSeasons and Collect (threshold 0). (I also have ShowPowerCalc (default), ShowInfo, and SettingsperTab) (I also have more than 1 kisses)

Old 5.2 issue: Describe the bug The script gets stuck in 2 places, one in a loop(though it eventually resolves itself) and one at the "You won!" screen. The one in the loop is the same case as Bug [5.3-beta.5] - *AutoSeasons' is broken. The one at the "You won!" screen, is just stuck at that area and does not move unless the page refreshes or I click the ok button.

"You won!" log: content.js:1 Uncaught SyntaxError: Identifier 'alreadyInjected' has already been declared userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:3872 no event userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:3627 Time to fight in Season. userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:1949 Performing auto Season. userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:1999 Switching to Season screen. userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:460 going battle lang-en->season userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:573 GotoPage : /season.html userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:3732 autoLoop Disabled

Then it just gets stuck.

To Reproduce Steps to reproduce the behavior: Turn on MasterSwitch and AutoSeasons and Collect. (I also have ShowCalcPower, ShowInfo, and SettingsperTab) (I also have more than 1 kisses)

Screenshots Stuck at "You won!"

System: OS: Windows Browser: Chrome Version 87.0.4280.88 (Official Build) (64-bit) Script-Helper: Tampermonkey 4.11 Script-Version: 5.2.0 Actual activated options: Options active, Master Settings per tab AutoSal: 120 AutoContest AutoMission & Collect AutoTrollBattle(Grunt) +Event AutoSeason + Collect AutoQuest AutoPachinko AutoLeagues + UsePowerCalc + Collect (Max rank: 0) AutoPowerplaces: 1;2;3 + DoAll AutoChampions & UseEne: 1;2;3;4;5;6 AutoStats BuyExp BuyAff BuyLegGearRainbow ShowInfo ShowCalcPower (But the bug happens even if I have just the ones at how to reproduce.)

Additional context For Nutaku, it isn't much of a problem because of this: Mixed Content: The page at 'https://www.nutaku.net/games/harem-heroes/play/' was loaded over HTTPS, but requested an insecure element 'http://ctrack.trafficjunky.net/ctrack?action=list&type=add&id=MA&context=NTK&cookiename=AdtoolV7&age=30&maxcookiecount=10'. This request was automatically upgraded to HTTPS, For more information see https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.html (index):732 Mixed Content: The page at 'https://www.nutaku.net/games/harem-heroes/play/' was loaded over HTTPS, but requested an insecure element 'http://ctrack.trafficjunky.net/ctrack?action=list&type=add&id=MA&context=NTK&cookiename=AdtoolV7&age=30&maxcookiecount=10'. This request was automatically upgraded to HTTPS, For more information see https://blog.chromium.org/2019/10/no-more-mixed-messages-about-https.html ifr?synd=nutaku&container=nutaku&country=US&lang=en&mid=1&owner=14563272&viewer=14563272&aid=59579&tid=harem-heroes&view=canvas&parent=https%3A%2F%2Fwww.nutaku.net&url=https%3A%2F%2Fnutaku.haremheroes.com%2Fintegrations%2F%3Faction%3Dgadget&noinfo=0&nocache=0&debug=1&view-params=&st=d71UO%2BW%2FcPli7pXdbYNTcsb32nwPbNh%2BXWPImos4oXf5Gg5jfLVprNrcvUeE3XQQaVL1iulXEVVxZIWCdVIh8jT1Jk48h7zklRdQF81okQRA3QQQQ7bon2kdXSlGDQjz25%2FzkoliV7m7OLevDPkE6V3CndLNMRJ4A5BBm6ax4oqpdQgQeAwQumb%2FjvkBtmilZNgVWEFgwp4WbFgxGfFidwhOmmvlvFJT7eiEkrFJ7jGHJ%2Fh%2Fscm0PPUwK5e3xec4OaWeaA%3D%3D:33

OldRon1977 commented 3 years ago

Try the latest beta here: https://github.com/Roukys/HHauto/raw/5.3-beta/HHAuto.user.js The problem should be fixed there... also it might be a problem with Chrome, you can also try to use MS Edge, others have reported, that here the script runs a lot smoother.

dadanda commented 3 years ago

Thanks for the info, I would ask tho when would the beta be the normal version if it does fix the issues? I would also switch to MS Edge but I really don't want to have multiple different browsers for everything I do. If the problems continue to persist, I would definitely swap to MS Edge.

OldRon1977 commented 3 years ago

The 5.3 Beta is in the stadium of stabilization, so no new features are implemented, we are hunting down the bugs ;) It should be non-beta soon ;)

dadanda commented 3 years ago

Bumping this again, there is an issue with AutoSeasons at the Win/Lose Screen. Again there's no issue with the Nutaku ver. because of the thing I mentioned in the old issue. And it can resolve itself with an autotabreloader of somesort.

Roukys commented 3 years ago

hello @dadanda 

I'm taking a look, strange I'm also on chrome and I do not see the win screen ....

but your issue seems to be that gotoPage season doesn't seems to really go to that page ...

I'm trying to reproduce

Roukys commented 3 years ago

there is nothing in the log after the autoLoop Disabled?

dadanda commented 3 years ago

Yeah when the script gets stuck, after the line "autoLoop Disabled", there's nothing else unless I manually go to a menu or press ok.

Roukys commented 3 years ago

ok so issue is in getPage somewhere it doesn't go to the good page, I'll think and try and propose a debug version

dadanda commented 3 years ago

I'll just add this after rechecking the console again, there is another line after "autoLoop Disabled", its "no event".

Roukys commented 3 years ago

@dadanda 

could you add this line after line 665 : console.log('GotoPage : '+togoto);


            console.log('GotoPage : from '+window.location+' to '+window.location.origin+togoto);

and when trying again send the log ?

Seems the gotoPage doesn't go anywhere in your case ...

dadanda commented 3 years ago

Alright, I've added the line into the 5.3-beta.22 version of the script and also disabled my tab refresher. I've also noticed that there is that getting stuck issue when doing AutoChampions I think. I will confirm along with the AutoSeason stuck and send the logs in.

dadanda commented 3 years ago

AutoChampionsLog: userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:667 GotoPage : /champions-map.html userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:668 GotoPage : from https://www.hentaiheroes.com/champions/6 to https://www.hentaiheroes.com/champions-map.html userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:4581 no event

And it gets stuck right here.

For AutoSeason, it gets stuck again. Heres the log:

Time to fight in Season. userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:2103 Performing auto Season. userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:2134 On season arena page. userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:2140 Going to crush : Cliff userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:4581 no event userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:4191 Time to fight in Season. userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:2103 Performing auto Season. userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:2175 Switching to Season screen. userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:554 going battle lang-en->season userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:667 GotoPage : /season.html userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:668 GotoPage : from https://www.hentaiheroes.com/battle.html?id_season_arena=144795 to https://www.hentaiheroes.com/season.html userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:4315 autoLoop Disabled userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:4581

I will again say that it's only a HentaiHeroes problem, not a Nutaku one for some reason or another.

Killer66 commented 3 years ago

Having issues on autoChampions too, looping forever. Both 5.2 and 5.3. Season working fine tho.

Roukys commented 3 years ago

@dadanda @Killer66 Do  you still have the issue when disabling settbytab ?

dadanda commented 3 years ago

Will it affect my other game as I am both running a Hentai Heroes and Harem Heroes account.

Roukys commented 3 years ago

ah yes that is one usecase of the settbytab ... didn't thought about it ...

if there is the no event log does mean that some kind of refresh happened ...

can you try and replace : 

window.location = window.location.origin + togoto;

by : 

location.href = togoto;
dadanda commented 3 years ago

I cannot test this yet as I don't have enough tickets to do it. But I will get back to you as soon as I could.

Roukys commented 3 years ago

anyway detected an issue on champions ...

working on the fix for both 5.2 and 5.3-beta

Killer66 commented 3 years ago

I don't use settbytab. The only way I've found to get champs working again was one of the following:

resetting chrome / pc messing with the filter *Disabling HH++

I've done all the things above and autoChamps was working again. Don't know what of these actions made the job, since I've done all of them.

Roukys commented 3 years ago

@Killer66 this one is dealt with within #104

dadanda commented 3 years ago

Stuck again in 5.3-beta.24 for Seasons. Will check if Champions get stuck as well. (Its on Hentai Heroes.)

Log: userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:4210 Time to fight in Season. userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:2122 Performing auto Season. userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:2153 On season arena page. userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:2159 Going to crush : Heroes userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:4600 no event userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:4210 Time to fight in Season. userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:2122 Performing auto Season. userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:2194 Switching to Season screen. userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:554 going battle lang-en->season userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:667 GotoPage : /season.html userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:4334 autoLoop Disabled userscript.html?name=HaremHeroes%20Automatic%2B%2B.user.js&id=474169b9-21de-4ce3-aff0-a3d228758ae1:4600