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

userdatadir so bigger #1102

Closed
victory-zz opened this issue Aug 19, 2024 · 2 comments
Closed

userdatadir so bigger #1102

victory-zz opened this issue Aug 19, 2024 · 2 comments
Labels
question Questions related to rod

Comments

@victory-zz
Copy link

After running for a long time, the user data file will become larger. How to delete this file after browser.stop using os.removel? Regardless of whether os. chmod ("path", 0777) is executed or not, it will still report "assessment is denied"; When using exec to delete a folder, it cannot be deleted, and cmd. run() does not report an error

use os.removeall:
err = os.chmod(userdatafile, 0777)
if err != nil {
log.Info("error infor:" + err.Error())
}
err = os.RemoveAll(userdatafile)
if err != nil {
log.Info("error infor:" + err.Error())
}

use exec:
//cmd := exec.Command("cmd", "/C", "rmdir", "/s", "/q", userdatafile)
//err = cmd.Run()
//if err != nil {
// log.Info("error infor:" + err.Error())
//}

@victory-zz victory-zz added the question Questions related to rod label Aug 19, 2024
Copy link

Please add a valid Rod Version: v0.0.0 to your issue. Current version is v0.116.2

generated by check-issue

@ysmood
Copy link
Member

ysmood commented Aug 19, 2024

Restart your OS, or kill all chrome related processes, or use https://go-rod.github.io/#/custom-launch?id=remotely-manage-the-launcher

@ysmood ysmood closed this as completed Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions related to rod
Projects
None yet
Development

No branches or pull requests

2 participants