Unable to login to new DSpace 7 installation

1,637 views
Skip to first unread message

Sten Aus

unread,
Feb 10, 2021, 9:49:37 AM2/10/21
to DSpace Technical Support
Hi all

I have new installation of DSpace 7 and everything "seems" to be working almost good, as I've configured frontend and backend and solr and I can access /server and simulate API requests and get responses.

There's one problem - I cannot login. 😄
Username and password matching is done and it's successful - because when entering wrong UN/PW, then I get error as a response.
After entering correct UN/PW I get some POST request, but there's no login made (as like there's no session).

I don't have no error codes on browser's dev tools, dspace.log nor tomcat9 log etc.

Sten Aus

unread,
Feb 16, 2021, 9:47:34 AM2/16/21
to DSpace Technical Support
Hi

Little more information.
Where creating a new registration from webpage I can confirm my account and complete the registration. But when I'm trying to login again with the created account, I cannot. Although password is OK.
I've tried 7.0-beta4 and 7.0-beta5-SNAPSHOT from git main branch for angular and backend as well.

Sten Aus

unread,
Feb 25, 2021, 4:24:00 AM2/25/21
to DSpace Technical Support
Hi all
After using docker installation for test, I've discovered that dsAuthInfo cookie is not saved on my DSpace7 installation after "successful" login.

Michael Plate

unread,
Feb 25, 2021, 5:06:28 AM2/25/21
to dspac...@googlegroups.com
Hi Sten,

Am 25.02.21 um 10:24 schrieb Sten Aus:
> Hi all
> After using docker installation for test, I've discovered that
> dsAuthInfo cookie is not saved on my DSpace7 installation after
> "successful" login.
[…]

try to check out dspace-angular via git - after hours of frustration
this helped me.

Michael


Sten Aus

unread,
Feb 25, 2021, 5:33:19 AM2/25/21
to DSpace Technical Support
Hi
I've tried both, release from zip and also master branch from git (for both DSpace and dspace-angular). I've been using now git for 1.5 week.
Did fresh git pull for both and still nothing.

When I authenticate in HAL browser, I can get epersons from API endpoint: server/api/eperson/epersons
So authentication itself is working.

It seems like "it's not working in my environment (:D)" issue with angular/session/storage/... itself.

I've not discovered big differences between docker instance:
software/Docker/my Arch Linux instance
npm/6.14.11/6.14.11
nodejs/12.20.2/12.20.1
yarn/1.22.5/1.22.10
So, some minor differences, I guess that's not related.

Sten Aus

unread,
Feb 25, 2021, 5:50:49 AM2/25/21
to DSpace Technical Support
I've discovered that Docker was running in "development". After building with the same configuration, only using yarn start:dev login works.

Michael Plate

unread,
Feb 25, 2021, 8:21:12 AM2/25/21
to dspac...@googlegroups.com
Am 25.02.21 um 11:50 schrieb Sten Aus:
> I've discovered that Docker was running in "development". After building
> with the same configuration, only using yarn start:dev login works.


fascinating facts - now I have the same problem, and indeed yesterday I
started it with "yarn run start:dev", later on just "yarn start".

Tim Donohue

unread,
Feb 25, 2021, 11:57:15 AM2/25/21
to dspac...@googlegroups.com

Hi Sten & Michael,

Sorry to hear you are having issues getting login working right for DSpace 7.

Unfortunately, though, I think we'd need more information to help debug this. 
  • What's the exact error you are seeing?  
    • If you are using a browser like Chrome, you could also open up "DevTools" (More Tools -> Developer Tools) and look at the "Network" tab right before you try to login.  Then attempt to login & it may give you a more detailed error message.
    • You also could check the (backend) logs to see if it gives additional details
  • As we are in very active​ development right now, I'd highly encourage updating to the latest "main" GitHub branch (both for Angular UI and the backend).  Because we are merging new fixes daily/weekly, if one of the two is outdated, you might hit odd issues.  (Additionally, sometimes we merge fixes to both the frontend & backend simultaneously because you need both fixes together​ to fix some bugs.)
  • I'd also highly recommend double checking that the URLs in the "dspace.server.url" and "dspace.ui.url" (in the backend local.cfg) match up with the URL parts in your "environment.*.ts" configuration in Angular UI.  If those don't match​, then the frontend may not trust​ the backend and will refuse to allow you to login.

If you could provide more info, I might be able to help figure out what is going on.   I can verify though that login works on our Demo site (https://demo7.dspace.org) and it also works for me locally using the Docker setup (https://wiki.lyrasis.org/display/DSPACE/Try+out+DSpace+7#TryoutDSpace7-InstallviaDocker).  So, we just need to determine how your setup differs.

Thanks for doing some early testing for us!

Tim




From: dspac...@googlegroups.com on behalf of Michael Plate
Sent: Thursday, February 25, 2021 7:21 AM
To: dspac...@googlegroups.com
Subject: Re: [dspace-tech] Re: Unable to login to new DSpace 7 installation

--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
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/713cf613-2e76-622c-ff6b-1d3e4cc952bb%40bibliothek.uni-kassel.de.

Sten Aus

unread,
Feb 26, 2021, 2:23:15 AM2/26/21
to DSpace Technical Support
As this seems to be an issue for at least 3 now, I suggest to move this thread to Github: https://github.com/DSpace/dspace-angular/issues/1036

Tim Donohue

unread,
Feb 26, 2021, 1:06:46 PM2/26/21
to DSpace Technical Support
All,

Just a note that, with Sten's help, we seem to have narrowed down the issue here.  See discussion in https://github.com/DSpace/dspace-angular/issues/1036

For those having issues with login after a fresh install, try adding this to your local.cfg (on the backend) & restarting Tomcat (where "server" webapp is running): 

proxies.trusted.ipranges = [IP-address-of-UI-server]
It seems that this proxy setting is getting in the way of login working correctly when using a Production build/installation.

This appears, at a glance, to be a bug... I'll be digging into it more next week to see if we can fix it soon (prior to the upcoming 7.0 Beta 5).  (The fix might be to remove this configuration altogether, see https://github.com/DSpace/DSpace/issues/2984)  So, just consider this a temporary workaround​ for now.

Thanks,

Tim


From: dspac...@googlegroups.com <dspac...@googlegroups.com> on behalf of Sten Aus <sten...@gmail.com>
Sent: Friday, February 26, 2021 1:23 AM
To: DSpace Technical Support <dspac...@googlegroups.com>
Reply all
Reply to author
Forward
0 new messages