darobin/notion-backup

Error at the "Run backup" step

Closed this issue · 7 comments

I am recieving this error at the "Run backup" step.

Run notion-backup
  notion-backup
  shell: /usr/bin/bash -e {0}
  env:
    NOTION_TOKEN: ***
    NOTION_SPACE_ID: ***
Enqueued task <enqueued_task>
TypeError: Cannot read property 'pagesExported' of undefined
    at exportFromNotion (/opt/hostedtoolcache/node/12.22.1/x64/lib/node_modules/notion-backup/notion-backup.js:61:51)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async run (/opt/hostedtoolcache/node/12.22.1/x64/lib/node_modules/notion-backup/notion-backup.js:90:3)
Error: Process completed with exit code 1.

I tried and found out that removing the quote mark in the TOKEN and SPACE_ID string resolves this problem

Thanks @Fengyee. Removing the quote marks solved the issue.
I had to run it twice before it could work without error. Not sure if this is related though.

I don't have quote marks in my secrets for the token and space id. However, the job fails everytime I run it, and I always need to rerun the job manually for it to work. This kind of defeats the purpose of an automatic backup, any ideas?

I'm getting the same error as reported above.

I managed to get the same error once, but then it just disappeared. I think it's a transient problem with how Notion reports the status of open tasks. I have been adding code to handle those cases better in 1.3.0. Let's see if it works. Sorry I can't be more definitive, it's hard to fix this without being able to reproduce it reliably, or even often.

Gotcha, I understand. It seems to be helpful! After 2 failed scheduled job attempts, it succeeded the other day, I'm assuming after your update. I appreciate it, if I continue to have problems I'll check in in a bit. Happy new year!