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

Exception in backend #6

Open
chrisvidal opened this issue Mar 14, 2018 · 6 comments
Open

Exception in backend #6

chrisvidal opened this issue Mar 14, 2018 · 6 comments

Comments

@chrisvidal
Copy link

HI,

I just installed the plugin, and when I try to set the CORS settings from the backend, I am having this popup:
on line 940 of /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php

Any idea what is happening please?
Thanks in advance

@tobias-kuendig
Copy link
Member

Can you post the complete error? You only posted the last part of it.

@chrisvidal
Copy link
Author

chrisvidal commented Mar 14, 2018

this is all I have inside a small popup in the backend, after clicking on " add new item".
nothing in the log, last oc build.

screenshot 2018-03-14 16 20 43

@tobias-kuendig
Copy link
Member

Look at your storage/system.log file and post the stack trace from there.

@chrisvidal
Copy link
Author

i did look storage/logs/system.log there and it is empty

@tobias-kuendig
Copy link
Member

Then check your php error logs and webserver logs. I cannot help you further with this error message since there is no information to work with.

You can modify the Application.php on line 940 and add

info('application backtrace', debug_backtrace());

before the throw statement to log the exact backtrace to the abort function.

@jeremymouton
Copy link

jeremymouton commented Dec 19, 2022

Ran into this issue a few times when deploying to a server.

The "" on line 940 of /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php error is because all backend ajax routes are returning a 403 error.

This happens if the offline_cors_settings item is missing from the system_settings table in the database.

To fix it:

  • Create a new row in the system_settings table.
  • Add offline_cors_setting in the "item" column.
  • Add {"supportsCredentials":"0","maxAge":null,"allowedOrigins":[{"value":"*"}],"allowedHeaders":[],"allowedMethods":[],"exposedHeaders":[]} in the "value" column.
  • Clear the backend cache (php artisan cache:clear).

This will fix the backend error and make the CORS settings editable from the backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants