Molunerfinn/PicGo · warning · Error
Please agree the privacy policy to upload
Error message
Please agree the privacy policy to upload
What it means
The main-process Uploader.upload() checks the user's privacy-policy acceptance via privacyManager.check() before invoking picgo.upload. When the check resolves false (policy not yet agreed), it throws Error(T('PRIVACY_TIPS')), aborting the upload. This is an intentional gate required before any image upload is permitted.
Source
Thrown at src/main/apis/app/uploader/index.ts:135
return await this.upload([filePath])
} else {
return await this.upload(imgPath)
}
} catch (e: any) {
logger.error(e)
return false
} finally {
if (filePath) {
fse.unlink(filePath)
}
}
}
async upload (img?: IUploadOption): Promise<ImgInfo[]|false> {
try {
const privacyCheckRes = await privacyManager.check()
if (!privacyCheckRes) {
throw Error(T('PRIVACY_TIPS'))
}
const startTime = Date.now()
const output = await picgo.upload(img)
if (Array.isArray(output) && output.some((item: ImgInfo) => item.imgUrl)) {
if (this.webContents) {
dataReportManager.reportUploadData(this.webContents, {
fromClipboard: !img,
duration: Date.now() - startTime,
outputList: output
})
}
return output.filter(item => item.imgUrl)
} else {
return false
}
} catch (e: any) {
logger.error(e)
setTimeout(() => {View on GitHub (pinned to 07ec7068a5)
Solutions
- Show the privacy policy dialog and record acceptance (privacyManager accept) before triggering uploads.
- Set the privacy-agreed flag in appConfig (the same flag privacyManager.check() reads) in automation scenarios.
- Catch this error at upload entry points and route the user to the privacy consent UI instead of retrying.
- After acceptance, re-run the upload — no other state is needed since the check is the only gate.
Example fix
// before
const output = await uploader.upload(img)
// after
if (!(await privacyManager.check())) {
const agreed = await promptPrivacyPolicyDialog()
if (!agreed) return false
}
const output = await uploader.upload(img) Defensive patterns
Strategy: validation
Validate before calling
if (!(await privacyManager.check())) {
// show privacy dialog and persist acceptance before uploading
await showPrivacyPolicyDialog()
} Type guard
function canUpload(privacyCheckRes: unknown): privacyCheckRes is true {
return privacyCheckRes === true
} Try / catch
try {
const output = await uploader.upload(img)
} catch (err) {
if ((err as Error).message === T('PRIVACY_TIPS')) {
// route user to privacy consent UI, then optionally retry
showPrivacyPolicyDialog()
}
} Prevention
- Always gate upload entry points behind a privacyManager.check() pass.
- Persist the acceptance flag so restarts and automations inherit it.
- In headless/CLI flows, set the agreed flag programmatically before calling upload.
- Do not retry uploads on this error — obtain consent first, then retry once.
When it happens
Trigger: Any upload path — clipboard upload (handleClipboardUploading/uploadWithBuildInClipboard), uploading imgs from the renderer, or direct upload() calls — executed while the user has not accepted the privacy policy, so privacyManager.check() returns false.
Common situations: Fresh install where the privacy dialog was dismissed without agreeing; config reset or migration that cleared the acceptance flag; automated/headless uploads (CLI or tests) driving the uploader before any interactive acceptance.
AI-assisted analysis of Molunerfinn/PicGo@07ec7068a5 (2026-08-30).
Data as JSON: /api/errors/f8f227c6d7264c2c.
Report an issue: GitHub.