tiddly-gittly / TidGi-Desktop

TidGi is an privacy-in-mind, automated, auto-git-backup, freely-deployed knowledge management Desktop note app, based on Tiddlywiki, with REST API for web-clipping and Anki connect. 「 太记 」是一个基于「 太微 TiddlyWiki 」的知识管理桌面应用,能保护隐私内容、高级自动化、自动Git云备份、部署为博客,且可通过RESTAPI与Anki等应用连接。(迭代开发中欢迎试用,开发进度见下方链接)(Under active development, see website below for details)
https://tidgi.fun
Mozilla Public License 2.0
1.74k stars 111 forks source link

bug: webContents.print(): Invalid print settings specified. #442

Closed dongrentianyu closed 10 months ago

dongrentianyu commented 1 year ago

Environment

TidGi 0.8.1-prerelease1 Electron 25.2.0 win32 10.0.22621 Locale: zh-CN

Description:

想试试打印当前笔记的功能,然后就弹出报错窗口了。

Steps to Reproduce:

Additional Context

Error: webContents.print(): Invalid print settings specified.
    at EventEmitter._.print (node:electron/js2c/browser_init:2:84188)
    at C:\Users\34656\AppData\Local\tidgi\app-0.8.1-prerelease1\resources\app.asar\.webpack\main\index.js:2:2098183
    at Array.forEach (<anonymous>)
    at click (C:\Users\34656\AppData\Local\tidgi\app-0.8.1-prerelease1\resources\app.asar\.webpack\main\index.js:2:2098154)

ZMj4vdZGSnAMRH9HWjTyN-TW-Translation-Chinese-2023-07-11.log

json格式文件不支持,我就贴上来了。

{
    "keep": {
        "days": true,
        "amount": 14
    },
    "auditLog": "C:\\Users\\34656\\AppData\\Roaming\\TidGi\\logs\\.bc40738c555c0eddce5fc37db4e4ef35ef00f0f1-audit.json",
    "files": [
        {
            "date": 1688538229343,
            "name": "C:\\Users\\34656\\AppData\\Roaming\\TidGi\\logs\\ZMj4vdZGSnAMRH9HWjTyN-TW-Translation-Chinese-2023-07-05.log",
            "hash": "3d373f23f7869b12619ec1b681d4defe650986320f631260269c30340d436ab4"
        },
        {
            "date": 1688627576187,
            "name": "C:\\Users\\34656\\AppData\\Roaming\\TidGi\\logs\\ZMj4vdZGSnAMRH9HWjTyN-TW-Translation-Chinese-2023-07-06.log",
            "hash": "7b17e00a8eba0f1ec79d60ad6591e62915ec606b2628cc80d11db51f1234a798"
        },
        {
            "date": 1688662314981,
            "name": "C:\\Users\\34656\\AppData\\Roaming\\TidGi\\logs\\ZMj4vdZGSnAMRH9HWjTyN-TW-Translation-Chinese-2023-07-07.log",
            "hash": "42383701d59f4b2ffe60ba091762a1feb32c34684fee329d3d2ae18f2ec442ca"
        },
        {
            "date": 1688748715001,
            "name": "C:\\Users\\34656\\AppData\\Roaming\\TidGi\\logs\\ZMj4vdZGSnAMRH9HWjTyN-TW-Translation-Chinese-2023-07-08.log",
            "hash": "55761d870f3ad14b26493cbdd786e8b62b6e0796f330da164777e3a1c366776c"
        },
        {
            "date": 1688971851889,
            "name": "C:\\Users\\34656\\AppData\\Roaming\\TidGi\\logs\\ZMj4vdZGSnAMRH9HWjTyN-TW-Translation-Chinese-2023-07-10.log",
            "hash": "4060a34d41b20d32fd546989654e1712635b2d015b0815beeea7bc5efe97d095"
        },
        {
            "date": 1689036294560,
            "name": "C:\\Users\\34656\\AppData\\Roaming\\TidGi\\logs\\ZMj4vdZGSnAMRH9HWjTyN-TW-Translation-Chinese-2023-07-11.log",
            "hash": "6c35ae0bbcf1fb5473a9a6d4c45048f5ea0ea5375872d40ad65a3cf5bb50ffa7"
        }
    ],
    "hashType": "sha256"
}
Zacharia2 commented 1 year ago
Unhandled Promise Rejection
Error: webContents.print(): Invalid print settings specified.
    at EventEmitter._.print (node:electron/js2c/browser_init:2:84188)
    at C:/Users/Snowy/AppData/Local/tidgi/app-0.8.1-prerelease1/resources/app.asar/.webpack/main/index.js:2:2098183
    at Array.forEach (<anonymous>)
    at click (C:/Users/Snowy/AppData/Local/tidgi/app-0.8.1-prerelease1/resources/app.asar/.webpack/main/index.js:2:2098154)

+1 ,【打印当前笔记】功能也没有反应。

linonetwo commented 1 year ago

之后得请个测试工程师实习生来写自动化测试了,不然一更新可能就会有回归问题

dongrentianyu commented 1 year ago

回归问题是什么呢?

linonetwo commented 1 year ago

就是这个问题呀,你可以Google

dongrentianyu commented 1 year ago

明白了,是在增加新功能的前提下尽可能不引入新问题,不增加新bug。

其实我本来是想换导出当前页面为图片的。但目前那个插件还没上线。

linonetwo commented 10 months ago

忘了当时打印当前笔记是不是只开发了一半,因为太微没官方方法得知哪个是当前笔记