ERROR: INVALID DSPACE REST API! Response is not valid JSON!

312 views
Skip to first unread message

Lewatle Johannes Phaladi

unread,
Apr 1, 2022, 4:23:31 AM4/1/22
to DSpace Technical Support
Dear Dspace Team,

logging into dspace frontend continues endlessly, I have checked logfile and attached copies of most files and screenshots that might be helpful for you to assist on this problem. 
Please see attached items, as follows :
1. dspace.log 
2. yarn config:check:rest screenshot : API test results X 2
3.  environment.prod.ts 
4. Frontend login error screenshot 

Regards,
Lewatle 
API test results.png
API test results0.png
environment prod ts.png
login hangs and fails.png
dspace.log

Lewatle Johannes Phaladi

unread,
Apr 1, 2022, 7:06:13 AM4/1/22
to DSpace Technical Support
Good Day, 

In addition please see attached API screenshot.

Regards,
Lewatle 

API web pages.png

Tim Donohue

unread,
Apr 1, 2022, 12:15:40 PM4/1/22
to Lewatle Johannes Phaladi, DSpace Technical Support
Hi Lewatle,

From the response to "yarn config:check:rest", it appears your REST API is responding oddly...it seems to be breaking up the response into "chunks".

The response from "yarn config:check:rest" should be a single​ response, whereas your site seems to somehow be returning JSON split apart into 3-4 chunks (as you can see it keeps showing "Response returned" several times, instead of just once) .... this seems to have the side effect of the JSON being seen as invalid, as it doesn't come back in one piece.  If it's not obvious, the DSpace User Interface expects the JSON to be returned in one piece.

I must admit, at this point, I'm not sure what could be causing this.  Maybe something in your Tomcat setup? Maybe there's some sort of proxy or firewall between your UI and REST API that is causing the request to get mangled?

I've never seen this sort of behavior from a DSpace 7 REST API before, so I'm a little confused.  I don't know how this can be occurring.

Another option here might be to try an installation of 7.2 (which is the latest) to see if that solves the problem you are seeing.  It sounds like you are currently trying to install 7.1.  Maybe starting fresh with 7.2 will help out here, as there seems to be something odd going on with your current setup.

Tim


From: dspac...@googlegroups.com <dspac...@googlegroups.com> on behalf of Lewatle Johannes Phaladi <joem...@gmail.com>
Sent: Friday, April 1, 2022 3:23 AM
To: DSpace Technical Support <dspac...@googlegroups.com>
Subject: [dspace-tech] ERROR: INVALID DSPACE REST API! Response is not valid JSON!
 
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/87124324-6569-4b87-a132-dd10c85b1000n%40googlegroups.com.

Lewatle Johannes Phaladi

unread,
Apr 5, 2022, 10:06:22 AM4/5/22
to DSpace Technical Support
Hello Tim,

Thanks very much for the response, I will share this with our senior ICT colleagues and give updates.

Regards,
Lewatle 

Reply all
Reply to author
Forward
0 new messages