正对ubuntu下执行firefox操作的时候异常

jenkins执行脚本报错,但是手动执行脚本,可以通过,所以判定不是脚本的问题

image-1653971550217

百度了一堆,没说出要点,直接修改组就行了

1653962726911   mozrunner::runner       INFO    Running command: "/usr/bin/firefox" "--marionette" "--headless" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofilecjdfZV"
Running Firefox as root in a regular user's session is not supported.  ($XAUTHORITY is /run/user/1000/gdm/Xauthority which is owned by array.)

image-1653966569063

解决方法

chown -R root:root /run/user/1000/gdm/Xauthority
Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐