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

fix: "SYS_KEYS has no physical keys " error on preview #2646

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

elliots
Copy link

@elliots elliots commented Nov 27, 2024

"** SYS_KEYS has no physical keys but with factor 2.0%."

Description

When running preview, I got

⠹ Starting app... (0.2s)Exited with code 251

stdout:
  bash arg: -p
  bash arg: com.my.app
  bash arg: 1


stderr:
args: [-p, com.my.app, 1]
 arg: "-p"
 arg: "com.my.app"
 arg: "1"
data="com.my.app"
** SYS_KEYS has no physical keys but with factor 2.0%.

Found https://stackoverflow.com/questions/44860475/how-to-use-the-monkey-command-with-an-android-system-that-doesnt-have-physical

Now it doesn't error.

But, I have no idea why I got it, or if this fix will cause other problems.

❯ adb --version
Android Debug Bridge version 1.0.41
Version 35.0.2-12147458
Installed as /Users/me/Library/Android/sdk/platform-tools/adb
Running on Darwin 23.5.0 (arm64)

Type of Change

  • ✨ New feature (non-breaking change which adds functionality)
  • 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • 🧹 Code refactor
  • ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore
  • 🧪 Tests

@@ -51,6 +51,7 @@ class Adb {
if (deviceId != null) ...['-s', deviceId],
'shell',
'monkey',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm so confused why we're using monkey at all.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, I guess that's a known way. I'm used to historically sending an intent: https://www.repeato.app/launching-android-applications-via-adb/

 "** SYS_KEYS has no physical keys but with factor 2.0%."
@bryanoltman
Copy link
Contributor

It looks like tests are failing and cspell is unhappy. These should both be easy to fix. For cspell, you can add "syskeys" to shorebird/cspell.config.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants