kinto-admin icon indicating copy to clipboard operation
kinto-admin copied to clipboard

Does not load

Open shyim opened this issue 4 years ago • 5 comments

24Refused to load the font '<URL>' because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'font-src' was not explicitly set, so 'default-src' is used as a fallback.

react-dom.production.min.js:209 Error: Invariant failed
    at t.a (tiny-invariant.esm.js:9)
    at Switch.js:17
    at vu (react-dom.production.min.js:268)
    at ls (react-dom.production.min.js:246)
    at us (react-dom.production.min.js:246)
    at Zu (react-dom.production.min.js:239)
    at Qu (react-dom.production.min.js:230)
    at Is (react-dom.production.min.js:281)
    at react-dom.production.min.js:284
    at ts (react-dom.production.min.js:240)
eu @ 2.f0763f1a.chunk.js:2
r.callback @ 2.f0763f1a.chunk.js:2
di @ 2.f0763f1a.chunk.js:2
iu @ 2.f0763f1a.chunk.js:2
ps @ 2.f0763f1a.chunk.js:2
t.unstable_runWithPriority @ 2.f0763f1a.chunk.js:2
Wo @ 2.f0763f1a.chunk.js:2
ds @ 2.f0763f1a.chunk.js:2
Zu @ 2.f0763f1a.chunk.js:2
Qu @ 2.f0763f1a.chunk.js:2
Is @ 2.f0763f1a.chunk.js:2
(anonymous) @ 2.f0763f1a.chunk.js:2
ts @ 2.f0763f1a.chunk.js:2
zs @ 2.f0763f1a.chunk.js:2
t.render @ 2.f0763f1a.chunk.js:2
282 @ main.0e2382ef.chunk.js:1
a @ (index):1
281 @ main.0e2382ef.chunk.js:1
a @ (index):1
t @ (index):1
r @ (index):1
(anonymous) @ main.0e2382ef.chunk.js:1
tiny-invariant.esm.js:9 Uncaught Error: Invariant failed
    at t.a (tiny-invariant.esm.js:9)
    at Switch.js:17
    at vu (react-dom.production.min.js:268)
    at ls (react-dom.production.min.js:246)
    at us (react-dom.production.min.js:246)
    at Zu (react-dom.production.min.js:239)
    at Qu (react-dom.production.min.js:230)
    at Is (react-dom.production.min.js:281)
    at react-dom.production.min.js:284
    at ts (react-dom.production.min.js:240)

Tried using Heroku and Docker

shyim avatar Jun 29 '20 18:06 shyim

Thanks for reporting this! Does it prevent the whole UI to show up?

It might come from the Kinto plugin here: https://github.com/Kinto/kinto/blob/c8d680ce7cc6a87f503915b3b2b920963229f24c/kinto/plugins/admin/views.py#L18-L28

Related https://github.com/Kinto/kinto/issues/2341

leplatrem avatar Jul 02 '20 09:07 leplatrem

Yes https://shyimtest.herokuapp.com/v1/admin/#/

shyim avatar Jul 02 '20 09:07 shyim

Same issue here. I believe the message for the failure is this, but the callstack is pretty messed up when minified:

You should not use <Switch> outside a <Router>

...can't see an obvious way to work around this.

coldino avatar Jul 15 '20 15:07 coldino

@leplatrem Based on my testing, it looks like kinto v13.6.6 shipped with a broken compiled version of kinto-admin. I'm unable to replicate the issue using freshly-built versions. I can dig into it a little more if you'd like, but I think the best next step would be to release a v13.6.7 which is just the v13.6.6 release with a new, freshly-built version of the admin plugin. As far as I can tell, this isn't an issue with the kinto-admin plugin itself.

dstaley avatar Aug 12 '20 20:08 dstaley

Thanks Dylan for the follow-ups...

I deployed v14.0 of Kinto that embeds kinto-admin 1.26.2 and it seems to work OK https://kinto.dev.mozaws.net/v1/admin/#/

leplatrem avatar Aug 20 '20 14:08 leplatrem