Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error appears in DevTools Console ("doesn't contain the link profiles") when Researcher Profiles disabled #3759

Open
tdonohue opened this issue Dec 18, 2024 · 0 comments
Labels
affects: main Issue impacts "main" (latest release). affects: 7.x Issue impacts 7.x releases affects: 8.x Issue impacts 8.x releases bug component: user profile error handling How errors are handled from REST API help wanted Needs a volunteer to claim to move forward high priority

Comments

@tdonohue
Copy link
Member

Describe the bug

This error appears to have started after the 8.0 release. But, it's reproducible on both our main and dspace-8_x branches. If you open your browser's DevTools and login, you'll see an error like this in the Console:

main.34ada579bae23bc2.js:1 ERROR Error: {"actuator":{"href":"http://localhost:8080/server/actuator"},"authn":{"href":"http://localhost:8080/server/api/authn"},"authorizations":{"href":"http://localhost:8080/server/api/authz/authorizations"},"bitstreamformats":{"href":"http://localhost:8080/server/api/core/bitstreamformats"},"bitstreams":{"href":"http://localhost:8080/server/api/core/bitstreams"},"browses":{"href":"http://localhost:8080/server/api/discover/browses"},"bulkaccessconditionoptions":{"href":"http://localhost:8080/server/api/config/bulkaccessconditionoptions"},"bundles":{"href":"http://localhost:8080/server/api/core/bundles"},"claimedtasks":{"href":"http://localhost:8080/server/api/workflow/claimedtasks"},"claimedtasks-search":{"href":"http://localhost:8080/server/api/workflow/claimedtasks/search"},"collections":{"href":"http://localhost:8080/server/api/core/collections"},"communities":{"href":"http://localhost:8080/server/api/core/communities"},"contentreport":{"href":"http://localhost:8080/server/api/contentreport"},"correctiontypes":{"href":"http://localhost:8080/server/api/config/correctiontypes"},"discover":{"href":"http://localhost:8080/server/api/discover"},"dso":{"href":"http://localhost:8080/server/api/dso/find{?uuid}","templated":true},"duplicates":{"href":"http://localhost:8080/server/api/submission/duplicates"},"duplicates-search":{"href":"http://localhost:8080/server/api/submission/duplicates/search"},"enqueueretry":{"href":"http://localhost:8080/server/api/ldn/messages/{id}/enqueueretry","templated":true},"entitytypes":{"href":"http://localhost:8080/server/api/core/entitytypes"},"eperson-registration":{"href":"http://localhost:8080/server/api/eperson/registrations"},"epersons":{"href":"http://localhost:8080/server/api/eperson/epersons"},"externalsources":{"href":"http://localhost:8080/server/api/integration/externalsources"},"features":{"href":"http://localhost:8080/server/api/authz/features"},"feedbacks":{"href":"http://localhost:8080/server/api/tools/feedbacks"},"groups":{"href":"http://localhost:8080/server/api/eperson/groups"},"identifiers":{"href":"http://localhost:8080/server/api/pid/identifiers"},"itemfilters":{"href":"http://localhost:8080/server/api/config/itemfilters"},"itemrequests":{"href":"http://localhost:8080/server/api/tools/itemrequests"},"items":{"href":"http://localhost:8080/server/api/core/items"},"itemtemplates":{"href":"http://localhost:8080/server/api/core/itemtemplates"},"ldnservices":{"href":"http://localhost:8080/server/api/ldn/ldnservices"},"messages":{"href":"http://localhost:8080/server/api/ldn/messages"},"metadatafields":{"href":"http://localhost:8080/server/api/core/metadatafields"},"metadataschemas":{"href":"http://localhost:8080/server/api/core/metadataschemas"},"notifyrequests":{"href":"http://localhost:8080/server/api/ldn/notifyrequests"},"oidc":{"href":"http://localhost:8080/server/api/authn"},"orcidhistories":{"href":"http://localhost:8080/server/api/eperson/orcidhistories"},"orcidqueues":{"href":"http://localhost:8080/server/api/eperson/orcidqueues"},"pid":{"href":"http://localhost:8080/server/api/pid/find{?id}","templated":true},"pooltasks":{"href":"http://localhost:8080/server/api/workflow/pooltasks"},"pooltasks-search":{"href":"http://localhost:8080/server/api/workflow/pooltasks/search"},"processes":{"href":"http://localhost:8080/server/api/system/processes"},"properties":{"href":"http://localhost:8080/server/api/config/properties"},"qualityassuranceevents":{"href":"http://localhost:8080/server/api/integration/qualityassuranceevents"},"qualityassurancesources":{"href":"http://localhost:8080/server/api/integration/qualityassurancesources"},"qualityassurancetopics":{"href":"http://localhost:8080/server/api/integration/qualityassurancetopics"},"registrations":{"href":"http://localhost:8080/server/api/eperson/registrations"},"relationships":{"href":"http://localhost:8080/server/api/core/relationships"},"relationshiptypes":{"href":"http://localhost:8080/server/api/core/relationshiptypes"},"resourcepolicies":{"href":"http://localhost:8080/server/api/authz/resourcepolicies"},"resourcepolicies-search":{"href":"http://localhost:8080/server/api/authz/resourcepolicies/search"},"scripts":{"href":"http://localhost:8080/server/api/system/scripts"},"self":{"href":"http://localhost:8080/server/api"},"sites":{"href":"http://localhost:8080/server/api/core/sites"},"statistics":{"href":"http://localhost:8080/server/api/statistics"},"submissionaccessoptions":{"href":"http://localhost:8080/server/api/config/submissionaccessoptions"},"submissioncclicenseUrls":{"href":"http://localhost:8080/server/api/config/submissioncclicenseUrls"},"submissioncclicenseUrls-search":{"href":"http://localhost:8080/server/api/config/submissioncclicenseUrls/search"},"submissioncclicenses":{"href":"http://localhost:8080/server/api/config/submissioncclicenses"},"submissioncoarnotifyconfigs":{"href":"http://localhost:8080/server/api/config/submissioncoarnotifyconfigs"},"submissiondefinitions":{"href":"http://localhost:8080/server/api/config/submissiondefinitions"},"submissionforms":{"href":"http://localhost:8080/server/api/config/submissionforms"},"submissionsections":{"href":"http://localhost:8080/server/api/config/submissionsections"},"submissionuploads":{"href":"http://localhost:8080/server/api/config/submissionuploads"},"subscriptions":{"href":"http://localhost:8080/server/api/core/subscriptions"},"subscriptions-search":{"href":"http://localhost:8080/server/api/core/subscriptions/search"},"suggestions":{"href":"http://localhost:8080/server/api/integration/suggestions"},"suggestionsources":{"href":"http://localhost:8080/server/api/integration/suggestionsources"},"suggestiontargets":{"href":"http://localhost:8080/server/api/integration/suggestiontargets"},"supervisionorders":{"href":"http://localhost:8080/server/api/core/supervisionorders"},"systemwidealerts":{"href":"http://localhost:8080/server/api/system/systemwidealerts"},"usagereports":{"href":"http://localhost:8080/server/api/statistics/usagereports"},"versionhistories":{"href":"http://localhost:8080/server/api/versioning/versionhistories"},"versions":{"href":"http://localhost:8080/server/api/versioning/versions"},"vocabularies":{"href":"http://localhost:8080/server/api/submission/vocabularies"},"vocabularyEntryDetails":{"href":"http://localhost:8080/server/api/submission/vocabularyEntryDetails"},"vocabularyEntryDetails-search":{"href":"http://localhost:8080/server/api/submission/vocabularyEntryDetails/search"},"workflowactions":{"href":"http://localhost:8080/server/api/config/workflowactions"},"workflowdefinitions":{"href":"http://localhost:8080/server/api/config/workflowdefinitions"},"workflowitems":{"href":"http://localhost:8080/server/api/workflow/workflowitems"},"workflowsteps":{"href":"http://localhost:8080/server/api/config/workflowsteps"},"workspaceitems":{"href":"http://localhost:8080/server/api/submission/workspaceitems"}} doesn't contain the link profiles
    at main.34ada579bae23bc2.js:1:279204
    at main.34ada579bae23bc2.js:1:1897441
    at c._next (main.34ada579bae23bc2.js:1:1893835)
    at c.next (main.34ada579bae23bc2.js:1:1882666)
    at main.34ada579bae23bc2.js:1:1897434
    at c._next (main.34ada579bae23bc2.js:1:1893835)
    at c.next (main.34ada579bae23bc2.js:1:1882666)
    at main.34ada579bae23bc2.js:1:1901895
    at c._next (main.34ada579bae23bc2.js:1:1893835)
    at c.next (main.34ada579bae23bc2.js:1:1882666)

Even though this error states that a profiles "link" is missing from a REST API response, it seems like a possible dspace-angular bug with attempting to access the Researcher Profiles when that feature is disabled. (The profiles link relates to Researcher Profiles: https://github.com/DSpace/RestContract/blob/main/profiles.md)

To Reproduce

Steps to reproduce the behavior:

  1. Ensure Researcher Profiles feature is disabled on the backend. Ensure this setting is commented out in your researcher-profile.cfg or local.cfg: researcher-profile.entity-type = Person
  2. Run the UI in production mode.
    • For main, use npm run build:prod; npm run serve:ssr. For dspace-8_x, use yarn run build:prod; yarn run serve:ssr
  3. Open up Chrome Dev Tools
  4. Visit the homepage. No errors in Chrome Dev Tools
  5. Now, login as any user, and you'll see the above error appear in the "Console" of Dev Tools.

Expected behavior

No error should appear in Dev Tools.

@tdonohue tdonohue added bug help wanted Needs a volunteer to claim to move forward high priority component: user profile error handling How errors are handled from REST API affects: main Issue impacts "main" (latest release). affects: 8.x Issue impacts 8.x releases affects: 7.x Issue impacts 7.x releases labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: main Issue impacts "main" (latest release). affects: 7.x Issue impacts 7.x releases affects: 8.x Issue impacts 8.x releases bug component: user profile error handling How errors are handled from REST API help wanted Needs a volunteer to claim to move forward high priority
Projects
Development

No branches or pull requests

1 participant