Flatpak drivers don't place lvp_icd.x86_64.json file in known location for vulkan_loader

Hi, I’m trying to resolve this issue on Linux Mint (an Ubuntu derivative)

I’m writing an Electron app. Electron is like QT/capacitor/cordova - it’s a cross platform application framework.

Electron bundles Chromium for a UI, and Chromium uses vulkan_loader to find vulkan. Vulkan is a graphics driver abstraction that tries to load nvidia drivers.

TLDR; When Electron starts, it shows this error and fails to load the nvidia drivers:

Warning: loader_get_json: Failed to open JSON file lvp_icd.x86_64.json

That file is here on my system:

> $ sudo find / -type f -iname "lvp_icd.x86_64.json"

And it points to a file that doesn’t exist:

> $ cat /var/lib/flatpak/runtime/org.freedesktop.Platform.GL.default/x86_64/21.08/307acd90a918dcda67368d39b2656402cf0d8947396af0cd8d9b815db852aaa8/files/lib/vulkan/icd.d/lvp_icd.x86_64.json
    "ICD": {
        "api_version": "1.1.195",
        "library_path": "/usr/lib/x86_64-linux-gnu/GL/default/lib/libvulkan_lvp.so"
    "file_format_version": "1.0.0"

> $ ls /usr/lib/x86_64-linux-gnu/GL/default/lib/libvulkan_lvp.so
ls: cannot access '/usr/lib/x86_64-linux-gnu/GL/default/lib/libvulkan_lvp.so': No such file or directory

> $ ls /usr/lib/x86_64-linux-gnu/libvulkan_lvp.so    

How can this error be fixed? Thank you!