Help with DS7 local install - HAL browser assets missing

896 views
Skip to first unread message

Tyson

unread,
May 20, 2021, 10:50:44 AM5/20/21
to DSpace Community
Hello, 

My institution is looking to migrate to DSpace and I am hoping to be an early adopter of DS7 when it's released. 

I have installed a test on my Macbook Air (M1) and all goes well with the Angular interface. The REST interface builds and deploys fine, but it seems to be incomplete as none of the assets seem to be present.

The Angular log says:

No _links section found at http://localhost:8080/server/api

And indeed, when I visit that I get a 404. When I visit the root page, the console shows:


 to load resource: the server responded with a status of 404 ()

bootstrap-responsive.css:1 Failed to load resource: the server responded with a status of 404 ()

styles.css:1 Failed to load resource: the server responded with a status of 404 ()

underscore.js:1 Failed to load resource: the server responded with a status of 404 ()

backbone.js:1 Failed to load resource: the server responded with a status of 404 ()

...etc.

I followed the instruction at https://wiki.lyrasis.org/display/DSDOC7x and everything seemed to go well! Is there something I'm missing?

PS I also tried the Docker images but had problems with them... perhaps because I'm on an M1 chip...


Thank you for any help!


SOURCE:

DSpace/DSpace (tried with main and tags/dspace-7.0-beta5)

ENVIRONMENT:

MacBook Air (M1, 2020)
MacOS: Big Sur 11.2.3 (20D91)
Maven: Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
ANT: Apache Ant(TM) version 1.10.10 compiled on April 12 2021
Java: OpenJDK 64-Bit Server VM (build 11.0.10+9, mixed mode)

Tim Donohue

unread,
May 20, 2021, 12:25:02 PM5/20/21
to Tyson, DSpace Community
Hi Tyson,

You haven't told us much about your installation/setup for the UI or REST API, but you may want to first review the common issues:

https://wiki.lyrasis.org/display/DSDOC7x/Installing+DSpace#InstallingDSpace-CommonInstallationIssues

Pay very close​ attention to your URL-based configurations on both the UI and REST API side.  It's very important to get the URLs correct in both those configs. If they are not correct, either the UI won't be able to communicate with the REST API, or the REST API won't "trust" the UI (and will actively block it).  The configs I'm mentioning are the "ui" and "rest" sections in your UI's "environment.prod.ts", as well as the "dspace.ui.url" and "dspace.server.url" in your REST API's "local.cfg".

Finally, if you are running behind an http proxy, be aware of this new fix (currently in review/testing): https://github.com/DSpace/DSpace/pull/3273   Simply put, if you have an HTTP Proxy in front of the REST API, we've found that you need to set "server.forward-headers-strategy=FRAMEWORK" in your "local.cfg", or else the REST API will ignore very important X-Forwarded-* headers from your http proxy (which can result in very odd behavior).  We're likely going to make that setting the default value prior to 7.0 final (which is what that PR is doing), as several folks have hit this problem.

Good luck! If somehow none of these suggestions work for you, then you'll need to provide us more details about your setup, and perhaps more detailed errors (from your browser or REST API logs).  See https://wiki.lyrasis.org/display/DSPACE/Troubleshoot+an+error#Troubleshootanerror-DSpace7.x(orabove)

Tim


From: dspace-c...@googlegroups.com <dspace-c...@googlegroups.com> on behalf of Tyson <tlloydt...@divinity.edu.au>
Sent: Thursday, May 20, 2021 2:58 AM
To: DSpace Community <dspace-c...@googlegroups.com>
Subject: [dspace-community] Help with DS7 local install - HAL browser assets missing
 
--
All messages to this mailing list should adhere to the Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-communi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-community/3f788655-f4bb-4405-821e-11c2838ebfabn%40googlegroups.com.

Tyson

unread,
May 20, 2021, 8:28:26 PM5/20/21
to DSpace Community
Thanks very much Tim!

DSPACE VERSION
===============

DSpace version:  7.0-beta6-SNAPSHOT

  SCM revision:  3c1b90d60395f89041ae20f01229907f25e74f37

    SCM branch:  main

            OS:  Mac OS X(aarch64) version 11.2.3

  Applications:

     Discovery:  enabled.

           JRE:  Oracle Corporation version 11.0.10

   Ant version:  Apache Ant(TM) version 1.10.10 compiled on April 12 2021

 Maven version:  3.8.1

   DSpace home:  /Users/tlloydthwaites/dspace7-deploy

* Built according to docs with mvn package, then ant fresh_build in installer dir - all works fine
* Added an admin user successfully


ANGULAR .env

============

DSPACE_HOST=localhost

DSPACE_PORT=4000

DSPACE_NAMESPACE=/

DSPACE_SSL=false


DSPACE_REST_HOST=localhost

DSPACE_REST_PORT=8080

DSPACE_REST_NAMESPACE=/server

DSPACE_REST_SSL=false



ANGULAR environment.ts
=====================
export const environment = {"production":true,"ui":{"ssl":false,"host":"localhost","port":4000,"nameSpace":"/","rateLimiter":{"windowMs":60000,"max":500},"baseUrl":"http://localhost:4000/"},"rest":{"ssl":false,"host":"localhost","port":8080,"nameSpace":"/server","baseUrl":"http://localhost:8080/server"},"cache":{"msToLive":{"default":900000},"control":"max-age=60","autoSync":{"defaultTime":0,"maxBufferSize":100,"timePerMethod":{"PATCH":3}}},"form":{"validatorMap":{"required":"required","regex":"pattern"}},"notifications":{"rtl":false,"position":["top","right"],"maxStack":8,"timeOut":5000,"clickToClose":true,"animate":"scale"},"submission":{"autosave":{"metadata":[],"timer":0},"icons":{"metadata":[{"name":"dc.author","style":"fas fa-user"},{"name":"default","style":""}],"authority":{"confidence":[{"value":600,"style":"text-success"},{"value":500,"style":"text-info"},{"value":400,"style":"text-warning"},{"value":"default","style":"text-muted"}]}}},"universal":{"preboot":true,"async":true,"time":false},"logDirectory":".","debug":false,"defaultLanguage":"en","languages":[{"code":"en","label":"English","active":true},{"code":"de","label":"Deutsch","active":true},{"code":"cs","label":"Čeština","active":true},{"code":"nl","label":"Nederlands","active":true},{"code":"pt-BR","label":"Português do Brasil","active":true},{"code":"pt-PT","label":"Português","active":true},{"code":"fr","label":"Français","active":true},{"code":"lv","label":"Latviešu","active":true},{"code":"fi","label":"Suomi","active":true},{"code":"hu","label":"magyar","active":true}],"browseBy":{"oneYearLimit":10,"fiveYearLimit":30,"defaultLowerLimit":1900,"types":[{"id":"title","type":"title"},{"id":"dateissued","type":"date","metadataField":"dc.date.issued"},{"id":"author","type":"metadata"},{"id":"subject","type":"metadata"}]},"item":{"edit":{"undoTimeout":10000}},"collection":{"edit":{"undoTimeout":10000}},"themes":[{"name":"dspace"}],"rewriteDownloadUrls":false,"mediaViewer":{"image":false,"video":false}}

When I visit the test server at api7.dspace.org I see:

Screen Shot 2021-05-21 at 10.19.54 am.png

But on my local install I see:

Screen Shot 2021-05-21 at 10.20.29 am.png

with this in the JS console:

Failed to load resource: the server responded with a status of 404 ()
bootstrap-responsive.css:1 Failed to load resource: the server responded with a status of 404 ()
styles.css:1 Failed to load resource: the server responded with a status of 404 ()
underscore.js:1 Failed to load resource: the server responded with a status of 404 ()
backbone.js:1 Failed to load resource: the server responded with a status of 404 ()
uritemplates.js:1 Failed to load resource: the server responded with a status of 404 ()
URI.min.js:1 Failed to load resource: the server responded with a status of 404 ()
bootstrap.js:1 Failed to load resource: the server responded with a status of 404 ()
hal.js:1 Failed to load resource: the server responded with a status of 404 ()
browser.js:1 Failed to load resource: the server responded with a status of 404 ()
resource.js:1 Failed to load resource: the server responded with a status of 404 ()
browser.js:1 Failed to load resource: the server responded with a status of 404 ()
explorer.js:1 Failed to load resource: the server responded with a status of 404 ()
inspector.js:1 Failed to load resource: the server responded with a status of 404 ()
navigation.js:1 Failed to load resource: the server responded with a status of 404 ()
location_bar.js:1 Failed to load resource: the server responded with a status of 404 ()
request_headers.js:1 Failed to load resource: the server responded with a status of 404 ()
resource.js:1 Failed to load resource: the server responded with a status of 404 ()
properties.js:1 Failed to load resource: the server responded with a status of 404 ()
links.js:1 Failed to load resource: the server responded with a status of 404 ()
embedded_resources.js:1 Failed to load resource: the server responded with a status of 404 ()
embedded_resource.js:1 Failed to load resource: the server responded with a status of 404 ()
non_safe_request_dialog.js:1 Failed to load resource: the server responded with a status of 404 ()
query_uri_dialog.js:1 Failed to load resource: the server responded with a status of 404 ()
response.js:1 Failed to load resource: the server responded with a status of 404 ()
response_headers.js:1 Failed to load resource: the server responded with a status of 404 ()
response_body.js:1 Failed to load resource: the server responded with a status of 404 ()
documentation.js:1 Failed to load resource: the server responded with a status of 404 ()
jsoneditor.js:1 Failed to load resource: the server responded with a status of 404 ()
CustomPostForm.js:1 Failed to load resource: the server responded with a status of 404 ()
underscore.js:1 Failed to load resource: the server responded with a status of 404 ()
backbone.js:1 Failed to load resource: the server responded with a status of 404 ()
uritemplates.js:1 Failed to load resource: the server responded with a status of 404 ()
URI.min.js:1 Failed to load resource: the server responded with a status of 404 ()
bootstrap.js:1 Failed to load resource: the server responded with a status of 404 ()
hal.js:1 Failed to load resource: the server responded with a status of 404 ()
browser.js:1 Failed to load resource: the server responded with a status of 404 ()
client.js:10 Uncaught ReferenceError: HAL is not defined
    at client.js:10
resource.js:1 Failed to load resource: the server responded with a status of 404 ()
browser.js:1 Failed to load resource: the server responded with a status of 404 ()
explorer.js:1 Failed to load resource: the server responded with a status of 404 ()
inspector.js:1 Failed to load resource: the server responded with a status of 404 ()
navigation.js:1 Failed to load resource: the server responded with a status of 404 ()
location_bar.js:1 Failed to load resource: the server responded with a status of 404 ()
request_headers.js:1 Failed to load resource: the server responded with a status of 404 ()
resource.js:1 Failed to load resource: the server responded with a status of 404 ()
properties.js:1 Failed to load resource: the server responded with a status of 404 ()
links.js:1 Failed to load resource: the server responded with a status of 404 ()
embedded_resources.js:1 Failed to load resource: the server responded with a status of 404 ()
embedded_resource.js:1 Failed to load resource: the server responded with a status of 404 ()
non_safe_request_dialog.js:1 Failed to load resource: the server responded with a status of 404 ()
query_uri_dialog.js:1 Failed to load resource: the server responded with a status of 404 ()
response.js:1 Failed to load resource: the server responded with a status of 404 ()
response_headers.js:1 Failed to load resource: the server responded with a status of 404 ()
response_body.js:1 Failed to load resource: the server responded with a status of 404 ()
documentation.js:1 Failed to load resource: the server responded with a status of 404 ()
jsoneditor.js:1 Failed to load resource: the server responded with a status of 404 ()
CustomPostForm.js:1 Failed to load resource: the server responded with a status of 404 ()
(index):295 Uncaught ReferenceError: HAL is not defined
    at (index):295
bootstrap.css:1 Failed to load resource: the server responded with a status of 404 ()
bootstrap-responsive.css:1 Failed to load resource: the server responded with a status of 404 ()
styles.css:1 Failed to load resource: the server responded with a status of 404 ()

I also realised I am on beta 6 snapshot, but I got similar results with beta 5. I am going to try beta 5 again and turn on debug logging next.

Thank you again! So close!

Tyson

unread,
May 20, 2021, 8:29:20 PM5/20/21
to DSpace Community
I also failed to mention, this is all on my local Macbook, so no proxies. 

Tyson

unread,
May 20, 2021, 8:50:40 PM5/20/21
to DSpace Community
Stop press! I switch to beta 5 again, did mvn clean, and eureka! All is well. Thanks again!

Darryl Friesen

unread,
Jan 12, 2022, 3:04:18 PM1/12/22
to DSpace Community
Tyson, did you ever discover what the root cause of this issue was?  I'm experiencing the exact same problem with DSpace 7.1.1.  A request to "/server" works, but none of the Javascript or CSS files load; everything returns a 404.  I've used "find" to search the disk and none of those assets exist anywhere. It seems like something is missing from the install/build, like mvn didn't download something it was supposed to.

Requests to /server/api also return a 404 so the entire server webapp seems to have issues.

- Darryl


Miguel Ángel Sosa Jiménez

unread,
Feb 15, 2024, 6:39:34 PM2/15/24
to DSpace Community
Something new?

In the middle of 2024 and with the launch of DS8, I still have that problem. I'm still trying to install DS7 but I'm stuck in the same situation.

Error_DS7.png
Reply all
Reply to author
Forward
0 new messages