Skip to content

All pages show error JavaScript promise rejection: Cannot set properties of null (setting 'textContent'). #31675

@wolfogre

Description

@wolfogre

Description

image

How to reproduce

  1. Start Gitea WITHOUT a Secure contexts, like http://192.168.85.1:3000/
    • No https.
    • No 127.0.0.1, localhost, *.localhost
  2. Visit the sign-in page, and you will see a right warning about WebAuthn:
image
  1. And visit any other pages (even the home page), you will see:
image image

Possible causes

It seems introduced by

  1. After #31504, every page will run detectWebAuthnSupport
image
  1. And it emits error insecure
image
  1. But it's not sign-in page, it cannot get #webauthn-error-msg, so it shows a strange error.
image

Gitea Version

main (ad91a59)

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

Command line.

Database

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/regressionIndicates a previously functioning feature or behavior that has broken or regressed after a changetopic/uiChange the appearance of the Gitea UItype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions