Praxxian/lava-flow

“please select one or more file”

Superelmanu opened this issue · 17 comments

Hello, I'm at a lost. I tried to make it work, but Lava Flow keep asking me to pick a file.
“please select one or more file”
It doesn't seam to be able to pick any folder or see any files.
What am I missing?
I'm on v 0.13.18 of Obsidian and Version 9 - Build 238 of the foundry.

Best
Manu

The folder picker hides files. Confirm in your native file browser that the folder you are selecting contains files.

You will want to make sure the field "Folder" at the bottom of the folder picker has the actual folder you want. Sometimes it opens up within a folder without that folder being selected, and you just need to go up one level and click the folder you want.

This really isn't custom code on my part. This is how the HTML input element works for folders.

For example, if the folder I want is called "vault" and it opens up in that folder, sometimes it is not selected at the bottom of the picker:
image

I have *.MD file in the Obsidian folder.
The Obsidian folder is selected in the folder field.
When I'm importing, it is still asking me “please select one or more file”.

I would love to use this add-on. Please help me out to understand what's going on?

What browser and OS are you using?

  1. Open your browser's console. (F12 for most browsers)
  2. Open the import dialog from the journal tab.
  3. Try importing the folder using the steps you have been using.

Do you receive any errors during this?

I'm using the desktop application for the foundry.

The cool thing is that the desktop foundry does have a console accessible by pressing F12.

FoundryVTT_Lava_flowC.zip

I uploaded a video of what is happening. Let me know if it's helpful?

Pretty helpful, although the developer tools on the right were set to Element not Console, so I could not see if you have any errors popping up during. Could you repeat those steps and just screenshot or copy+paste any errors in the console?

I have not ran into any issues with the desktop app, but for diagnostics, could you try accessing your instance through a browser. Start the app, then go to http://localhost:30000/ in your browser of choice and see if you can reproduce the issue. That port number might be different if you have changed that setting.

From the evidence so far, it looks like an empty folder, but you say there are files in there. Do you use a file sync service for your vault? I know some like google drive do a thing where the files are not actually present on your local storage until you try to access the file. Could be something where File Explorer shows files that are not really there? Or do you use symbolic links or anything out of the ordinary with your vault?

So, I tried on the web browser, and it works perfectly.

Glad we at least have a workaround! It occurred to me that while I have tested v9 in browser on my hosted instance, all my local testing through the app has been through v8. I will try downloading the latest desktop version and see if I can reproduce it there.

I was able to reproduce this using the desktop app. I think Foundry uses Electron, and there may be some sort of security feature to prevent getting full file paths or something like that. I will investigate more and see if this is something I can work around on my end.

So this is something that broke with the version of Electron that the desktop app was made with:
electron/electron#31663

It's fixed in v16 of Electron, but I think the way electron apps work is that all the libraries are all compiled in the exe, so there is not really a way to "upgrade" the Foundry app ourselves.

Unfortunately, this means that you have to use the workaround of using your browser for now.

I've updated the README to describe the workaround. Seeing if I can get any attention on the discord for this. Usually module-related stuff is not permitted in their bug report channel, but this is something that potentially impacts multiple modules.

Yeah one thing I need to do is learn more about Foundry's API for S3 storage. The user should be able to select either local or S3 storage.