[problem help] 我想用 notion 笔记软件
Tofloor
poster avatar
LJTian
deepin
2023-10-31 22:08
Author

下载地址

https://github.com/notion-enhancer/notion-repackaged/releases

安装后一直转圈圈

image.png

不知道是什么原因,能提供一版兼容之后的 notion 吗?

Reply Favorite View the author
All Replies
Ziggy
deepin
2023-10-31 23:39
#1

看了下这个程序要联网加载UI界面,比较接近网页应用,国内网络环境体验可能不是很好

可以试试这款比较热门的笔记app :Joplin
图片.png

Reply View the author
安洛
deepin
2023-11-01 00:16
#2

我也猜是网络问题。你的网络能正常打开notion网页版吗?

Reply View the author
四月的麋鹿
deepin
2023-11-01 01:55
#3

推荐一款类似的 flowus 个人感觉还行

Reply View the author
把一切操作变成GUI
deepin
Backbone of ecological co-construction group
2023-11-01 02:33
#4

你挂个梯子看看

Reply View the author
LJTian
deepin
2023-11-06 18:27
#5
Ziggy

看了下这个程序要联网加载UI界面,比较接近网页应用,国内网络环境体验可能不是很好

可以试试这款比较热门的笔记app :Joplin
图片.png

不考虑更换笔记软件

Reply View the author
LJTian
deepin
2023-11-06 18:27
#6
安洛

我也猜是网络问题。你的网络能正常打开notion网页版吗?

页面端是正常的

Reply View the author
LJTian
deepin
2023-11-06 18:28
#7
把一切操作变成GUI

你挂个梯子看看

不好使,我试过了

Reply View the author
安洛
deepin
2023-11-06 19:53
#8
LJTian

页面端是正常的

我找了一下,发现这是软件自己的bug:https://github.com/notion-enhancer/notion-repackaged/issues/116

这是因为notion官方更新了它们的api,而软件这边没来得及更新。目前最好的解决办法是等待软件作者更新软件。或者,你可以根据这个issue里面的指引手动修改软件代码。(下面有人做了中文版总结:https://github.com/notion-enhancer/notion-repackaged/issues/116#issuecomment-1791856707,虽然说win端的,不过大体上可以参考)

Reply View the author
LJTian
deepin
2023-11-08 02:14
#9
安洛

我找了一下,发现这是软件自己的bug:https://github.com/notion-enhancer/notion-repackaged/issues/116

这是因为notion官方更新了它们的api,而软件这边没来得及更新。目前最好的解决办法是等待软件作者更新软件。或者,你可以根据这个issue里面的指引手动修改软件代码。(下面有人做了中文版总结:https://github.com/notion-enhancer/notion-repackaged/issues/116#issuecomment-1791856707,虽然说win端的,不过大体上可以参考)

确实可以,我已经修改好了

Reply View the author
LJTian
deepin
2023-11-08 02:15
#10
It has been deleted!
LJTian
deepin
2023-11-08 02:31
#11

Notion 桌面版本不能使用的解决方式

来源: https://github.com/notion-enhancer/notion-repackaged/issues/116

解决方式

The solution is a bit all over the place, so here's the solution combined into one comment:

Install asar(安装解压工具 asar)

npm install -g asar

Go to /opt/Notion/resources/

cd /opt/Notion/resources/

Extract the contents(解压文件)

sudo asar extract app.asar app

change code(修改代码)

vim ./app/renderer/preload.js

Paste the following code at the end of ./app/renderer/preload.js(在文件最后面添加下面的代码)

(function __polyfill_2() {
    function getClientHints(navigator) {
        let { userAgent } = navigator;
        let mobile, platform = '', platformVersion = '', architecture = '', bitness = '', model = '', uaFullVersion = '', fullVersionList = [];
        let platformInfo = userAgent;
        let found = false;
        let versionInfo = userAgent.replace(/\\(([^)]+)\\)?/g, ($0, $1) => {
            if (!found) {
                platformInfo = $1;
                found = true;
            }
            return '';
        });
        let items = versionInfo.match(/(\\S+)\\/(\\S+)/g);
        let webview = false;
        // detect mobile
        mobile = userAgent.indexOf('Mobile') !== -1;
        let m;
        let m2;
        // detect platform
        if ((m = /Windows NT (\\d+(\\.\\d+)*)/.exec(platformInfo)) !== null) {
            platform = 'Windows';
            // see 
            let nt2win = {
                '6.1': '0.1', // win-7
                '6.2': '0.2', // win-8
                '6.3': '0.3', // win-8.1
                '10.0': '10.0', // win-10
                '11.0': '13.0', // win-11
            };
            let ver = nt2win[m[1]];
            if (ver)
                platformVersion = padVersion(ver, 3);
            if ((m2 = /\\b(WOW64|Win64|x64)\\b/.exec(platformInfo)) !== null) {
                architecture = 'x86';
                bitness = '64';
            }
        } else if ((m = /Android (\\d+(\\.\\d+)*)/.exec(platformInfo)) !== null) {
            platform = 'Android';
            platformVersion = padVersion(m[1]);
            if ((m2 = /Linux (\\w+)/.exec(navigator.platform)) !== null) {
                if (m2[1]) {
                    m2 = parseArch(m2[1]);
                    architecture = m2[0];
                    bitness = m2[1];
                }
            }
        } else if ((m = /(iPhone|iPod touch); CPU iPhone OS (\\d+(_\\d+)*)/.exec(platformInfo)) !== null) {
            // see special notes at 
            platform = 'iOS';
            platformVersion = padVersion(m[2].replace(/_/g, '.'));
        } else if ((m = /(iPad); CPU OS (\\d+(_\\d+)*)/.exec(platformInfo)) !== null) {
            platform = 'iOS';
            platformVersion = padVersion(m[2].replace(/_/g, '.'));
        } else if ((m = /Macintosh; (Intel|\\w+) Mac OS X (\\d+(_\\d+)*)/.exec(platformInfo)) !== null) {
            platform = 'macOS';
            platformVersion = padVersion(m[2].replace(/_/g, '.'));
        } else if ((m = /Linux/.exec(platformInfo)) !== null) {
            platform = 'Linux';
            platformVersion = '';
            // TODO
        } else if ((m = /CrOS (\\w+) (\\d+(\\.\\d+)*)/.exec(platformInfo)) !== null) {
            platform = 'Chrome OS';
            platformVersion = padVersion(m[2]);
            m2 = parseArch(m[1]);
            architecture = m2[0];
            bitness = m2[1];
        }
        if (!platform) {
            platform = 'Unknown';
        }
        // detect fullVersionList / brands
        let notABrand = { brand: ' Not;A Brand', version: '99.0.0.0' };
        if ((m = /Chrome\\/(\\d+(\\.\\d+)*)/.exec(versionInfo)) !== null && navigator.vendor === 'Google Inc.') {
            fullVersionList.push({ brand: 'Chromium', version: padVersion(m[1], 4) });
            if ((m2 = /(Edge?)\\/(\\d+(\\.\\d+)*)/.exec(versionInfo)) !== null) {
                let identBrandMap = {
                    'Edge': 'Microsoft Edge',
                    'Edg': 'Microsoft Edge',
                };
                let brand = identBrandMap[m[1]];
                fullVersionList.push({ brand: brand, version: padVersion(m2[2], 4) });
            } else {
                fullVersionList.push({ brand: 'Google Chrome', version: padVersion(m[1], 4) });
            }
            if (/\\bwv\\b/.exec(platformInfo)) {
                webview = true;
            }
        } else if ((m = /AppleWebKit\\/(\\d+(\\.\\d+)*)/.exec(versionInfo)) !== null && navigator.vendor === 'Apple Computer, Inc.') {
            fullVersionList.push({ brand: 'WebKit', version: padVersion(m[1]) });
            if (platform === 'iOS' && (m2 = /(CriOS|EdgiOS|FxiOS|Version)\\/(\\d+(\\.\\d+)*)/.exec(versionInfo)) != null) {
                let identBrandMap = { // no
                    'CriOS': 'Google Chrome',
                    'EdgiOS': 'Microsoft Edge',
                    'FxiOS': 'Mozilla Firefox',
                    'Version': 'Apple Safari',
                };
                let brand = identBrandMap[m2[1]];
                fullVersionList.push({ brand, version: padVersion(m2[2]) });
                if (items.findIndex((s) => s.startsWith('Safari/')) === -1) {
                    webview = true;
                }
            }
        } else if ((m = /Firefox\\/(\\d+(\\.\\d+)*)/.exec(versionInfo)) !== null) {
            fullVersionList.push({ brand: 'Firefox', version: padVersion(m[1]) });
        } else if ((m = /(MSIE |rv:)(\\d+\\.\\d+)/.exec(platformInfo)) !== null) {
            fullVersionList.push({ brand: 'Internet Explorer', version: padVersion(m[2]) });
        } else {
            fullVersionList.push(notABrand);
        }
        uaFullVersion = fullVersionList.length > 0 ? fullVersionList[fullVersionList.length - 1] : '';
        let brands = fullVersionList.map((b) => {
            let pos = b.version.indexOf('.');
            let version = pos === -1 ? b.version : b.version.slice(0, pos);
            return { brand: b.brand, version };
        });
        // TODO detect architecture, bitness and model
        return {
            mobile,
            platform,
            brands,
            platformVersion,
            architecture,
            bitness,
            model,
            uaFullVersion,
            fullVersionList,
            webview
        };
    }

    function parseArch(arch) {
        switch (arch) {
            case 'x86_64':
            case 'x64':
                return ['x86', '64'];
            case 'x86_32':
            case 'x86':
                return ['x86', ''];
            case 'armv6l':
            case 'armv7l':
            case 'armv8l':
                return [arch, ''];
            case 'aarch64':
                return ['arm', '64'];
            default:
                return ['', ''];
        }
    }
    function padVersion(ver, minSegs = 3) {
        let parts = ver.split('.');
        let len = parts.length;
        if (len < minSegs) {
            for (let i = 0, lenToPad = minSegs - len; i < lenToPad; i += 1) {
                parts.push('0');
            }
            return parts.join('.');
        }
        return ver;
    }

    class NavigatorUAData {
        constructor() {
            this._ch = getClientHints(navigator);
            Object.defineProperties(this, {
                _ch: { enumerable: false },
            });
        }
        get mobile() {
            return this._ch.mobile;
        }
        get platform() {
            return this._ch.platform;
        }
        get brands() {
            return this._ch.brands;
        }
        getHighEntropyValues(hints) {
            return new Promise((resolve, reject) => {
                if (!Array.isArray(hints)) {
                    throw new TypeError('argument hints is not an array');
                }
                let hintSet = new Set(hints);
                let data = this._ch;
                let obj = {
                    mobile: data.mobile,
                    platform: data.platform,
                    brands: data.brands,
                };
                if (hintSet.has('architecture'))
                    obj.architecture = data.architecture;
                if (hintSet.has('bitness'))
                    obj.bitness = data.bitness;
                if (hintSet.has('model'))
                    obj.model = data.model;
                if (hintSet.has('platformVersion'))
                    obj.platformVersion = data.platformVersion;
                if (hintSet.has('uaFullVersion'))
                    obj.uaFullVersion = data.uaFullVersion;
                if (hintSet.has('fullVersionList'))
                    obj.fullVersionList = data.fullVersionList;
                resolve(obj);
            });
        }
        toJSON() {
            let data = this._ch;
            return {
                mobile: data.mobile,
                brands: data.brands,
            };
        }
    }
    Object.defineProperty(NavigatorUAData.prototype, Symbol.toStringTag, {
        enumerable: false,
        configurable: true,
        writable: false,
        value: 'NavigatorUAData'
    });

    function ponyfill() {
        return new NavigatorUAData(navigator);
    }
    function polyfill() {
        console.log("Try polyfill .  .  .");

        // When Notion , no need https?
        const ____use_https = false;

        if (
            (!____use_https || location.protocol === 'https:')
            && !navigator.userAgentData
        ) {
            console.log("Here,begin userAgentData polyfill .  .  .")
            let userAgentData = new NavigatorUAData(navigator);
            Object.defineProperty(Navigator.prototype, 'userAgentData', {
                enumerable: true,
                configurable: true,
                get: function getUseAgentData() {
                    return userAgentData;
                }
            });
            Object.defineProperty(window, 'NavigatorUAData', {
                enumerable: false,
                configurable: true,
                writable: true,
                value: NavigatorUAData
            });
            return true;
        }
        return false;
    }

    // Simple Apply this code.
    ponyfill();
    polyfill();
})();

Repack(重新打包)

sudo asar pack app app.asar

再次打开Notion

Reply View the author
188******09
deepin
2023-11-24 21:19
#12

Mybase Desktop 感觉也不错的

Reply View the author
Breach66
deepin
2024-05-27 22:05
#13
LJTian

Notion 桌面版本不能使用的解决方式

来源: https://github.com/notion-enhancer/notion-repackaged/issues/116

解决方式

The solution is a bit all over the place, so here's the solution combined into one comment:

Install asar(安装解压工具 asar)

npm install -g asar

Go to /opt/Notion/resources/

cd /opt/Notion/resources/

Extract the contents(解压文件)

sudo asar extract app.asar app

change code(修改代码)

vim ./app/renderer/preload.js

Paste the following code at the end of ./app/renderer/preload.js(在文件最后面添加下面的代码)

(function __polyfill_2() {
    function getClientHints(navigator) {
        let { userAgent } = navigator;
        let mobile, platform = '', platformVersion = '', architecture = '', bitness = '', model = '', uaFullVersion = '', fullVersionList = [];
        let platformInfo = userAgent;
        let found = false;
        let versionInfo = userAgent.replace(/\\(([^)]+)\\)?/g, ($0, $1) => {
            if (!found) {
                platformInfo = $1;
                found = true;
            }
            return '';
        });
        let items = versionInfo.match(/(\\S+)\\/(\\S+)/g);
        let webview = false;
        // detect mobile
        mobile = userAgent.indexOf('Mobile') !== -1;
        let m;
        let m2;
        // detect platform
        if ((m = /Windows NT (\\d+(\\.\\d+)*)/.exec(platformInfo)) !== null) {
            platform = 'Windows';
            // see 
            let nt2win = {
                '6.1': '0.1', // win-7
                '6.2': '0.2', // win-8
                '6.3': '0.3', // win-8.1
                '10.0': '10.0', // win-10
                '11.0': '13.0', // win-11
            };
            let ver = nt2win[m[1]];
            if (ver)
                platformVersion = padVersion(ver, 3);
            if ((m2 = /\\b(WOW64|Win64|x64)\\b/.exec(platformInfo)) !== null) {
                architecture = 'x86';
                bitness = '64';
            }
        } else if ((m = /Android (\\d+(\\.\\d+)*)/.exec(platformInfo)) !== null) {
            platform = 'Android';
            platformVersion = padVersion(m[1]);
            if ((m2 = /Linux (\\w+)/.exec(navigator.platform)) !== null) {
                if (m2[1]) {
                    m2 = parseArch(m2[1]);
                    architecture = m2[0];
                    bitness = m2[1];
                }
            }
        } else if ((m = /(iPhone|iPod touch); CPU iPhone OS (\\d+(_\\d+)*)/.exec(platformInfo)) !== null) {
            // see special notes at 
            platform = 'iOS';
            platformVersion = padVersion(m[2].replace(/_/g, '.'));
        } else if ((m = /(iPad); CPU OS (\\d+(_\\d+)*)/.exec(platformInfo)) !== null) {
            platform = 'iOS';
            platformVersion = padVersion(m[2].replace(/_/g, '.'));
        } else if ((m = /Macintosh; (Intel|\\w+) Mac OS X (\\d+(_\\d+)*)/.exec(platformInfo)) !== null) {
            platform = 'macOS';
            platformVersion = padVersion(m[2].replace(/_/g, '.'));
        } else if ((m = /Linux/.exec(platformInfo)) !== null) {
            platform = 'Linux';
            platformVersion = '';
            // TODO
        } else if ((m = /CrOS (\\w+) (\\d+(\\.\\d+)*)/.exec(platformInfo)) !== null) {
            platform = 'Chrome OS';
            platformVersion = padVersion(m[2]);
            m2 = parseArch(m[1]);
            architecture = m2[0];
            bitness = m2[1];
        }
        if (!platform) {
            platform = 'Unknown';
        }
        // detect fullVersionList / brands
        let notABrand = { brand: ' Not;A Brand', version: '99.0.0.0' };
        if ((m = /Chrome\\/(\\d+(\\.\\d+)*)/.exec(versionInfo)) !== null && navigator.vendor === 'Google Inc.') {
            fullVersionList.push({ brand: 'Chromium', version: padVersion(m[1], 4) });
            if ((m2 = /(Edge?)\\/(\\d+(\\.\\d+)*)/.exec(versionInfo)) !== null) {
                let identBrandMap = {
                    'Edge': 'Microsoft Edge',
                    'Edg': 'Microsoft Edge',
                };
                let brand = identBrandMap[m[1]];
                fullVersionList.push({ brand: brand, version: padVersion(m2[2], 4) });
            } else {
                fullVersionList.push({ brand: 'Google Chrome', version: padVersion(m[1], 4) });
            }
            if (/\\bwv\\b/.exec(platformInfo)) {
                webview = true;
            }
        } else if ((m = /AppleWebKit\\/(\\d+(\\.\\d+)*)/.exec(versionInfo)) !== null && navigator.vendor === 'Apple Computer, Inc.') {
            fullVersionList.push({ brand: 'WebKit', version: padVersion(m[1]) });
            if (platform === 'iOS' && (m2 = /(CriOS|EdgiOS|FxiOS|Version)\\/(\\d+(\\.\\d+)*)/.exec(versionInfo)) != null) {
                let identBrandMap = { // no
                    'CriOS': 'Google Chrome',
                    'EdgiOS': 'Microsoft Edge',
                    'FxiOS': 'Mozilla Firefox',
                    'Version': 'Apple Safari',
                };
                let brand = identBrandMap[m2[1]];
                fullVersionList.push({ brand, version: padVersion(m2[2]) });
                if (items.findIndex((s) => s.startsWith('Safari/')) === -1) {
                    webview = true;
                }
            }
        } else if ((m = /Firefox\\/(\\d+(\\.\\d+)*)/.exec(versionInfo)) !== null) {
            fullVersionList.push({ brand: 'Firefox', version: padVersion(m[1]) });
        } else if ((m = /(MSIE |rv:)(\\d+\\.\\d+)/.exec(platformInfo)) !== null) {
            fullVersionList.push({ brand: 'Internet Explorer', version: padVersion(m[2]) });
        } else {
            fullVersionList.push(notABrand);
        }
        uaFullVersion = fullVersionList.length > 0 ? fullVersionList[fullVersionList.length - 1] : '';
        let brands = fullVersionList.map((b) => {
            let pos = b.version.indexOf('.');
            let version = pos === -1 ? b.version : b.version.slice(0, pos);
            return { brand: b.brand, version };
        });
        // TODO detect architecture, bitness and model
        return {
            mobile,
            platform,
            brands,
            platformVersion,
            architecture,
            bitness,
            model,
            uaFullVersion,
            fullVersionList,
            webview
        };
    }

    function parseArch(arch) {
        switch (arch) {
            case 'x86_64':
            case 'x64':
                return ['x86', '64'];
            case 'x86_32':
            case 'x86':
                return ['x86', ''];
            case 'armv6l':
            case 'armv7l':
            case 'armv8l':
                return [arch, ''];
            case 'aarch64':
                return ['arm', '64'];
            default:
                return ['', ''];
        }
    }
    function padVersion(ver, minSegs = 3) {
        let parts = ver.split('.');
        let len = parts.length;
        if (len < minSegs) {
            for (let i = 0, lenToPad = minSegs - len; i < lenToPad; i += 1) {
                parts.push('0');
            }
            return parts.join('.');
        }
        return ver;
    }

    class NavigatorUAData {
        constructor() {
            this._ch = getClientHints(navigator);
            Object.defineProperties(this, {
                _ch: { enumerable: false },
            });
        }
        get mobile() {
            return this._ch.mobile;
        }
        get platform() {
            return this._ch.platform;
        }
        get brands() {
            return this._ch.brands;
        }
        getHighEntropyValues(hints) {
            return new Promise((resolve, reject) => {
                if (!Array.isArray(hints)) {
                    throw new TypeError('argument hints is not an array');
                }
                let hintSet = new Set(hints);
                let data = this._ch;
                let obj = {
                    mobile: data.mobile,
                    platform: data.platform,
                    brands: data.brands,
                };
                if (hintSet.has('architecture'))
                    obj.architecture = data.architecture;
                if (hintSet.has('bitness'))
                    obj.bitness = data.bitness;
                if (hintSet.has('model'))
                    obj.model = data.model;
                if (hintSet.has('platformVersion'))
                    obj.platformVersion = data.platformVersion;
                if (hintSet.has('uaFullVersion'))
                    obj.uaFullVersion = data.uaFullVersion;
                if (hintSet.has('fullVersionList'))
                    obj.fullVersionList = data.fullVersionList;
                resolve(obj);
            });
        }
        toJSON() {
            let data = this._ch;
            return {
                mobile: data.mobile,
                brands: data.brands,
            };
        }
    }
    Object.defineProperty(NavigatorUAData.prototype, Symbol.toStringTag, {
        enumerable: false,
        configurable: true,
        writable: false,
        value: 'NavigatorUAData'
    });

    function ponyfill() {
        return new NavigatorUAData(navigator);
    }
    function polyfill() {
        console.log("Try polyfill .  .  .");

        // When Notion , no need https?
        const ____use_https = false;

        if (
            (!____use_https || location.protocol === 'https:')
            && !navigator.userAgentData
        ) {
            console.log("Here,begin userAgentData polyfill .  .  .")
            let userAgentData = new NavigatorUAData(navigator);
            Object.defineProperty(Navigator.prototype, 'userAgentData', {
                enumerable: true,
                configurable: true,
                get: function getUseAgentData() {
                    return userAgentData;
                }
            });
            Object.defineProperty(window, 'NavigatorUAData', {
                enumerable: false,
                configurable: true,
                writable: true,
                value: NavigatorUAData
            });
            return true;
        }
        return false;
    }

    // Simple Apply this code.
    ponyfill();
    polyfill();
})();

Repack(重新打包)

sudo asar pack app app.asar

再次打开Notion

无敌了  
Reply View the author