Different WebDriverException Erros when using Flask Apache2

i am trying to use a flask script which is working in debug mode fine.

When I set app.wsgi to the file i get a lot of erros in context with selenium.

When I set the user-data-dir i get the error: failed to write prefs file

I tried to copy the folder to a temporary location because i found out that selenium cant be used parallel.

By the way i dont use selenium parallel so i dont know where the error message is from.

But that doesnt work.

Do you have an idea why selenium script is working in flask debug mode but not wsgi apache2 server???