Sandbox not allowing injecting JS code?

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Re: Sandbox not allowing injecting JS code?

Postby magreenblatt » Wed Aug 11, 2021 9:26 am

I hope you’re not loading untrusted content from the internet while running the browser as root user.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Sandbox not allowing injecting JS code?

Postby ajitchavan » Wed Aug 11, 2021 10:03 pm

Czarek wrote:Does your JS error occur for any injected code? Try some basic code like "void(0)".

Yes JS error occurs at the time of injecting js code using ExecuteJavaScript. Tried with simple js code and that also result in same error.
But same code works properly when I use "--no-sandbox" flag.

Just for more info we are using below flags
Code: Select all
--no-sandbox --disable-gpu --disable-gpu-compositing --disable-site-isolation-trials --disable-smooth-scrolling

and when I remove "--no-sandbox" I am facing this issue. Do I need to add any other flag with this so that I can be able to use sandbox with my application and do not get js errors.

The disk errors you have may be relevant.

Why do you think so? as application is executing with normal user we have permission issue. if I execute my application with normal user and with --no-sandbox flag, I get same disk errors but I am able to browse without any js error.
ajitchavan
Techie
 
Posts: 27
Joined: Mon Mar 16, 2020 7:03 am

Re: Sandbox not allowing injecting JS code?

Postby ajitchavan » Thu Aug 12, 2021 5:01 am

magreenblatt wrote:I hope you’re not loading untrusted content from the internet while running the browser as root user.

No, I am not loading untrusted content. I do not have any issue while I run browser as root user, but for sandbox I can not run browser as root user.
Last edited by ajitchavan on Thu Aug 12, 2021 6:31 am, edited 1 time in total.
ajitchavan
Techie
 
Posts: 27
Joined: Mon Mar 16, 2020 7:03 am

Re: Sandbox not allowing injecting JS code?

Postby Czarek » Thu Aug 12, 2021 5:47 am

ajitchavan wrote:
Czarek wrote:
The disk errors you have may be relevant.

Why do you think so? as application is executing with normal user we have permission issue. if I execute my application with normal user and with --no-sandbox flag, I get same disk errors but I am able to browse without any js error.


I thought the JS errors could be related to Google scripts acessing cookies or some data. But as you say that's not the case.

Does the issue occur also with cefsimple/cefclient sample applications? What's the difference between these and your app?
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Previous

Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 205 guests