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

Refused to set the document's base URI to '' because it violates the following Content Security Policy directive: "base-uri 'self' #4814

Closed
J-Wick4 opened this issue Jan 30, 2024 · 3 comments

Comments

@J-Wick4
Copy link

J-Wick4 commented Jan 30, 2024

Describe the Bug

I'm getting this error every time the editor is open to create or edit a page.

app.js?version=v23.12.2:43 Refused to set the document's base URI to '' because it violates the following Content Security Policy directive: "base-uri 'self'".

init_instance_callback @ app.js?version=v23.12.2:43
(anonymous) @ tinymce.min.js?version=v23.12.2:4
pO @ tinymce.min.js?version=v23.12.2:4
(anonymous) @ tinymce.min.js?version=v23.12.2:4
Promise.then (async)
(anonymous) @ tinymce.min.js?version=v23.12.2:4
fold @ tinymce.min.js?version=v23.12.2:4
hO @ tinymce.min.js?version=v23.12.2:4
n @ tinymce.min.js?version=v23.12.2:4
(anonymous) @ tinymce.min.js?version=v23.12.2:4
(anonymous) @ tinymce.min.js?version=v23.12.2:4
load (async)
(anonymous) @ tinymce.min.js?version=v23.12.2:4
_o @ tinymce.min.js?version=v23.12.2:4
(anonymous) @ tinymce.min.js?version=v23.12.2:4
(anonymous) @ tinymce.min.js?version=v23.12.2:4
xO @ tinymce.min.js?version=v23.12.2:4
await in xO (async)
o @ tinymce.min.js?version=v23.12.2:4
Promise.then (async)
_O @ tinymce.min.js?version=v23.12.2:4
(anonymous) @ tinymce.min.js?version=v23.12.2:4
render @ tinymce.min.js?version=v23.12.2:4
(anonymous) @ tinymce.min.js?version=v23.12.2:4
(anonymous) @ tinymce.min.js?version=v23.12.2:4
Re @ tinymce.min.js?version=v23.12.2:4
s @ tinymce.min.js?version=v23.12.2:4
executeHandlers @ tinymce.min.js?version=v23.12.2:4
i @ tinymce.min.js?version=v23.12.2:4
s @ tinymce.min.js?version=v23.12.2:4

Steps to Reproduce

Open any new page to start editing.

Expected Behaviour

Not to see the error in the console.

Screenshots or Additional Context

No response

Browser Details

Brave Browser

Exact BookStack Version

v23.12.2

ssddanbrown added a commit that referenced this issue Jan 30, 2024
Updated to parse and add as DOM nodes instead of innerHTML to avoid
triggering an update of all head content, which would throw warnings in
chromium in regard to setting the base URI.

For #4814
@ssddanbrown ssddanbrown added this to the Next Feature Release milestone Jan 30, 2024
@ssddanbrown
Copy link
Member

Thanks for raising @J-Wick4.
I've addressed this in 24e6dc4, to be part of the next feature release.

@surya-santos
Copy link

surya-santos commented May 10, 2024

Hi there,

I'm also having the same issue but I'm on:

BookStack v23.10.4

Additionally, it won't save anything and the page won't publish, it gets stuck in a draft.

POST https://mysite.xyz/books/smybook/draft/188 500 (Internal Server Error)
app.js?version=v23.10.4:43 Refused to set the document's base URI to '' because it violates the following Content Security Policy directive: "base-uri 'self'".

init_instance_callback @ app.js?version=v23.10.4:43
(anonymous) @ tinymce.min.js?version=v23.10.4:4
dO @ tinymce.min.js?version=v23.10.4:4
(anonymous) @ tinymce.min.js?version=v23.10.4:4
Promise.then (async)
(anonymous) @ tinymce.min.js?version=v23.10.4:4
fold @ tinymce.min.js?version=v23.10.4:4
cO @ tinymce.min.js?version=v23.10.4:4
n @ tinymce.min.js?version=v23.10.4:4
(anonymous) @ tinymce.min.js?version=v23.10.4:4
(anonymous) @ tinymce.min.js?version=v23.10.4:4
load (async)
(anonymous) @ tinymce.min.js?version=v23.10.4:4
So @ tinymce.min.js?version=v23.10.4:4
(anonymous) @ tinymce.min.js?version=v23.10.4:4
(anonymous) @ tinymce.min.js?version=v23.10.4:4
hO @ tinymce.min.js?version=v23.10.4:4
await in hO (async)
o @ tinymce.min.js?version=v23.10.4:4
Promise.then (async)
CO @ tinymce.min.js?version=v23.10.4:4
(anonymous) @ tinymce.min.js?version=v23.10.4:4
render @ tinymce.min.js?version=v23.10.4:4
(anonymous) @ tinymce.min.js?version=v23.10.4:4
(anonymous) @ tinymce.min.js?version=v23.10.4:4
Re @ tinymce.min.js?version=v23.10.4:4
s @ tinymce.min.js?version=v23.10.4:4
executeHandlers @ tinymce.min.js?version=v23.10.4:4
i @ tinymce.min.js?version=v23.10.4:4
s @ tinymce.min.js?version=v23.10.4:4
9611.vendors.chunk.js:1 [DEFAULT]: WARN : Using DEFAULT root logger
value @ 9611.vendors.chunk.js:1
(anonymous) @ 9611.vendors.chunk.js:1
value @ 9611.vendors.chunk.js:1
value @ 9611.vendors.chunk.js:1
value @ 9611.vendors.chunk.js:1
value @ 9611.vendors.chunk.js:1
get @ 9611.vendors.chunk.js:1
value @ 9611.vendors.chunk.js:1
get _log @ 6215.vendors.chunk.js:1
26215 @ 6215.vendors.chunk.js:1
l @ Grammarly.js:2
64757 @ 7695.vendors.chunk.js:1
l @ Grammarly.js:2
93986 @ 6338.vendors.chunk.js:2
l @ Grammarly.js:2
91340 @ 6338.vendors.chunk.js:2
l @ Grammarly.js:2
76729 @ cheetah.common.chunk.js:1
l @ Grammarly.js:2
Promise.then (async)
init @ Grammarly.js:2
(anonymous) @ Grammarly.js:2
_initializeCheetahService @ Grammarly.js:2
(anonymous) @ Grammarly.js:2
t.__tryOrUnsub @ Grammarly.js:2
t.next @ Grammarly.js:2
t._next @ Grammarly.js:2
t.next @ Grammarly.js:2
t._next @ Grammarly.js:2
t.next @ Grammarly.js:2
t.notifyNext @ Grammarly.js:2
t._next @ Grammarly.js:2
t.next @ Grammarly.js:2
(anonymous) @ Grammarly.js:2
e._trySubscribe @ Grammarly.js:2
e.subscribe @ Grammarly.js:2
c @ Grammarly.js:2
t._innerSub @ Grammarly.js:2
t._next @ Grammarly.js:2
t.next @ Grammarly.js:2
t._next @ Grammarly.js:2
t.next @ Grammarly.js:2
t.notifyNext @ Grammarly.js:2
t._next @ Grammarly.js:2
t.next @ Grammarly.js:2
(anonymous) @ Grammarly.js:2
e._trySubscribe @ Grammarly.js:2
e.subscribe @ Grammarly.js:2
c @ Grammarly.js:2
t._innerSub @ Grammarly.js:2
t._next @ Grammarly.js:2
t.next @ Grammarly.js:2
t.next @ Grammarly.js:2
t.next @ Grammarly.js:2
set @ Grammarly.js:2
(anonymous) @ Grammarly.js:2
t.__tryOrUnsub @ Grammarly.js:2
t.next @ Grammarly.js:2
t._next @ Grammarly.js:2
t.next @ Grammarly.js:2
t._next @ Grammarly.js:2
t.next @ Grammarly.js:2
t.next @ Grammarly.js:2
(anonymous) @ Grammarly.js:2
t.__tryOrUnsub @ Grammarly.js:2
t.next @ Grammarly.js:2
t._next @ Grammarly.js:2
t.next @ Grammarly.js:2
t.notifyNext @ Grammarly.js:2
t._next @ Grammarly.js:2
t.next @ Grammarly.js:2
_processObservableMessage @ Grammarly.js:2
(anonymous) @ Grammarly.js:2
t.__tryOrUnsub @ Grammarly.js:2
t.next @ Grammarly.js:2
t._next @ Grammarly.js:2
t.next @ Grammarly.js:2
t._next @ Grammarly.js:2
t.next @ Grammarly.js:2
t @ Grammarly.js:2
(anonymous) @ Grammarly.js:2
(anonymous) @ Grammarly.js:2
fire @ Grammarly.js:2
_onBgPortMessage @ Grammarly.js:2
Show 83 more frames
Show less
188:1 Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received

Is there a way I can fix it?

Thank you

@ssddanbrown
Copy link
Member

@surya-santos open a new support thread, with detail from your error log as per our debug instructions:
https://www.bookstackapp.com/docs/admin/debugging/#error-log-file

It's also ideal to be using the latest version, to not get confused with old issues that have since been fixed.

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

No branches or pull requests

3 participants