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

web-ext has no way to specify a user to use on Android, causing it to fail. #3116

Closed
Flyingbacen opened this issue Apr 24, 2024 · 7 comments
Closed

Comments

@Flyingbacen
Copy link

Flyingbacen commented Apr 24, 2024

Is this a feature request or a bug?

bug

What is the current behavior?

I'm attempting to install a plugin to my android device to test it, but I'm getting the error No Firefox packages were found on the selected Android device. Running verbose, I found it running pm list packages, so I ran it myself, and got the next error Shell does not have permission to access user 10 with no extra arguments. I have to manually specify in the command to use user 0 to find firefox, but I am unable to do that as far as I'm aware

What is the expected or desired behavior?

have a fallback or ask the user to enter the user id

Version information (for bug reports)

android nightly - 127.0a1
OS - Ubuntu 20.04
Phone: Samsung A13
node: 20.12.2
npm: 10.5.0
web-ext: 7.11.0

@Rob--W
Copy link
Member

Rob--W commented May 23, 2024

Could you share your verbose log?

We added auto-detection of --user in #2857. We need more information before we can improve this.

@astral-shpx
Copy link

I'm experiencing the same issue. Here are my verbose logs

[C:\ProgramData\nvm\v20.11.1\node_modules\web-ext\lib\program.js][info] Version: 7.11.0
[C:\ProgramData\nvm\v20.11.1\node_modules\web-ext\lib\program.js][debug] Discovering config files. Set --no-config-discovery to disable
[C:\ProgramData\nvm\v20.11.1\node_modules\web-ext\lib\config.js][debug] Discovered config "C:\Users\kiril\.web-ext-config.js" does not exist or is not readable
[C:\ProgramData\nvm\v20.11.1\node_modules\web-ext\lib\config.js][debug] Discovered config "C:\dev\github\borderify\package.json" does not exist or is not 
readable
[C:\ProgramData\nvm\v20.11.1\node_modules\web-ext\lib\config.js][debug] Discovered config "C:\dev\github\borderify\web-ext-config.js" does not exist or is not readable
[C:\ProgramData\nvm\v20.11.1\node_modules\web-ext\lib\cmd\run.js][info] Running web extension from C:\dev\github\borderify
[C:\ProgramData\nvm\v20.11.1\node_modules\web-ext\lib\util\manifest.js][debug] Validating manifest at C:\dev\github\borderify\manifest.json
[C:\ProgramData\nvm\v20.11.1\node_modules\web-ext\lib\extension-runners\firefox-android.js][debug] Listing android devices
[C:\ProgramData\nvm\v20.11.1\node_modules\web-ext\lib\util\adb.js][debug] Listing android devices
[C:\ProgramData\nvm\v20.11.1\node_modules\web-ext\lib\extension-runners\firefox-android.js][info] Selected ADB device: 192.168.1.6:5555
[C:\ProgramData\nvm\v20.11.1\node_modules\web-ext\lib\util\adb.js][debug] Listing installed Firefox APKs on 192.168.1.6:5555
[C:\ProgramData\nvm\v20.11.1\node_modules\web-ext\lib\util\adb.js][debug] Run adb shell command on 192.168.1.6:5555: ["pm","list","packages"]
[C:\ProgramData\nvm\v20.11.1\node_modules\web-ext\lib\program.js][error] 
UsageError: No Firefox packages were found on the selected Android device
    at FirefoxAndroidExtensionRunner.apkPackagesDiscoveryAndSelect (file:///C:/ProgramData/nvm/v20.11.1/node_modules/web-ext/lib/extension-runners/firefox-android.js:247:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async FirefoxAndroidExtensionRunner.run (file:///C:/ProgramData/nvm/v20.11.1/node_modules/web-ext/lib/extension-runners/firefox-android.js:64:5)   
    at async Promise.all (index 0)
    at async MultiExtensionRunner.run (file:///C:/ProgramData/nvm/v20.11.1/node_modules/web-ext/lib/extension-runners/index.js:66:5)
    at async run (file:///C:/ProgramData/nvm/v20.11.1/node_modules/web-ext/lib/cmd/run.js:177:3)
    at async Program.execute (file:///C:/ProgramData/nvm/v20.11.1/node_modules/web-ext/lib/program.js:268:7)
    at async file:///C:/ProgramData/nvm/v20.11.1/node_modules/web-ext/bin/web-ext.js:13:1

[C:\ProgramData\nvm\v20.11.1\node_modules\web-ext\lib\program.js][debug] Command executed: run

@astral-shpx
Copy link

The problem is the code from the PR @Rob--W mentioned is somehow not in the 7.11.0 release from Jan 24

@willdurand
Copy link
Member

I submitted a PR to backport the fix: #3146

@willdurand
Copy link
Member

@astral-shpx
Copy link

Now web-ext run works. Thanks!

@willdurand
Copy link
Member

I am going to close this issue now.

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

No branches or pull requests

4 participants