Daniel-KM / Omeka-S-module-UniversalViewer

Module for Omeka S that adds the IIIF specifications in order to act like an IIPImage server, and the UniversalViewer, a unified online player for any file. It can display books, images, maps, audio, movies, pdf, 3D views, and anything else as long as the appropriate extensions are installed.
Other
7 stars 5 forks source link

error-controller-cannot-dispatch #3

Closed pprw closed 6 years ago

pprw commented 6 years ago

With the last (git) version of UV, I have the following error when trying to display a pdf. The error is showed when I add "/play" after item number.


Non trouvé

Page not found.

Raison : error-controller-cannot-dispatch
Daniel-KM commented 6 years ago

The action play is used when there are no site, so the url is https://example.com/item/1/play.

pprw commented 6 years ago

I indeed tried such url.

I have an empty player (not working) in the item show page. So I tried to force UV to play the file by adding /play after the item number. I don't work but at least I have the error .

Daniel-KM commented 6 years ago

What are the messages in the browser console (ctrl + shift + J)?

pprw commented 6 years ago

Here is the output of ctrl + shift + J for the page http://..../item/5907/play

L’utilisation de « getPreventDefault() » est obsolète. Utiliser « defaultPrevented » à la place.  l109.js:26:45625
Contract ID '@mozilla.org/toolkit/addonsInfo-clh;1' was registered as a command line handler for entry 'a-addons-info', but could not be created.
Content Security Policy: « x-frame-options » ignoré en raison de la directive « frame-ancestors ».  (source inconnue)
Content Security Policy: Les paramètres de la page ont empêché le chargement d’une ressource à self (« script-src https://assets-cdn.github.com »). Source: (function() {
    var _addEventListener;....  3:1
XrayWrapper denied access to property "init" (reason: value is callable). See https://developer.mozilla.org/en-US/docs/Xray_vision for more information. Note that only the first denied property access from a given global object will be reported.  ExtensionUtils.jsm:505:50
Error: WebExtension context not found! ExtensionParent.jsm:821:13
Error: WebExtension context not found! ExtensionParent.jsm:821:13
Error: WebExtension context not found! ExtensionParent.jsm:821:13
Error: WebExtension context not found! ExtensionParent.jsm:821:13
Error: WebExtension context not found! ExtensionParent.jsm:821:13
Échec du chargement pour l’élément <script> dont la source est « http://sitexxx/modules/UniversalViewer/asset/vendor/uv/lib/embed.js ».  5907:126
GET 
http://sitexxx/s/hppapers/item/5907/play 
[HTTP/1.1 404 Not Found 783 ms]
Error: WebExtension context not found! ExtensionParent.jsm:821:13
GET 
http://sitexxx/application/asset/css/user-bar.css 
[HTTP/1.1 200 OK 0 ms]
GET 
http://sitexxx/application/asset/css/iconfonts.css 
[HTTP/1.1 200 OK 0 ms]
GET 
http://sitexxx/themes/default/asset/css/style.css 
[HTTP/1.1 200 OK 0 ms]
GET 
http://sitexxx/application/asset/js/global.js 
[HTTP/1.1 200 OK 0 ms]
GET 
http://sitexxx/themes/default/asset/js/default.js 
[HTTP/1.1 200 OK 0 ms]
GET 
http://fonts.googleapis.com/css 
[HTTP/1.1 200 OK 0 ms]
GET 
http://fonts.googleapis.com/css 
[HTTP/1.1 200 OK 0 ms]
GET 
http://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js 
[HTTP/1.1 200 OK 0 ms]
Error: WebExtension context not found! ExtensionParent.jsm:821:13

the same but for the page without /play at the end:

Error: WebExtension context not found! ExtensionParent.jsm:821:13
Error: WebExtension context not found! ExtensionParent.jsm:821:13
Error: WebExtension context not found! ExtensionParent.jsm:821:13
Error: WebExtension context not found! ExtensionParent.jsm:821:13
Error: WebExtension context not found! ExtensionParent.jsm:821:13
Échec du chargement pour l’élément <script> dont la source est « http://sitexxx/modules/UniversalViewer/asset/vendor/uv/lib/embed.js ».  5907:126
Error: WebExtension context not found! ExtensionParent.jsm:821:13
Error: WebExtension context not found! ExtensionParent.jsm:821:13
Échec du chargement pour l’élément <script> dont la source est « http://sitexxx/modules/UniversalViewer/asset/vendor/uv/lib/embed.js ».  5907:126
Error: WebExtension context not found! ExtensionParent.jsm:821:13
TypeError: Argument 1 of PrecompiledScript.executeInGlobal is not an object.[En savoir plus]  ExtensionContent.jsm:357:18
Error: WebExtension context not found! ExtensionParent.jsm:821:13
Échec du chargement pour l’élément <script> dont la source est « http://sitexxx/modules/UniversalViewer/asset/vendor/uv/lib/embed.js ».
Daniel-KM commented 6 years ago

Some other tests : Could you try with the default universal viewer (no options, just "append to item show")? Could you try http://sitexxx/item/5907/play too? Could you try with a browser without adblocker ?

Daniel-KM commented 6 years ago

And for the output, only the one from the console (ctrl + shift + I).

pprw commented 6 years ago
  1. I deactivates my adblocker (ublock) and tried with another browser (firefox -> chromium)
  2. I configures UV to only "Append automatically to item page", nothing else is ticked.

UV is still not working. I have a black square instead of the file displayed.

Console (with ctrl + shift + I) in the item page says:

Échec du chargement pour l’élément <script> dont la source est « http://mysite/modules/UniversalViewer/asset/vendor/uv/lib/embed.js ».

In the item page with /play added at the end, I just have "Non trouvé Page not found. Raison : error-controller-cannot-dispatch" with nothing in the console.

Daniel-KM commented 6 years ago

With the git version, you have to run this:

npm install
gulp

This change is related to the new site omeka.org. I updated the readme to explain it and uploaded v3.5.7.

pprw commented 6 years ago

Thanks Daniel, I tried the 3.5.7 zip and I can confirm the fix works in http://sitexxx/item/5907/ url.

However http://sitexxx/item/5907/play generates the same error than previously.

Daniel-KM commented 6 years ago

In fact, there may be a confusion between urls for the manifests (provided by the iiif server if installed) and the url of the player. So this module provides only one url: http://example.org/item/5907/play, but generally, this url is not used, since the viewer is directly embedded in a page http://example.org/s/sitexxx/item/5907/show.