Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 无法导入本地的json数据 #4751

Closed
3 tasks
hugo0819 opened this issue May 21, 2024 · 5 comments
Closed
3 tasks

[Bug] 无法导入本地的json数据 #4751

hugo0819 opened this issue May 21, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@hugo0819
Copy link

Bug Description

我原来使用的是2.9.13版本,下载最新的2.12.3版本后,原来导出的本地数据无法导入,导入时直接显示导入失败,请问应该怎么解决?

Steps to Reproduce

在2.9.13版本的设置中选择导出本地数据
在2.12.3版本的设置中选择导入本地数据

Expected Behavior

正常导入所有的聊天数据

Screenshots

No response

Deployment Method

  • Docker
  • Vercel
  • Server

Desktop OS

Windows 10

Desktop Browser

No response

Desktop Browser Version

No response

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

No response

@hugo0819 hugo0819 added the bug Something isn't working label May 21, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: [Bug] Unable to import local json data

@Dean-YZG
Copy link
Contributor

do you have any screenshot about error log in browser devtool, I need know the detail about the error

@hugo0819
Copy link
Author

It only shows import failure and there is no extra display

@Ajianxian
Copy link

Ajianxian commented May 30, 2024

这是因为v2.11.2及以前的版本源码在导出时是使用的二进制格式导出,所以导入时解析失败了。
我的解决方法是本地拉取对应历史版本的代码,然后把utils.ts#L59这块的代码换成最新版本的代码,然后再使用visual studio重新打包出来一个应用程序文件,运行后用新的代码导出文件,就可以正常进行导入了。
或者降级成v2.9.7版本试试,这个版本源码正常,导出的文件应该也是可以正常导入的

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


This is because v2.11.2 and previous version source code uses the binary format when exporting Exported, so parsing failed during import.
My solution is to locally pull the code corresponding to the historical version, then replace the code in utils.ts#L59 with the latest version, and then use visual studio to repackage an application file, and use the new one after running it. The code export file can be imported normally.

@hugo0819 hugo0819 closed this as completed Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants