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

500 error on https://flathub.org/apps/dev.lizardbyte.app.Sunshine #4527

Closed
ReenigneArcher opened this issue Jan 23, 2025 · 24 comments
Closed

Comments

@ReenigneArcher
Copy link

Sorry if this is the wrong place to post this issue, but I am seeing a 500 error on the site.

I noticed some issues after merging flathub/dev.lizardbyte.app.Sunshine#185

9 hours after the merge, I noticed the website had not updated yet, but the API did update as I could get the flathub version with shields.io.

image

At that time I also saw that a review was required because we updated the description; however that was already approved. The website was still up then, just still showing the last version's metadata.

@barthalion
Copy link
Member

Fetching data for app details: dev.lizardbyte.app.Sunshine en
No eol rebase data
Fetching apps for developer LizardByte
Developer apps for LizardByte fetched
Addons for dev.lizardbyte.app.Sunshine fetched
RangeError: Invalid time value
at <unknown> (.next/server/chunks/9359.js:1:721)
at l (.next/server/chunks/9359.js:1:2701)
at f (.next/server/pages/apps/[appId].js:11:7094)
⨯ RangeError: Invalid time value
at <unknown> (.next/server/chunks/9359.js:1:721)
at l (.next/server/chunks/9359.js:1:2701)
at f (.next/server/pages/apps/[appId].js:11:7094)
⨯ RangeError: Invalid time value
at <unknown> (.next/server/chunks/9359.js:1:721)
at l (.next/server/chunks/9359.js:1:2701)
at f (.next/server/pages/apps/[appId].js:11:7094)

any ideas @razzeee?

@razzeee
Copy link
Member

razzeee commented Jan 24, 2025

release has no timestamp, just date https://github.com/flathub/dev.lizardbyte.app.Sunshine/blob/master/dev.lizardbyte.app.Sunshine.metainfo.xml#L39

Need to dig, if we really don't use one to fill the other

@barthalion
Copy link
Member

I think it's been traditionally timestamp. Maybe date is newish in the spec

@razzeee
Copy link
Member

razzeee commented Jan 24, 2025

It should start showing up after #4534 but without that date value.

I think we should the backend take date and write it into timestamp, if that doesn't exist.

@bbhtt
Copy link
Contributor

bbhtt commented Jan 24, 2025

Timestamp is not supposed to be in metainfo, it is generated by appstream from date in catalogue. The bug here is that the release tags are mis-formatted, the indentation of the tags matters. release must be inside releases

@razzeee
Copy link
Member

razzeee commented Jan 24, 2025

release must be inside releases

That's the case, but I guess you mean the indentation is causing this to break? I'm surprised the linter/appstream isn't failing on that then.

@bbhtt
Copy link
Contributor

bbhtt commented Jan 24, 2025

That's the case

Not in metainfo, appstream is supposed to catch it

@bbhtt
Copy link
Contributor

bbhtt commented Jan 24, 2025

I'll add a check for timestamp, this is the first time this has happened, everything else in catalogue has timestamp.

bbhtt added a commit to flathub-infra/flatpak-builder-lint that referenced this issue Jan 24, 2025
@bbhtt bbhtt closed this as completed Jan 24, 2025
@bbhtt
Copy link
Contributor

bbhtt commented Jan 24, 2025

You should fix the release tag indentations because next time build is going to fail.

@ReenigneArcher
Copy link
Author

Thank you for taking care of this, I'm fixing it upstream as well.

One more question (I can open a separate issue/request if needed).

Would it be possible accept a <pre> tag? We have some some commands to help users who might not read the official documentation.

Image

It looks a lot nicer like this, but the linter currently doesn't allow it.

@bbhtt
Copy link
Contributor

bbhtt commented Jan 24, 2025

pre is not valid, appstream allows only a subset of tags. Use code.

@bbhtt
Copy link
Contributor

bbhtt commented Jan 24, 2025

although note that website won't show a code block for that tag like above.

@ReenigneArcher
Copy link
Author

I see it adds a backtic before and after

@razzeee
Copy link
Member

razzeee commented Jan 24, 2025

although note that website won't show a code block for that tag like above.

it should do that, do you have examples of that? are we talking about the description?

@bbhtt
Copy link
Contributor

bbhtt commented Jan 24, 2025

no I meant it's not a codeblock like in the picture, i know it adds backticks + slight highlight.

@ReenigneArcher
Copy link
Author

ReenigneArcher commented Jan 24, 2025

I just modified the live page. It looks like this with <code>

Image

(Still better than using <p>.)

@bbhtt
Copy link
Contributor

bbhtt commented Jan 24, 2025

Yes that's how it is supposed look.

@ReenigneArcher
Copy link
Author

@bbhtt
Copy link
Contributor

bbhtt commented Jan 24, 2025

It's going to fail if you have date set to date="1970-01-01" don't do that, and code should be inside p tag https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines/#description

@bbhtt
Copy link
Contributor

bbhtt commented Jan 24, 2025

Ok I saw you are replacing it with awk, can you show the final metainfo after these adjustments are made? Something is wrong with it.

@razzeee
Copy link
Member

razzeee commented Jan 24, 2025

According to https://tailwindcss-typography.vercel.app/ that backtick handling should only happen, when we use code inside of a header

@ReenigneArcher
Copy link
Author

It's going to fail if you have date set to date="1970-01-01"

It's only like this for the PRs and unpublished versions, as I feel like configuring this through CMake is going to cause headaches. It gets replaced when we publish.

To clarify, you want a timestamp like an epoch timestamp instead of a date? The documenation shows a date, so I'm not clear on that new timestamp lint error. https://docs.flathub.org/docs/for-app-authors/metainfo-guidelines/#release

code should be inside p

Got it.

Ok I saw you are replacing it with awk, can you show the final metainfo after these adjustments are made? Something is wrong with it.

The release section is updated using awk when we publish the release, not during PRs.

@bbhtt
Copy link
Contributor

bbhtt commented Jan 24, 2025

To clarify, you want a timestamp like an epoch timestamp instead of a date? The documenation shows a date, so I'm not clear on that new timestamp lint error.

You only need to add date in Metainfo release tag, provided the format is correct and the date is in valid ranges appstream will convert it to timestamp automatically. It won't do that if you are using unix epochs.

You can't add timestamp in metinfo that will be another validation failure.

@ReenigneArcher
Copy link
Author

Solved, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants