question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remote access on android

See original GitHub issue

I am trying to use puppeteer remotely on some Android device.

I am forwarding port 9222 with $ adb forward tcp:9222 localabstract:chrome_devtools_remote

I am able to connect to the browser with

const browser = await puppeteer.connect({ browserWSEndpoint: 'ws://127.0.0.1:9222/devtools/browser', });

But when trying to get the available pages with const pages = await browser.pages(); or create a new one with const page = await browser.newPage();, the script stalls, and the promise is never resolved.

I notice something weird when I try to list the browser targets with console.log(browser.targets()): each loaded page appears twice in the list. For example, if the remote browser has one tab with google.com, I will see two page targets with the following TargetInfo:

{ targetId: 'ECB167EEA4CEBC8DCCF2A8C9D14E4207', type: 'page', title: 'Google', url: 'https://www.google.com/', attached: false, browserContextId: '5E3E44DA3AE8CB75491B17CBD5BC5D80' }

{ targetId: '2968', type: 'page', title: 'Google', url: 'https://www.google.com/', attached: false }

I am on macosx, and installed puppeteer with nmp install puppeteer. Node version is v12.10.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

1reaction
Niekcommented, Sep 21, 2020

Same issue here, the newPage() promise is never resolved.

@arenevier @SirPepe did you find any workaround?

0reactions
OrKoNcommented, Sep 5, 2022

Please try with the latest Puppeteer version and please re-open the issue if it still happens. There have been target management improvements landed in Puppeteer recently that should help with this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TeamViewer Remote Control - Apps on Google Play
Use this app to remotely control other devices. Want to remote into this device? > Download the QuickSupport app
Read more >
4 Ways to Control Android Phone Remotely in 2022 - AirDroid
1. Via AirDroid Personal - Wireless and Free ... AirDroid Personal is one of the best apps to remotely control any Android from...
Read more >
How to remotely control one Android device with another
On your phone, go to the Remote support tab and enter the nine-digit code. The person will have ten seconds to accept your...
Read more >
Remote Access an Android: The Ultimate Guide - Parallels
How to remotely access an Android · 1. Download the Parallels Access App for Android devices · 2. Open the Parallels Access App...
Read more >
Remote Access, View and Control Android Phones and Tablets
How to remotely view Android tablet and Android phone screens · Get Splashtop SOS · Download the SOS app on the device that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found