rod icon indicating copy to clipboard operation
rod copied to clipboard

Emulate Device has some different with chrome toggle device but I dont know how to fix it

Open w849688611 opened this issue 2 years ago • 12 comments

version: v0.103.0

Question eg: use rod visit steam

func main(){
        browserPath, _ := launcher.LookPath()
	l:=launcher.New().Bin(browserPath)
	defer func() {
		l.Kill()
		l.Cleanup()
	}()
	u := l.MustLaunch()
       targetUrl:="https://store.steampowered.com/join"
       page:=rod.New().ControlURL(u).MustConnect().MustEmulate(devices.IPhoneX).MustPage(targetUrl)
}

we can see that the tag span do not listen touchstart or touchend event,because the website do not think we are a mobile device

image

but if we use the chrome toolbar to emulate mobile device and refresh the page,we can see that the span tag has listen touch event now the website think we are a mobile device

image

so where is the different between rod emulate and chrome toolbar enmulate ?? please help me

w849688611 avatar Mar 20 '22 05:03 w849688611

Please add a valid **Rod Version:** v0.0.0 to your issue. Current version is v0.103.0 generated by check-issue

rod-robot avatar Mar 20 '22 05:03 rod-robot

image version is v0.103.0

w849688611 avatar Mar 20 '22 05:03 w849688611

#322

ysmood avatar Mar 20 '22 05:03 ysmood

@ysmood please help me reopen the issues

w849688611 avatar Mar 20 '22 05:03 w849688611

Still #322

ysmood avatar Mar 20 '22 05:03 ysmood

@ysmood please help reopen

w849688611 avatar Mar 20 '22 05:03 w849688611

I think the problem is not the emulation API, because other parts work fine, I think it's because the Captcha uses some other way to detect if the browser is not mobile:

func main() {
	rod.New().MustConnect().DefaultDevice(devices.IPhoneX).MustPage("https://store.steampowered.com/join")
	utils.Pause()
}
image

ysmood avatar Mar 20 '22 14:03 ysmood

The same problem with puppeteer, so I think it's an upstream issue with Chromium:

https://github.com/puppeteer/puppeteer/issues/8150

ysmood avatar Mar 20 '22 14:03 ysmood

Has the problem been solved ?

gopkg-dev avatar Mar 30 '23 12:03 gopkg-dev

Has the issue '10793' been resolved in Puppeteer? Can you also handle the network session manager on the Go side?

Ryan-gsq avatar Jan 03 '24 05:01 Ryan-gsq

@Ryan-gsq Good point, it's in the plan.

ysmood avatar Jan 03 '24 07:01 ysmood

Thank you for your work, I will wait

Ryan-gsq avatar Jan 04 '24 17:01 Ryan-gsq