Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • S swh-web
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 82
    • Issues 82
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Platform
  • Development
  • swh-web
  • Issues
  • #4675
Closed
Open
Issue created Nov 09, 2022 by Sentry Integration@swh-sentry-integrationMaintainer

/browse/search/ crashes when swh-search results are not in swh-storage

swh-search is up to date with the main swh-storage cluster, while swh-web uses a replica that is currently lagging behind. This means that search results returned by swh-search may not exist in the storage.

When this happens, the JS code gets a 404 when querying https://archive.softwareheritage.org/api/1/origin/visit/latest/doc/ with an HTML body.

However, it expects to always get a JSON body, causing this crash:

https://sentry.softwareheritage.org/organizations/swh/issues/105105/?referrer=phabricator_plugin

SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
  at None (./swh/web/browse/assets/browse/origin-search.js:61:66)
  at Array.map (<anonymous>)
  at call (./swh/web/browse/assets/browse/origin-search.js:61:55)
...
(3 additional frame(s) were not displayed)

which means the page gets stuck on the "Checking" spinner


Migrated from T4675 (view on Phabricator)

Edited Jan 07, 2023 by Phabricator Migration user
Assignee
Assign to
Time tracking