upleveled / notion-backup

Export Notion pages and subpages to a GitHub repo on a schedule (eg. to be used as a scheduled backup)
56 stars 8 forks source link

"Waiting 1 second before polling again..." #285

Closed j10sanders closed 2 months ago

j10sanders commented 2 months ago

Love this project - thanks for putting it together. Trying to debug why mine isn't working - I added the secret and edited my index to include the space-id.

https://github.com/j10sanders/notion_backup/actions/runs/10342466010/job/28625450837

karlhorky commented 2 months ago

Hi @j10sanders, thanks for the warm words ❤️

The link above is broken unfortunately (or maybe private?). Can you provide some further logs? (make sure to not expose any private data)

The "Waiting x seconds before polling again..." message occurs when the polling is being rate limited (more details in https://github.com/richartkeil/notion-guardian/pull/20) - it should not cause the script to fail in my experience.

j10sanders commented 2 months ago

Sure! Thanks for the response.

You can see it just ends after retrying for a while:

Screenshot 2024-08-11 at 6 30 24 PM Screenshot 2024-08-11 at 6 33 51 PM

All I edited in the index file is the space-id, so it looks like this:


  {
    // Find the page block ID by either:
    // 1. Copying the alphanumeric part at the end of the Notion
    //    page URL and separate it with dashes in the same format
    //    as below (number of characters between dashes:
    //    8-4-4-4-12)
    // 2. Inspecting network requests in the DevTools
    id: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
    // Find the space ID associated with a block by running this
    // in the DevTools Console while on the page you want to
    // export:
    // ```
    // $('img[src*="spaceId="]').src.replace(/^.+&spaceId=([^&]+)&.+$/, '$1')
    // ```
    spaceId: <MY SPACE ID AS A STRING>,
    // Choose a directory name for your export to appear in the
    // `exports` folder
    dirName: 'notion-page-a',
    // Should all of the subpages also be exported?
    recursive: false,
  },
];```
karlhorky commented 2 months ago

Ah, there is a relevant error message in your second screenshot - your backup is taking longer than 35 minutes.

You can increase the timeout in the workflow yaml.

karlhorky commented 2 months ago

@j10sanders hope my reply above helped!

I'll close this issue for now - if you have any further questions or anything you can either continue replying here or open a new issue