Skip to content

[Bug]: Upgrade from 3.12.1 to 4.0.4 - many scripts lost!!! #617

Closed as not planned

Description

@Alcance-PT

Describe the bug

Hi,
I had used MassCode to store several scripts, notes, etc organized in folders and sub-folders.
Since I work with 3 PCs, to keep everything synced I select a folder in onedrive for storage.

Today I had update MassCode from 3.12.1 to 4,0.4 and found that many of my snippets disappeared - not all but several of them.
As I told, I organize in folders and sub-folders, and several folders are completely empty (no snippets) others have their content on - a complete mess.

I did recover a last week backup of the 3.12.1 storage, uninstall Masscode, delete all references on %APPDATA%, install again MassCode 4.0.4 - the storage was set to a local sub-folder of my user folder.
Without any data on this install, I try to use the "Import from v3" option, and got exactly the same result - several snippets are missing, many folders are empty.

This is an example - look at SQL folder - No snippets on v4.0.4:

Image

In preferences\storage\count I have the same number of snippets in both versions (v4.0.4 even shows the correct number of items in Trash).

Any suggestion (apart from open both versions on 2 different PCs and use a remote access to copy-paste every snippet from one computer to the other - but even with all this work I will lost the last update date of each snippet, which in several cases is important)?

TIA,
Carlos

To reproduce

Have data on v3.12.1 and migrate to 4.0.4.

App Version and Architecture

4.0.4 Windows 11 x64

System info

Windows 11 24H2 64 bits

Validations

Activity

  1. antonreshetov commented on Oct 13, 2025

    @antonreshetov
    Member

    It appears that db.json has a damaged structure, which may be the result of synchronization via cloud storage. Migration proceeds normally when db.json has a correct structure.

  2. github-actions commented on Oct 13, 2025

    @github-actions

    Hello @Alcance-PT. Please describe in detail the sequence of actions that leads to the bug (skip it if it's already there). Add screenshots of errors from the console. If possible add a video. Issues marked with need reproduction will be closed if they have no activity within 3 days.

  3. bw-79 commented on Oct 16, 2025

    @bw-79

    I have exactly the same issue. Some Folders are empty, "All snippets" does not work at all. I tried importing the JSON file again but it did not help. When searching / selecting folders I get the following error messages:

    Image
  4. sunnyt7 commented on Dec 30, 2025

    @sunnyt7

    fwiw I'm having the exact same issue.

  5. bw-79 commented on Dec 30, 2025

    @bw-79

    I managed to fix the issue for me. I found out that it was caused by snippets in my v3 json file not having a language set. Try searching for "language": null and replace it with "language": "plain_text". I was then able to convert the json to the new database file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions