Bouni / kicad-jlcpcb-tools

Plugin to generate BOM + CPL files for JLCPCB, assigning LCSC part numbers directly from the plugin, query the JLCPCB parts database, lookup datasheets and much more.
MIT License
1.08k stars 102 forks source link

All mappings are suddenly lost #457

Open cutlasses opened 2 months ago

cutlasses commented 2 months ago

Describe the bug After using the plug-in and entering in many LCSC values the mappings, the mappings I've entered have disappeared. If I click Mappings I can see the part mappings are there but they don't appear on the main menu, and when I generate the files the csvs are empty. I tried to import from a previously exported csv and it loaded the mappings correctly, but they still didn't appear in the main screen.

To Reproduce The method to reproduce is not known to me, I just used the plug-in and the mappings were lost. It might be related to switching context. I find it's possible to accidentally open multiple copies of this plug-in, because it doesn't appear on task bar. MacBook M1 Pro Sonoma 14.4

image image

Expected behavior Mappings to stay until I delete them.

KiCad Version

Application: KiCad PCB Editor arm64 on arm64

Version: 8.0.1, release build

Libraries:
    wxWidgets 3.2.4
    FreeType 2.13.2
    HarfBuzz 8.3.0
    FontConfig 2.15.0
    libcurl/8.4.0 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.12 nghttp2/1.58.0

Platform: macOS Sonoma Version 14.4 (Build 23E214), 64 bit, Little endian, wxMac

Build Info:
    Date: Mar 14 2024 13:30:33
    wxWidgets: 3.2.4 (wchar_t,wx containers)
    Boost: 1.84.0
    OCC: 7.7.2
    Curl: 7.87.0
    ngspice: 42
    Compiler: Clang 14.0.3 with C++ ABI 1002

Build settings:
zeitkunst commented 2 months ago

I also am having this problem on an upgrade to the latest release version, using KiCAD 7.0.9. I downgraded to 2023.09 and the parts and mappings came back. I will remain on 2023.09 until this bug is fixed.

cutlasses commented 2 months ago

I also am having this problem on an upgrade to the latest release version, using KiCAD 7.0.9. I downgraded to 2023.09 and the parts and mappings came back. I will remain on 2023.09 until this bug is fixed.

Presumably to go back a version you need to fetch through Git directly, rather than using KiCad's "Plugin and Content Manager"?

zeitkunst commented 2 months ago

I also am having this problem on an upgrade to the latest release version, using KiCAD 7.0.9. I downgraded to 2023.09 and the parts and mappings came back. I will remain on 2023.09 until this bug is fixed.

Presumably to go back a version you need to fetch through Git directly, rather than using KiCad's "Plugin and Content Manager"?

I first removed the new version, and then I downloaded the 2023.09 version from the Releases section here on Github, so yes, I didn't use KiCAD's Plugin and Content Manager.

cutlasses commented 2 months ago

I also am having this problem on an upgrade to the latest release version, using KiCAD 7.0.9. I downgraded to 2023.09 and the parts and mappings came back. I will remain on 2023.09 until this bug is fixed.

Presumably to go back a version you need to fetch through Git directly, rather than using KiCad's "Plugin and Content Manager"?

I first removed the new version, and then I downloaded the 2023.09 version from the Releases section here on Github, so yes, I didn't use KiCAD's Plugin and Content Manager.

Thanks!

cutlasses commented 2 months ago

Sadly that didn't work for me. I downloaded 2023.09 but the LCSC values didn't come back.

cutlasses commented 2 months ago

I typed all of the LCSCs in again and lost them again, so I'll wait for this bug to be fixed before using again. This time it happened when closing the PCB editor and re-opening (even though I'd clicked "Save Mappings"). EDIT this occurred with the latest code, when reverting to 2023.09 didn't fix anything for me I went back to latest.

Bouni commented 1 day ago

I have a rough idea whats the problem but I'm not sure what going on.

The 3 databases (parts, totations, mappings) are stored under the plugin forlder in jlcpcb:

.\jlcpcb\
├── mappings.db
├── parts-fts5.db
└── rotations.db

In order to update a plugin installed via PCM you need to remove it first, which deletes the entire folder and therefore the databases as well.

I don't know if theres a place to store data "persistent" so that it survices an update ...

cutlasses commented 1 day ago

Is your hypothesis that the loss of mappings will only occur if you install/update a plug-in? I don't think that was the case for me.