asnunes / notion-page-to-html

NodeJS tool to convert public Notion pages to HTML from page ID
MIT License
163 stars 45 forks source link

Error when inputting a page that has an uploaded cover image #23

Closed mchlkucera closed 2 years ago

mchlkucera commented 2 years ago

Whenever I try to get the HTML of a page with no cover or cover from Unsplash, everything works correctly. The moment I upload my own cover, I get

A server error has occurred
FUNCTION_INVOCATION_FAILED

When I look into the Vercel log, I get:

[GET] /?id=Page-with-a-custom-cover-65f2a5a62d7344768e95cfa91b423618
10:44:58:94
2022-01-29T09:45:01.776Z    1e9b4de1-f8c6-409f-a7f1-09860b5d1548    ERROR   Uncaught Exception  {"errorType":"SyntaxError","errorMessage":"Unexpected token P in JSON at position 0","stack":["SyntaxError: Unexpected token P in JSON at position 0","    at JSON.parse (<anonymous>)","    at IncomingMessage.<anonymous> (/var/task/node_modules/notion-page-to-html/dist/utils/usecases/http-get/node-http-get.js:71:44)","    at IncomingMessage.emit (events.js:412:35)","    at endReadableNT (internal/streams/readable.js:1334:12)","    at processTicksAndRejections (internal/process/task_queues.js:82:21)"]}
Unknown application error occurred

I've deployed this app on https://notion-to-html.vercel.app/, I've been testing it with this Notion database - no-cover page and Unsplash cover page work, custom cover does not. Thank you for this amazing extension, I hope we can find a solution, I'll gladly follow up with further information if needed.

asnunes commented 2 years ago

Hi, @mchlkucera. Sorry for late reply. There is no support for database pages now. The supported block are listed on "Supported features" section on README file

Please let me know if this problems are happening with other kind of pages. Closing the issue by now.