Closed s-dziedzic closed 1 year ago
Same error over here... I think there is a PR opened addressing this issue #8
The problem was that Notion changed their API which broke the programatic login. I've updated the tool and documentation to work around this problem. Please see the documentation.
Hey @jckleiner thank you for the update but I think this solution is not maintainable...
We need to fetch the cookie value each time we login-out of notion? This is crazy... Is there any other workaround?
@danielcharrua The token is valid (for a year) as long as you don't explicitly logout over the web-UI. So the best workaround I found is just not to logout from the Notion account that you are backing up with this tool. I know, this is not great but unfortunately I did not find any other another solution. If I find something else I'll try to implement it.
I try to do local backup. All required variables in env file are set up.
11:49:06.984 [main] INFO com.greydev.notionbackup.NotionBackup - ---------------- Starting Notion Backup ---------------- 11:49:07.162 [main] INFO com.greydev.notionbackup.NotionClient - DOWNLOADS_DIRECTORY_PATH is not set. Downloads will be saved to: /downloads 11:49:07.162 [main] INFO com.greydev.notionbackup.NotionClient - Using export type: markdown 11:49:07.162 [main] INFO com.greydev.notionbackup.NotionClient - Flatten export file tree: false Exception in thread "main" java.util.NoSuchElementException: No value present at java.base/java.util.Optional.orElseThrow(Optional.java:382) at com.greydev.notionbackup.NotionClient.getTokenV2(NotionClient.java:194) at com.greydev.notionbackup.NotionClient.export(NotionClient.java:106) at com.greydev.notionbackup.NotionBackup.main(NotionBackup.java:56)