Update to DSpace 8 from Dspace 7.6.2 angular frontend problems

81 views
Skip to first unread message

Matthias Letsch

unread,
Jan 21, 2025, 10:38:05 AM1/21/25
to DSpace Technical Support
Hi there,

I am trying to update our DSpace 7.6.2 instance to Dpace 8.0

The backend update didn't cause any problems. It runs and our test url with /server shows the HAL browser with Status 200 and all the endpoints working.

But the angular frontend turns out to be a major challenge:
A merge with our existing dspace 7.6.2 and our theme generated over 400 merge conflicts, so I downloaded dspace 8 angular as a new separate project instead to start there from scratch (and carefully transfer our theme afterwards). 

I can install, build and start the dspace 8.0 angular project with yarn start:dev and I copied the rest configuration from 7.6.2 into my new config(.dev).yml (host: our-test-url.de)

If I open localhost:4001, the ui is shown but with "500 Service unavailable"
If I open our test url (in which the backend can be found under /server and in which e.g. 7.6.2 worked fine), it shows "503 service unavailable"

The console says something like:
"Cross-origin request blocked: The same-origin rule prohibits reading the external resource at .../server/api (Reason: CORS header 'Access-Control-Allow-Origin' is missing). Status code: 403."
"Cross-origin request blocked: The same-origin rule forbids reading the external resource at  .../server/api (Reason: CORS request failed). Status code: (null)."

Unfortunately, I don't know what to set up here so that the frontend
1. can be accessed at our test URL (and not only via localhost:4001) and
2. can access the backend via the REST interface. 

Can someone help me here, please?

Many thanks in advance and best regards,
Matthias Letsch




Andrew Thompson

unread,
Jan 21, 2025, 7:29:12 PM1/21/25
to DSpace Technical Support
Checkout "403 Forbidden" error with a message that says "Access is denied. Invalid CSRF Token" section from the Installing DSpace docs. You can also set the environment variable rest__P__cors__P__allowed__D__origins before running DSpace backend to a comma separated list of something like: http://localhost:4001,https://localhost:4001 which tells the backend to tell the browser to allow cross origin requests.

-Andrew
Reply all
Reply to author
Forward
0 new messages