craigary / nobelium

A static blog build on top of Notion and NextJS, deployed on Vercel.
https://nobelium.js.org
MIT License
3k stars 1.97k forks source link

Error 500 following date issue #337

Closed kneescars closed 11 months ago

kneescars commented 11 months ago

Description of the bug

After the last updates, everything was working, but I started to upload articles into the database and some of them got error 500. Once the new article was uploaded, first, it was uploaded with a specific date and when It was published, it carried the current date (the date of the upload, even if the field "date" was correctly filled. Consequently, the articles appeared as the first of the list (once their date displayed was the most recent). The article didn't load, however and I saw this error in the dev console:

A server error has occurred

FUNCTION_INVOCATION_FAILED

Once I went to the database and clicked on the date again, it went to the right place in the blog, but the article didnt work either, with this error coming in the console (screenshot). I waited to see if it was temporary but no, I had to unpublish to avoid leaving a dead link. One thing I noticed is that if I looked on the console, it was possible to see, even without going to the URL, that the link was not working (as you can see on the screenshot)

Expected behavior

Load the blog and have the articles listed according to the date and opening once you clicked on the link.

Reproduction

Load the home page (open dev console to see the loading log) go to the the third page of the articles list (https://www.zeitgeist.digital/page/3) Click on the link, wait the loading time and get the message "Application error: a client-side exception has occurred (see the browser console for more information).". Console errorvmessage: A server error has occurred FUNCTION_INVOCATION_FAILED

When running locally for debug, the page didnt open too, and this was the error message: {post.tags && (

  57 |   <div className="flex flex-nowrap max-w-full overflow-x-auto article-tags">
> 58 |     {post.tags.map(tag => (
     |               ^
  59 |       <TagItem key={tag} tag={tag} />
  60 |     ))}
  61 |   </div>

Screenshots

https://i.imgur.com/s85zswo.png https://postimg.cc/sBs9WKNt

Additional context

Software versions

Mac OS Sonoma, Chrome.

kneescars commented 11 months ago

Sorry for answering my own question, but after many hours, I found a tweak and maybe you guys developing it have some help (I am a journalist, not a coder, unfortunately). The problem was - I think - because I changed the type of property in "tags" from multi-select to AI autofill. For some reason, the system could not read the tags after some point. I brought everything back to the default and the system is working again. Another thing I noticed is that the entries with problem could not be "fixed", they had to be republished, including changing the slug (for some reason Notion only worked properly after I changed the slug). Thanks.