Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stuck at root INFO Ensure ADB is running #67

Open
2 tasks done
AnhTuan176 opened this issue Feb 15, 2024 · 33 comments
Open
2 tasks done

stuck at root INFO Ensure ADB is running #67

AnhTuan176 opened this issue Feb 15, 2024 · 33 comments
Labels
bug Something isn't working

Comments

@AnhTuan176
Copy link

Describe the bug

I have both Epic7 Bot and Epic Seven on BlueStack 5, and I also turned on ADB on BlueStack but when I press Start. It stucks at root INFO Ensure ADB is running

Steps to reproduce

No response

Additional context

No response

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.
@AnhTuan176 AnhTuan176 added the bug Something isn't working label Feb 15, 2024
@wyvernstar
Copy link

open powershell with ADM, type adb start-server and press enter, the server should start and u now only need to do is start the bot again

@brunocordioli072
Copy link
Owner

I'm not sure if it's a problem with adb start-server @wyvernstar,

def ensure_adb_is_running(self):
logging.info("Ensure ADB is running")
subprocess.Popen(
["adb", "start-server"],
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
stdin=subprocess.PIPE,
).wait()

The ensure_adb_is_running should be running adb start-server each time a command is run.

@brunocordioli072
Copy link
Owner

@AnhTuan176 have you done the setup on Bluestacks to enable Android Debug Bridge? It's step 3 on the Getting Started.

  1. Enable Android Debug Bridge on your emulator of choice. (Bluestacks is recommended.)
    • Bluestacks: Settings > Advanced > Enable Android Debug Bridge.
    • Nox: Settings > Device > Enable Network Bridge Mode.

@eswiig
Copy link

eswiig commented Feb 26, 2024

I'm not sure if it's a problem with adb start-server @wyvernstar,

def ensure_adb_is_running(self):
logging.info("Ensure ADB is running")
subprocess.Popen(
["adb", "start-server"],
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
stdin=subprocess.PIPE,
).wait()

The ensure_adb_is_running should be running adb start-server each time a command is run.

I can confirm that adb start-server did fix the issue for me when I had the same issue. I even saw the output that the adb server was not running, started it and after that it worked.

(While you were away from git for a while, the app stopped working and I made several (now closed) posts about the issue, adb start-server fixed it for me).

@ptcutican
Copy link

I tried to run adb start-server in powershell but still didn't work for me

@brunocordioli072
Copy link
Owner

brunocordioli072 commented Feb 29, 2024

It seems a "Debug Mode" would help on this issue. Showing terminal output and console output. I will look into it. A question, @ptcutican the issue persists on version v2.0.8-beta for you?

@brunocordioli072
Copy link
Owner

@eswiig and @wyvernstar, thanks for helping with all the issues on git! If you think anything on the app can improve or you can fix something, please feel free to send a Pull Request, and I will review it.

@ptcutican
Copy link

ptcutican commented Mar 1, 2024

It seems a "Debug Mode" would help on this issue. Showing terminal output and console output. I will look into it. A question, @ptcutican the issue persists on version v2.0.8-beta for you?

Yes, it persisted on v2.0.8-beta. @brunocordioli072 And how to show terminal output and console output so I can take screenshot ?

@brunocordioli072
Copy link
Owner

@ptcutican I will need to develop a "Debug mode" for that. In its current version, it's not possible to check terminal and console output.

@vqhchinh98
Copy link

any fix for this issue yet? try adb start-server in powershell but still nothing happend

@TonyMT09
Copy link

TonyMT09 commented Mar 8, 2024

Same problem here

@brunocordioli072
Copy link
Owner

Released v2.0.9-beta. Now we should be able to see if the adb start-server is actually working correctly on the epic7 bot. Now, if anything goes wrong, it will log on the Logs a "Something went wrong" with the log. @TonyMT09 @vqhchinh98 @AnhTuan176 @ptcutican could you test again?

@ptcutican
Copy link

@brunocordioli072 I've tested with the newest version. And before test i also checked

  • ADB is turned on in Emulator
  • Run adb start-server in Powershell
    But still show root INFO Ensure ADB is running.
    image

@brunocordioli072
Copy link
Owner

@TonyMT09 @vqhchinh98 @AnhTuan176 @ptcutican could you test again with this release https://github.com/brunocordioli072/epic7_bot/releases/tag/v2.0.9-fix-stuck-at-ensure-adb-is-running? I've added a bunch of logs to see in what step of the Ensure ADB is running you guys are stuck.

@ptcutican
Copy link

@brunocordioli072 your new release worked. I've tested it
image

@ptcutican
Copy link

ptcutican commented Mar 14, 2024

@brunocordioli072 just found a bug. Only work well after first time run the app. After that it keep saying this. My bluestacks is installed in F:
image

@brunocordioli072
Copy link
Owner

brunocordioli072 commented Mar 15, 2024

This connect_devices_to_adb was a helper function to try to connect to available devices on the machine. Since this seems to be the cause of this error. I've removed it. Release v2.0.10-beta should fix the issue. @ptcutican could you test again?

@ptcutican
Copy link

ptcutican commented Mar 15, 2024

@brunocordioli072 Sure, I'll test it again and let you know the result later. One question: Will this shop refresh automatically stop when it runs out of gold, or will it keep refreshing?

@ptcutican
Copy link

After around 8 hours of testing, this v2.0.10-beta version worked quite well. No bugs were found.

@brunocordioli072
Copy link
Owner

@ptcutican Nice! Glad to hear it. @TonyMT09 @vqhchinh98 @AnhTuan176 could you test again with v2.0.10-beta, see if it works for you as well?

@ptcutican
Copy link

ptcutican commented Mar 19, 2024

@brunocordioli072 idk if it is a bug or not. But in Arena NPC Auto Battle, if user uses a team with only 1-2 units (for example A.Vildred only), there is a warning noti showed, and we need to click "Do not display" button to close it. But seems like the tool doesn't regconize it so it will stuck at this screen forever. Could you check it again ?

And seems like new code just made a bug
image

@brunocordioli072
Copy link
Owner

@ptcutican, I've had to redo the connect_devices_to_adb function because of another issue opened. Question, how many disks exist on your machine, and where are your Bluestacks installed?

@brunocordioli072
Copy link
Owner

Will create a new release v2.0.12-beta to try to fix the error on connect_devices_to_adb

@ptcutican
Copy link

@brunocordioli072
image
Bluestacks is installed in GAMES (F:)

@brunocordioli072
Copy link
Owner

Did v2.0.12-beta fix the issue? @ptcutican

@TonyMT09
Copy link

Did v2.0.12-beta fix the issue? @ptcutican

Confirm everything is working well now

@ptcutican
Copy link

Did v2.0.12-beta fix the issue? @ptcutican

Yes, it's working well so far

@ptcutican
Copy link

@brunocordioli072 In the Arena NPC Auto Battle, if a player uses a team with only 1-2 units (for example, A.Vildred only), a warning notification appears, and we need to click the "Do not display" button to close it. However, it seems like the tool doesn't recognize it, so it gets stuck at this screen forever. Could you please check it again?

@brunocordioli072
Copy link
Owner

Hey, @ptcutican i can take a look. Could you open a different issue with the problem? Just for tracking and documentation.

@ptcutican
Copy link

@brunocordioli072 sure, i just created new issue.

@SturmGamerxD724
Copy link

SturmGamerxD724 commented Apr 13, 2024

Bild_2024-04-13_185322225

Got the same issue as other people here. Switched from Bluestacks 4 to 5 for it because the bot didn't recognice mystic medals and didn't tap the buy button. Now on Bluestacks 5 I have the same issue as many other people here.

Edit: It works now after I typed adb kill-server. I don't understand why but from what I read here this shouldn't be the case

@brunocordioli072
Copy link
Owner

Hey @SturmGamerxD724, could you check issue #82? I believe the solution to that issue will fix your problem.

@SturmGamerxD724
Copy link

Hey @brunocordioli072, apparently when I used adb kill-server yesterday, I completely fixed the issue. The bot is working just fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants