notion-backup icon indicating copy to clipboard operation
notion-backup copied to clipboard

Notion API workspace export returned a 'failure' state. Reason: User cannot access space, or it does not exist.

Open developerisnow opened this issue 3 years ago • 5 comments

docker run \
    --rm=true \
    --env-file=.env \
    -v /Users/user/Downloads:/downloads \
    ghcr.io/jckleiner/notion-backup
20:15:07.289 [main] INFO com.greydev.notionbackup.NotionBackup - ---------------- Starting Notion Backup ----------------
20:15:07.604 [main] INFO com.greydev.notionbackup.NotionClient - DOWNLOADS_DIRECTORY_PATH is not set. Downloads will be saved to: /downloads 
20:15:07.605 [main] INFO com.greydev.notionbackup.NotionClient - Using export type: markdown
20:15:07.605 [main] INFO com.greydev.notionbackup.NotionClient - Flatten export file tree: false
20:15:08.329 [main] INFO com.greydev.notionbackup.NotionClient - taskId extracted
20:15:38.136 [main] INFO com.greydev.notionbackup.NotionClient - Notion API workspace export returned a 'failure' state. Reason: User cannot access space, or it does not exist.
20:15:38.137 [main] INFO com.greydev.notionbackup.NotionClient - downloadLink could not be extracted
Exception in thread "main" java.lang.IllegalStateException: Could not export notion file
        at com.greydev.notionbackup.NotionBackup.lambda$main$0(NotionBackup.java:57)
        at java.base/java.util.Optional.orElseThrow(Optional.java:408)
        at com.greydev.notionbackup.NotionBackup.main(NotionBackup.java:57)
        ```

developerisnow avatar Mar 20 '23 20:03 developerisnow

Hello, token v2 is now an array like : v02%3Auser_token_or_cookies%3AviCNp4....VEd Authentification is not working anymore

japafrite avatar Mar 23 '23 08:03 japafrite

Am I true that there is no opportunity to make backup?

artromone avatar Apr 08 '23 06:04 artromone

I'm recently getting a similar issue but it manages to extract tokenV2 but looks to fail on taskId:

Run java -jar ./target/notion-backup-1.0-SNAPSHOT.jar 03:04:13.882 [main] INFO com.greydev.notionbackup.NotionBackup - ---------------- Starting Notion Backup ---------------- INFO com.greydev.notionbackup.NotionClient - Downloads will be saved to: /tmp/ 03:04:14.254 [main] INFO com.greydev.notionbackup.NotionClient - Using export type: markdown 03:04:14.254 [main] INFO com.greydev.notionbackup.NotionClient - Flatten export file tree: false 03:04:14.254 [main] INFO com.greydev.notionbackup.NotionClient - tokenV2 extracted Exception in thread "main" java.lang.NullPointerException at com.greydev.notionbackup.NotionClient.triggerExportTask(NotionClient.java:218) at com.greydev.notionbackup.NotionClient.export(NotionClient.java:116) at com.greydev.notionbackup.NotionBackup.main(NotionBackup.java:56) Error: Process completed with exit code 1.

ColeInc avatar Apr 14 '23 03:04 ColeInc

Same problem here: User cannot access space error, with credentials that look like that, after URL-decoding:

image

adrienjoly avatar Jun 11 '23 11:06 adrienjoly

I unfortunately can't reproduce the above mentioned problems. I'm not sure if Notion did some changes or if it's specific to your use case. Does anyone still get such errors? If so, please share a bit more information about how you are using the repository.

Also, using wrapping the values in .env with single quotes sometimes leads to problems.

jckleiner avatar Dec 24 '23 07:12 jckleiner