本地自托管Appflowy踩坑实录

垃圾玩意Appflowy
这段有感而发的文本出自于用了一段时间Appflowy之后真心感受,以下为原文:

我只想说这个狗Appflowy🐶真的是披着开源的外衣做着闭源的恶心勾当,明明在很多种情况下可以很轻松完成的事情,它硬是给你设置一些恶心的不行的限制。比如明明是本地应用,你要使用还必须得再自托管一个本地服务器,要不然就只能用匿名模式。然而匿名模式最坑的就是不能导入数据,而登录之后才行。其次最新版本茅斯只能新建一个用户,然后要提示要付费。我真的*了🐶了,你莫不是忘了你是一个开源的本地应用了,懂技术的知道直接在数据库添加用户,不懂的人与其花钱用你这个🐶东西,难道不会去用notion吗?说实话,是真的被这个🐶软件给气死,之前修下面的问题就耗费很多时间,现在为了导出我的数据(以上有感而发来自于此),又耗费很多时间。

之前用的时候就就一直隐隐感觉这软件不靠谱,不敢在上面记录太多重要的东西,这下子果真应验了,我只能说我还真是🦐了我的🐶👀了,🤬🤬🤬

按照官方教程部署完docker环境后,从localhost后台管理界面死活登录不进去。

  • 怀疑是数据库配置问题,创建了另一个管理员账号,还是无法登录。而且最开始的管理员账号在数据库里提示已经成功登录过。

  • 网页端开发者工具检查确实已经成功登录(返回200),但是还是提示密码/邮箱错误。docker端端log也提示已经成功登录,但是就是不跳转界面。

  • 再怀疑是.env文件夹配置错误,仔细检查每一行,没有任何问题。

  • 再怀疑可能是浏览器跨域拦截或者localhost缓存残留,更换浏览器和尝试无痕模式,还是不行。

  •  使用docker compose logs -f admin_frontend 仔细查看log,终于找到蛛丝马迹,然后成功破案。

 
    

    [01:28:01] 🚨 [ServerFetch] [CRITICAL] Server fetch failed: {
        admin_frontend-1  |   name: 'AppFlowy verify user',
        admin_frontend-1  |   url: 'http://localhost/api/user/verify/[redacted]',
        admin_frontend-1  |   method: 'GET',
        admin_frontend-1  |   error: {
        admin_frontend-1  |     name: 'TypeError',
        admin_frontend-1  |     message: 'fetch failed',
        admin_frontend-1  |     stack: 'TypeError: fetch failed\n' +
        admin_frontend-1  |       '    at node:internal/deps/undici/undici:14976:13\n' +
        admin_frontend-1  |       '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
        admin_frontend-1  |       '    at async m (/app/apps/super/.next/server/chunks/7319.js:1:1216)\n' +
        admin_frontend-1  |       '    at async t (/app/apps/super/.next/server/chunks/7319.js:1:3760)\n' +
        admin_frontend-1  |       '    at async u (/app/apps/super/.next/server/chunks/7319.js:1:4726)\n' +
        admin_frontend-1  |       '    at async t4 (/app/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:2454)\n' +
        admin_frontend-1  |       '    at async /app/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:15:1271\n' +
        admin_frontend-1  |       '    at async t2 (/app/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:14:14859)\n' +
        admin_frontend-1  |       '    at async nQ (/app/node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:20:23704)\n' +
        admin_frontend-1  |       '    at async m (/app/apps/super/.next/server/app/login/page.js:1:8124)',
        admin_frontend-1  |     cause: {
        admin_frontend-1  |       name: 'AggregateError',
        admin_frontend-1  |       message: '',
        admin_frontend-1  |       stack: 'AggregateError: \n' +
        admin_frontend-1  |         '    at internalConnectMultiple (node:net:1122:18)\n' +
        admin_frontend-1  |         '    at afterConnectMultiple (node:net:1689:7)\n' +
        admin_frontend-1  |         '    at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17)'
        admin_frontend-1  |     }
        admin_frontend-1  |   }
        admin_frontend-1  | }
    

解决方案
一切都是源于万恶的docker容器的网络隔离,之前也是因为同样的原因配置Open WebUI的时候死活连不上本地模型的API。这里只需要修改.env文件里的FQDN为本机局域网ip,然后通过ip/console即可正常登录。

✍️ 作者:𝓧

📄 共享协议: CC 4.0协议

🔗 原文链接: https://blog.allomaker.com/archives/ben-di-zi-tuo-guan-appflowycai-keng-shi-lu

评论