nextcloud / ocs_api_viewer

3 stars 1 forks source link

Blank Screen on Load - Side Bar is Visible #17

Closed rapterjet2004 closed 9 months ago

rapterjet2004 commented 9 months ago

Screenshot

image

DevTools returns a couple errors

Upon loading the OCS API Viewer

Uncaught Error: Could not find initial state limit-default of unified-search
    at r (toast-d1cd63b1.mjs:26:84447)
    at 93410 (Filter.vue:1:71)
    at o (SearchFilterChip.vue:6:954)
    at SearchResult.vue:6:1723
    at o.O (SearchFilterChip.vue:6:954)
    at SearchResult.vue:6:1723
    at SearchResult.vue:6:1723

Upon navigating to spreed

Refused to load the script 'http://localhost:8080/apps-writable/ocs_api_viewer/js/stoplight-elements.js' because it violates the following Content Security Policy directive: "script-src-elem 'strict-dynamic' 'nonce-czZ0YWRjQjRyRTd0ZmZad2EreUI2ODI3cXhON3JVcEtqNytUZmRZVFp0az06eDU0S0lLZEI5ajZaUktCSlBMLzNnYnZDbkh3NitCd0IxZFBpQ3I1S0lJcz0=' blob: 'unsafe-eval' 'unsafe-inline' ". Note that 'strict-dynamic' is present, so host-based allowlisting is disabled. Note that '' matches only URLs with network schemes ('http', 'https', 'ws', 'wss'), or URLs whose scheme matches self's scheme. The scheme 'http:' must be added explicitly.

Refused to load the script 'http://localhost:8080/apps-writable/ocs_api_viewer/js/ocs_api_viewer-iframe-theme.js' because it violates the following Content Security Policy directive: "script-src-elem 'strict-dynamic' 'nonce-czZ0YWRjQjRyRTd0ZmZad2EreUI2ODI3cXhON3JVcEtqNytUZmRZVFp0az06eDU0S0lLZEI5ajZaUktCSlBMLzNnYnZDbkh3NitCd0IxZFBpQ3I1S0lJcz0=' blob: 'unsafe-eval' 'unsafe-inline' ". Note that 'strict-dynamic' is present, so host-based allowlisting is disabled. Note that '' matches only URLs with network schemes ('http', 'https', 'ws', 'wss'), or URLs whose scheme matches self's scheme. The scheme 'http:' must be added explicitly.

Versions

provokateurin commented 9 months ago

The first error is not related to this app. The CSP problems were fixed in https://github.com/nextcloud/ocs_api_viewer/pull/15, but I haven't done a release yet. Just use the latest git version to get it working on server 28+

rapterjet2004 commented 9 months ago

Got it, just cloned the main branch git clone https://github.com/nextcloud/ocs_api_viewer.git -b main

unfortunately now the entire screen is empty. Is this expected? Checked and oc_security_csp_contentsecuritypolicynoncemanager.php was there

image
provokateurin commented 9 months ago

Did you run npm ci && npm run build?

nickvergessen commented 9 months ago

And composer i --no-dev