An abnormal character in the object header causes the entire Type, the Set containing the object, and the Graph view to crash

After I imported some notes from Logseq (md local documents), I had a problem with my Page Type.

Current Known Issues

  • All imported md documents cannot be displayed in Page Type
  • After I migrated all non-imported Objects in Page Type. The number of objects on the Page page is not 0, but any objects cannot be displayed.


A problematic document retrieved by exporting

bafyreia23hfgbtyysss7pd3tdvd4li7gjfafxj2f26473ounlgdkjutecy.pb.json (15.0 KB)

This report has been added to our issue tracker and received by the Development Team.

@Xonline can you please export the problematic document as Protobuf Any-Block format?

Our devs are unable to reproduce this because .json does not keep the abnormal character.

Thanks!

1 Like

I am glad to receive your reply, this is an export of one of the error documents, because I filtered the error results (90) by search SourcePath in json, now I only extracted one document from the whole note, when you need more documents, please contact me.

bafyreia23hfgbtyysss7pd3tdvd4li7gjfafxj2f26473ounlgdkjutecy.pb.zip (4.3 KB)

In addition, I currently exported the space through json, re-registered an account and imported the data. At present, everything looks normal for the new account. What I want to ask is whether I can migrate my old space to another space under the same account in the future multi-space? And delete the old space under the account completely or delete all objects under the Page Type (I am currently unable to see in the notes with these error documents), because I want to keep the storage space of the reward to the account

You can, but I wanted to check where is the bug actually =)

3 Likes

This is the corresponding markdown document that I imported into this article. If it cannot be reproduced, please contact me again. I have more document contents.

货币资金.zip (2.3 KB)

Did you identify the problematic symbol? It does reproduce for me and broke my account partially because searches with this document stopped working.

2 Likes

I’m having the same issue here. It seems that importing a zip file of markdown that contains CJK characters causes the space to crash. The default type for imported markdown is Page, and any set containing these pages will not display the content. As a result, I am unable to locate and delete the problematic pages causing this issue. For now, I have created a new space to start from scratch, it would be great if this issue could be fixed or if I could simply delete the corrupted original space (currently there’s no delete button for the original space.)

1 Like

My English is not good, in order to prevent the content of the machine translation is not accurate, I use the BlockQuoto to retain the simplified Chinese original, do not understand the place please translate according to the original, if you still do not understand please reply to my content

我的英文不好,为了防止机器翻译的内容不准确,我使用BlockQuoto保留了简体中文的原文,有不理解的地方请您根据原文自行翻译一下,如果还是不懂请回复我的内容

I fixed the space where I had the problem. I don’t know if it is effective for you. First of all, it is clear that exporting JSON content and re-importing other spaces can fix this problem. However, there will be problems such as the relationship being locked, so I recommend you to use the following method to restore the original space.

我对我出现问题的空间进行了修复,这不知道对你是否有效,首先可以明确的一点是导出JSON内容再重新导入其他空间是可以修复这个问题的。但是会出现关系被锁定之类的问题,所以我推荐你使用以下方法在原空间上恢复。

  1. First export a full space content in Protufo format as a backup

首先导出一份Protufo格式的全部空间内容作为备份


  1. First, use the JSON format to export all the contents of the space and extract the zip file.

首先使用JSON格式导出空间全部内容,并解压zip文件

  1. Find the uniform characteristics of all problem objects

找到所有问题对象的统一特征

Use the editor (VSCode or other) to globally search for the ‘sourceFilePath’ text and find the unified ID you imported, for example, mine is the file path.Finaunce1\\pages\\\

使用编辑器(VSCode或者其他)全局搜索sourceFilePath文本,找到你导入的统一标识,例如我的是文件路径Finaunce1\\pages\\\

  1. **Retrieve the file names of all problematic files, and the file name is also the ID of the problematic object **

检索出所有有问题的文件的文件名称,文件的名称也是问题对象的ID

Using the advanced search tool of the Everything software, search for all text contents containing unified identification under the decompression folder, and wait for the search to be completed, select all files, copy all file paths and paste them into the editor, and remove the previous path and the back’. pb.json’, so you can get all the object ids with problems.

使用Everything软件的高级搜索工具,搜索解压文件夹下,所有包含统一标识的文本内容,并等待搜索完成后,全选文件,复制全部文件路径粘贴到编辑器中,将前面的路径以及后面的.pb.json去掉,这样你就得出了所有存在问题的对象id。





  1. **Create some objects to prepare for the next deletion **

创建一些对象,为下一步删除做准备

Open the problematic space, create a collection, and create a new object. In the collection of creation, copy the object repeatedly until the number is more than 30 (remember not to rename each copied object, keep its name consistent, preferably unique in the entire space).

打开有问题的空间,创建一个collection,并新建一个对象,在创建的collection中,反复复制这个对象直到数量差不多有30多个(记得不要重新命名每个复制的对象,让他的名字保持一致,最好是在整个空间中唯一的)。


  1. Move the object you just created to Bin

将刚刚创建的对象Move to Bin

Batch select all objects in the collection and move to bin. Then we go to Bin and select these new objects (if Bin is also contaminated by the wrong object, he will not load the content back, at this time we can find out the newly deleted content by searching the object name in the upper right corner)

将collection中的所有对象批量选择,并move to bin。然后我们转到Bin中,选择这些新建的对象(如果Bin也被错误的对象污染了,他就不回加载出内容,这时候我们可以通过右上角搜索对象名字找出刚刚删除的内容)

  1. After replacing content through developer tools, ** don’t click delete first! **.

通过开发者工具替换内容后,先别点击删除!

Select the content you just deleted in All

在全部选择刚刚删除的内容

Let’s go to developer tools. Click the Sources tab above. Find the following location’/anytype/src/ts/lib/api/command.ts’ in turn, search’ ObjectListDelete’, click the line below, and type Debug (a blue arrow will appear after clicking)

我们进入到开发者工具。点击上方Sources选项卡。依次找到如下位置/anytype/src/ts/lib/api/command.ts,搜索ObjectListDelete,点击下面的一行,打个Debug(点击后会出现蓝色箭头)

Then we click the delete button

然后我们点击删除按钮

At this time, we will enter Debug. We mainly find the ids on the right and expand it.

这时候会进入Debug,我们主要找到右侧的ids这个内容,展开它。

The content is the ID of the object we just selected. We double-click the content in each id and replace them with the problematic id sorted out in step 4 (remember to manually add’ "'before and after the replaced id)

其中内容是刚刚我们选中的对象的ID,我们双击每一个id中的内容,并将他们替换为我们第4步整理的存在问题的id(记得在替换的id前后手动添加
image

When all the contents in the ids list have been replaced (if there is still content, we can repeat step 7), we click any arrow icon in the picture.

当ids列表中的内容都被替换完成以后(如果还有内容我们重复第7步骤就可以了),我们点击图片中的任意一个箭头图标

OK, we deleted some wrong objects. At this time, you will find that the contents just selected in the page have not been deleted. We can reuse them until we finish deleting the wrong objects.

好的,我们删除了一些错误的对象,这时候你会发现刚刚在页面中选中的内容并没有被删除,我们可以重复利用他们,直到完成我们的错误的对象的删除工作。

  1. Verify that the affected Type is back to normal, Cheers!

验证受影响的Type是否恢复正常,Cheers!

1 Like

Thank you for your reply! What a detailed guide and clear explaination. Ihope everyone who’s having this issue can see this! It may be difficult to read my excitement from my words, but I followed your instructions step by step and not only did it truly fix my issue, but also preserved most of my notes that were not causing the issue. You have put an end to my weeks of headache, and I can finally say goodbye to notepad.exe! Thank you again my friend, and may God bless your kindness!

Here is a summary of the problems I encountered and the solutions I found while following your steps, to provide a more noob (like me) friendly explaination for the community.

TLDR; the general idea of this approach is to 1) identify the IDs of corrupted objects using various methods, and 2) capture the delete operations of removing objects from the bin, and then replace the IDs of these operations with the IDs of the corrupted objects found in the previous step.

To identify the corrupted objects, you can recall the method used during the import that caused the issue. In my case, I imported a zip file containing a bunch of markdown files, so the sourceFilePath didn’t have a specific path. I directly searched for all sourceFilePaths that ended with .md and obtained the IDs of those files using the same method.

Then in the second step, after locating the command.ts file, I clicked on the content area of the file and used Ctrl + F to bring up the search box. By clicking on the line number in the image, the blue highlight arrow like symbol shown in the image would appear. (My understanding is that it indicates the code will stop executing at that line until you click the blue continue button). At this point, I selected those dozens of objects, chose “delete from bin,” and a new window appeared on the right. There, I found the ids and expanded them, saw a list of IDs. I replaced them one by one, and once the replacement was done, I clicked the blue arrow to continue.

all in all, thanks again @Xonline for your reply. it’s actually the first time i ever open up the Source tab of the devtool. feel like a hacker boy now. :man_technologist: