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

[1.21.0] Mermaid on Wiki no longer working #28170

Closed
scara opened this issue Nov 22, 2023 · 15 comments
Closed

[1.21.0] Mermaid on Wiki no longer working #28170

scara opened this issue Nov 22, 2023 · 15 comments
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail type/bug

Comments

@scara
Copy link

scara commented Nov 22, 2023

Description

Hello Everyone,
just updated from 1.20.5 to 1.21.0 and the mermaid git diagram on a Wiki page breaks with the following error Qa(...).catch is not a function and nothing in JS console, just the plain source text of the diagram below the error.

Same error if starting from a fresh 1.21.0 installation.

The error cannot be reproduced on the Gitea demo site, 1.22.0+dev-350-g2d9b91aa2.

https://blog.gitea.com/release-of-1.21.0/ doesn't provide any hint/advice about Mermaid diagrams.

Thanks in advance,
Matteo

Gitea Version

1.21.0

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Docker Rootless Image

How are you running Gitea?

Using the Docker rootless image, docker.io/gitea/gitea:1.21.0-rootless, by means of a quite standard compose.

Database

MySQL/MariaDB

@scara scara added the type/bug label Nov 22, 2023
@silverwind
Copy link
Member

I can not reproduce this on my 1.21 instance. What browser are you using and did you try others? Got a full error stack trace and ideally a screenshot of devtools where the error occured in the minified JS?

@wxiaoguang
Copy link
Contributor

Unable to reproduce either. I have started a fresh instance by image: gitea/gitea:1.21.0-rootless:

image

@wxiaoguang wxiaoguang added issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail and removed type/bug labels Nov 22, 2023
@scara
Copy link
Author

scara commented Nov 22, 2023

Hi @silverwind and @wxiaoguang,
I'm using both Chrome 119.0.6045.160 (Official Build) (64-bit) and Edge 119.0.2151.72 (Official build) (64-bit), on Windows 11, and the issue is there on both of them.

Give this diagram a try:

---
title: "Mermaid Git Diagram on v1.21.0"
---
%%{
  init: {
    'theme': 'base'
  }
}%%
gitGraph
    commit
    commit
    branch develop
    checkout develop
    commit
    commit
    checkout main
    merge develop
    commit
    commit

Maybe it is a Docker image related issue.

DevTools doesn't give any hint since there's no JS error in the console (neither 404s): AFAIK it's a managed exception.

TIA,
Matteo

@wxiaoguang
Copy link
Contributor

OK, reproduced by your sample.

It's really strange. share my findings:

  1. It could be reproduced by the sample above (both Gitea docker root/rootless images).
  2. There is no console log, because the displayError in markup/common.js doesn't output the details.
  3. I can't reproduce it on 1.21 branch or main branch (strange)

@wxiaoguang wxiaoguang added type/bug and removed issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail labels Nov 22, 2023
@silverwind
Copy link
Member

I can reproduce, not just on wiki with this mermaid source:

gitGraph
    commit
    commit

Likely a bug in mermaid itself and we should upgrade the dependency.

@silverwind
Copy link
Member

silverwind commented Nov 22, 2023

I guess we need to upgrade mermaid in v1.21 branch. v1.21 uses mermaid v10.5.0, while main branch has v10.6.1.

@wxiaoguang
Copy link
Contributor

I guess we need to upgrade mermaid in v1.21 branch. v1.21 uses mermaid v10.5.0, while main branch has v10.6.1.

Could you reproduce on 1.21 branch (which uses mermaid 10.5.0)? I can't on my side ..... I can only reproduce it by the docker images.

@silverwind
Copy link
Member

silverwind commented Nov 22, 2023

It reproduces with my from-source compiled 1.21.0+8-gf8c5f202b non-docker instance, have not tried locally yet.

@scara
Copy link
Author

scara commented Nov 22, 2023

Thanks for your repros!
Guessing that gitea 1.20.5 is working due to mermaid v10.2.3.

I'm actually new to gitea - great software! - so thanks @wxiaoguang even for your hint:

displayError(pre, err);

HTH,
Matteo

@scara
Copy link
Author

scara commented Dec 21, 2023

Hello Everyone,
any ETA for a resolution on v1.21?

Will this issue be just "automagically" resolved using v1.22 when it will be released?

TIA,
Matteo

@wxiaoguang
Copy link
Contributor

I can't reproduce it on my side, so I don't know whether "updating the mermaid version" is the right approach.

Anyway, I can propose a PR without any test/guarantee ( Update mermaid for 1.21 #28571 )

Feel free to build your own binary to test whether it really works.

@scara
Copy link
Author

scara commented Dec 21, 2023

Hi @wxiaoguang,

I can't reproduce it on my side, so I don't know whether "updating the mermaid version" is the right approach.

OK
I'll give the latest 1.21 a try to check if it was just a build issue for the 1.21.0 docker tag.

Matteo

wxiaoguang added a commit that referenced this issue Dec 21, 2023
@wxiaoguang
Copy link
Contributor

The 1.21 nightly builds are ready.

@wxiaoguang wxiaoguang added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Dec 21, 2023
@wxiaoguang
Copy link
Contributor

Feel free to reopen if there is still any problem.

@scara
Copy link
Author

scara commented Dec 28, 2023

Hi @wxiaoguang,
docker.io/gitea/gitea:1.21.3-rootless is still affected by the issue (Qa(...).catch is not a function) while nightly (docker.io/gitea/gitea:1.21-nightly-rootless), 1.21.3+14-ga5c7ac998, is running the chart fine.

Thanks for 1fc6bc1!

Matteo

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail type/bug
Projects
None yet
Development

No branches or pull requests

3 participants