voxpelli / webpage-webmentions

A hosted Disqus-like comment service that enables WebMention receiving on any kind of site
https://webmention.herokuapp.com/
MIT License
73 stars 14 forks source link

Error received #208

Closed jeremycherfas closed 1 month ago

jeremycherfas commented 1 month ago

Me again; sorry.

Zapier has been reporting an error for about 24 hours now.

Trigger partner failure: The app returned "500 Server Error: Internal Server Error for url: https://webmention.herokuapp.com/api/mentions?site=jeremycherfas.net&format=html ; {"error":"An error occurred"}".

I just checked manually, and the error persists.

Thanks

Jeremy

voxpelli commented 1 month ago

Oh, I’ll check it out when I’m done with my haircut and have returned to the office 🙏

voxpelli commented 1 month ago

Same error as last time, https://github.com/voxpelli/webpage-webmentions/issues/205#issuecomment-2098158868:

Error: Invalid URL, should be an absolute one (tag:indieweb.social:112569576381688668/,2013)
    at normalizeUrlRaw (/app/lib/utils/url-tools.js:28:11)
    at normalizeUrl (/app/lib/utils/url-tools.js:53:58)
    at /app/lib/classes/entries.js:88:36
    at Array.map (<anonymous>)
    at Entries._resolveDerivedData (/app/lib/classes/entries.js:88:25)
    at Entries._distillMention (/app/lib/classes/entries.js:117:15)
    at /app/lib/classes/entries.js:301:26
    at Array.map (<anonymous>)
    at /app/lib/classes/entries.js:301:10
voxpelli commented 1 month ago

Note to self:

To list all interactions for a site:

SELECT entries.*
FROM entries
INNER JOIN mentions ON mentions.eid = entries.id
WHERE
  mentions.hostname = 'jeremycherfas.net' AND
  jsonb_path_exists(to_jsonb(entries.data), '$.interactions[*] ? (@ like_regex "^tag:")') = true
ORDER BY fetched DESC
LIMIT 100

Ultimately needs to be fixed in #206

voxpelli commented 1 month ago

The three problematic mentions:

jeremycherfas commented 1 month ago

All of those give me a 404. I wonder whether there is a solution that could be implemented on brid.gy? Is it worth opening an issue there?

voxpelli commented 1 month ago

These are the posts they match to:

Probably the issue is the tag at: https://indieweb.social/@etp/112569537544389674

voxpelli commented 1 month ago

The issue is that I save the tag interaction to a database column that the API layer later rejects when it tries to render the list. The API layer needs to not throw on such interactions or the the tag needs to be stripped when I consume it.

Its on me to handle any kind of unexpected data and not crash on it 😌

voxpelli commented 1 month ago

That said, the above SQL query made it really easy to find and I have now manually purged the tag interactions, so your feed is back to working: https://webmention.herokuapp.com/api/mentions?site=jeremycherfas.net&format=html 🎉