Hi Eric,

As noted in the DSpace Documentation, both COAR Notify and Quality 
Assurance are disabled by default.  You have to manually enable both via a 
configuration setting.  See the configuration docs for each at:

https://wiki.lyrasis.org/display/DSDOC8x/COAR+Notify
https://wiki.lyrasis.org/display/DSDOC8x/Quality+Assurance

Based on the snippet of the error you've shared, it almost sounds like you 
have a custom PDF viewer or something in place? The error says:

Message: Invalid PDF structure. viewer.mjs:12365:13

I'm not sure what "viewer.mjs" is?  I don't believe that is included in 
DSpace by default.

So, this all seems odd to me, as I'm not sure what is attempting to open 
your PDF files.  By default, DSpace will just stream the PDF to your 
browser (which should trigger a download unless your browser can open up 
PDF files).

As a sidenote, I also can verify we don't see this same behavior on our 
demo site (running 8.1) at https://demo.dspace.org

Tim
On Monday, February 17, 2025 at 10:19:15 PM UTC-6 Eric Montague wrote:

> I am running DSpace 8.1 on Windows.
>
> How can I completely disable COAR Notify - LDN Services 
> <https://wiki.lyrasis.org/display/DSDOC8x/COAR+Notify+-+LDN+Services> and 
> Quality 
> Assurance <https://wiki.lyrasis.org/display/DSDOC8x/OpenAIRE+Integration> 
> functions?
> I think they are causing PDF downloads to fail for Anonymous users.
>
> Starting with 8.0, *as an Anonymous user*, I've been getting 
> *@ Authentication is required (status:401 exception: Access Denied* 
> errors for the following methods, on the *Item page*, 
>
> 2025-02-17 12:39:27,804 INFO  8ec30f7c-5b3b-4d32-b22e-82d47975844d 
> 625ab1d4-063e-49a7-95a5-7f946f25fa5b 
> org.dspace.app.rest.utils.DSpaceAPIRequestLoggingFilter 
> @ Before request *[GET 
> /server/api/config/correctiontypes/search/findByItem]* originated from /
>
> 2025-02-17 12:39:28,235 INFO  8ec30f7c-5b3b-4d32-b22e-82d47975844d 
> b5a8759c-690b-4081-beeb-921503e6cd42 
> org.dspace.app.rest.utils.DSpaceAPIRequestLoggingFilter 
> @ Before request* [GET 
> /server/api/integration/qualityassurancesources/search/byTarget]* 
> originated from /items/37528244-ddaf-474a-b820-ddd5727d251c
>
> 2025-02-17 12:39:28,240 INFO  8ec30f7c-5b3b-4d32-b22e-82d47975844d 
> 5724b8d9-0424-4bda-9a1f-110a2c516dbb 
> org.dspace.app.rest.utils.DSpaceAPIRequestLoggingFilter 
> @ Before request *[GET 
> /server/api/ldn/notifyrequests/37528244-ddaf-474a-b820-ddd5727d251c]* 
> originated from /items/37528244-ddaf-474a-b820-ddd5727d251c
>
> which causes the PDF download to fail with the following error in the 
> browser console.
> 13:00:46.955 Navigated to 
> http://localhost:8080/server/api/core/bitstreams/eb6d0ba4-baa9-45f4-8ca8-4ca8c052fe9f/content
> 13:00:47.027 [webpack-dev-server] Disconnected! polyfills.js:1061:28
> 13:00:47.028 [webpack-dev-server] Trying to reconnect... polyfills.js:
> 1061:28
> 13:00:47.221 Partitioned cookie or storage access was provided to “
> http://localhost:8080/server/api/core/bitstreams/eb6d0ba4-baa9-45f4-8ca8-4ca8c052fe9f/content”
>  
>
> because it is loaded in the third-party context and dynamic state 
> partitioning is enabled.
> 13:00:47.428 Warning: Indexing all PDF objects pdf.worker.mjs:345:13
> 13:00:47.453 Invalid or corrupted PDF file.
> PDF.js v4.10.22 (build: 4547f230b)
> Message: Invalid PDF structure. viewer.mjs:12365:13
> 13:00:49.992 Uncaught (in promise) 
> Object { message: "Invalid PDF structure.", name: "InvalidPDFException", 
> stack: 
> "BaseExceptionClosure@resource://pdf.js/build/pdf.mjs:451:29\n@resource://pdf.js/build/pdf.mjs:454:2\n"
>  
> }
>
> *When logged in as an Administrative user, no errors occur, and the PDF is 
> downloaded successfully.*
>
> My guess is that somehow COAR Notify - LDN Services 
> <https://wiki.lyrasis.org/display/DSDOC8x/COAR+Notify+-+LDN+Services> and 
> Quality 
> Assurance <https://wiki.lyrasis.org/display/DSDOC8x/OpenAIRE+Integration> 
> features have been enabled by default,
> and that is causing these errors. I also note that 2 new Solr cores are 
> included in DSpace 8.x, *qaevent* and *suggestions*.
>
> I'm pretty sure I don't need any of this LDN / Quality Assurance stuff. 
> And I'm hoping if I disable them, Anonymous users
> will once again be able to download PDFs.
>
> Thanks.
>
> Eric Montague, Developer
>
>
>
>

-- 
All messages to this mailing list should adhere to the Code of Conduct: 
https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
--- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/dspace-tech/2cb305ed-dadb-4845-94c6-9282cabaeb76n%40googlegroups.com.

Reply via email to