kevboh / longform

A plugin for Obsidian that helps you write and edit novels, screenplays, and other long projects.
Other
672 stars 30 forks source link

Longform 2.0 can fail to initialize #116

Closed pdworkman closed 1 year ago

pdworkman commented 2 years ago

I have installed Longform 2.0 and migration did not work. I tried setting up my current Longform project and while it appears to be working, it is not saving the scenes to the project. Every time I open Obsidian, it asks me whether to add the scenes to the project. I say yes and arrange them. If I then Quit and start Obsidian again, it again asks me whether to add them to the project. For some reason, it is not writing the data to the index. I have tried several different times and can't get it to work. I have rebooted the computer as well as quitting and restarting Obsidian. No luck. Each time it acts as though the scenes are brand new (whether I drag them into the folder or create new ones.)

image

image

image

kevboh commented 2 years ago

Strange. Any errors in the console? Could you try to reproduce this in a vault that you'd feel comfortable sharing with me?

foxxxyfoxxx commented 2 years ago

I have the same issue and further issue. On my system Longform 2.0 doesn't save the scenes and the projects. Every time I restart Obsidian my "jump to project" pane is empty regardless of how many projects I created. Also the index files remain unchanged when I add scenes. Restarting obsidian, the computer, or reinstalling Longform 2.0 didn't solve the issue.

UPDATE: I created a new vault without any plugins. Longform 2.0 worked in the new environment. Here is a list of the installed plugins in the vault where Longform didn't work:

image
pdworkman commented 1 year ago

image

Whenever I add a scene to the project:

image

mikelaaron commented 1 year ago

I have the same issue where I've got several longform projects (the scenes type) and after I close Obsidian and reopen it, Longform does not see the projects anymore

kevboh commented 1 year ago

Would it be possible for someone seeing this issue to share the plugin's data.json file, perhaps slightly anonymized? I think what's happening is that migration improperly wrote out plugin data in such a way that plugin startup fails—so no actual project data is lost, but Longform is unable to properly initialize and thus thinks that everything is new every time it starts.

Also: I'm genuinely sorry for the difficulty here, and for my slowness in addressing it. I've been out of town, away from my computer, and on shoddy internet for the past few weeks.

cc @mikelaaron @pdworkman @foxxxyfoxxx

mikelaaron commented 1 year ago

I’d be happy to share the file. What are the steps to share that file? (Not as tech-literate as others on GitHub) Michael Aaron @.***

On Nov 28, 2022, at 8:54 AM, Kevin Barrett @.***> wrote:

Would it be possible for someone seeing this issue to share the plugin's data.json file, perhaps slightly anonymized? I think what's happening is that migration improperly wrote out plugin data in such a way that plugin startup fails—so no actual project data is lost, but Longform is unable to properly initialize and thus thinks that everything is new every time it starts.

Also: I'm genuinely sorry for the difficulty here, and for my slowness in addressing it. I've been out of town, away from my computer, and on shoddy internet for the past few weeks.

cc @mikelaaron https://github.com/mikelaaron @pdworkman https://github.com/pdworkman @foxxxyfoxxx https://github.com/foxxxyfoxxx — Reply to this email directly, view it on GitHub https://github.com/kevboh/longform/issues/116#issuecomment-1329145729, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXP4QNGLKEZU7HZDJMRY233WKS2QVANCNFSM6AAAAAARVRTL2Y. You are receiving this because you were mentioned.

kevboh commented 1 year ago

@mikelaaron the file will be located within your vault folder at your-vault-folder/.obsidian/plugins/longform/data.json. You can email it to me directly (kb@kevinbarrett.org) or share it here if you're comfortable doing so. A zipped collected of your Longform projects would also be useful (again, if you're comfortable sharing).

sarantsatsral-qy commented 1 year ago

If you'd like too, I want to share the data.json I have. I use windows 10, maybe that will make a different data input? I'll directly send it to you.

kevboh commented 1 year ago

Has anyone emailed me? I've yet to receive anything...

If it's easier, you can DM me on discord at kevboh#0705.

mikelaaron commented 1 year ago

What do you need exactly- kinda need some hand holding on it

On Dec 10, 2022, at 5:24 PM, Kevin Barrett @.***> wrote:

Has anyone emailed me? I've yet to receive anything...

If it's easier, you can DM me on discord at kevboh#0705.

— Reply to this email directly, view it on GitHub https://github.com/kevboh/longform/issues/116#issuecomment-1345397747, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXP4QNDBUZWYDZYX3RLHTRLWMT7J3ANCNFSM6AAAAAARVRTL2Y. You are receiving this because you were mentioned.

kevboh commented 1 year ago

Sure, to expand on this comment:

  1. Your vault will have a folder named .obsidian in it. It may not be visible by default, as folders with that prefix are hidden by operating systems. If you're on a Mac, you should be able to get it to it by opening Finder, navigating to your vault, selecting Go > Go to Folder... from the menu bar, and typing in .obsidian. On Windows you can follow these instructions and then open the folder.
  2. In that folder is another folder, plugins, and in that folder should be one named longform. Open it.
  3. If you've used Longform in this vault it will contain a file named data.json. Attach that file to an email and send it to kb@kevinbarrett.org.

Alternatively, if you're comfortable, you may also just send me a zipped version of your entire vault, or even a version of your vault with most of your notes removed (except for the buggy Longform projects).

mikelaaron commented 1 year ago

Hi- I’d be happy to do so- but can you tell me what it is exactly I’m downloading?

On Dec 17, 2022, at 5:04 PM, pdworkman @.***> wrote:

Here is a dropbox link to my zip file, since it is so large:

https://www.dropbox.com/s/3eeia35wvcr5b39/Auntie%20Clems%20Bakery.zip?dl=0

Try creating a project for ACB 19 Wedding Cake Crush/Drafts/

And Drafts for each of the subfolders.

Pam

P.D. Workman

Award-winning and USA Today Bestselling Author Find me at <Find+me+at+pdworkman.com>pdworkman.com Hot new release! Missing Powers A paranormal cozy mystery https://www.facebook.com/facebook.com/pdworkmanauthor https://www.linkedin.com/linkedin.com/in/pdworkman https://www.twitter.com/twitter.com/pdworkmanauthor

Join my e-mail list https://pdworkman.com/signup to get a free ebook and to be notified when my books are published.

On Sat, Dec 10, 2022 at 3:24 PM Kevin Barrett @.***> wrote:

Has anyone emailed me? I've yet to receive anything...

If it's easier, you can DM me on discord at kevboh#0705.

— Reply to this email directly, view it on GitHub https://github.com/kevboh/longform/issues/116#issuecomment-1345397747, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV42KG5ULKKEOIHQH6QIVX3WMT7J3ANCNFSM6AAAAAARVRTL2Y . You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/kevboh/longform/issues/116#issuecomment-1356484624, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXP4QNBMKWCT7RTFC27QWWTWNY2HDANCNFSM6AAAAAARVRTL2Y. You are receiving this because you were mentioned.

pdworkman commented 1 year ago

Shouldn't have gone to you, just the developer.

Pam

P.D. Workman

Award-winning and USA Today Bestselling Author Find me at <Find+me+at+pdworkman.com>pdworkman.com Hot new release! Missing Powers A paranormal cozy mystery https://www.facebook.com/facebook.com/pdworkmanauthor https://www.linkedin.com/linkedin.com/in/pdworkman https://www.twitter.com/twitter.com/pdworkmanauthor

Join my e-mail list https://pdworkman.com/signup to get a free ebook and to be notified when my books are published.

On Sun, Dec 18, 2022 at 11:50 AM mikelaaron @.***> wrote:

Hi- I’d be happy to do so- but can you tell me what it is exactly I’m downloading?

On Dec 17, 2022, at 5:04 PM, pdworkman @.***> wrote:

Here is a dropbox link to my zip file, since it is so large:

https://www.dropbox.com/s/3eeia35wvcr5b39/Auntie%20Clems%20Bakery.zip?dl=0

Try creating a project for ACB 19 Wedding Cake Crush/Drafts/

And Drafts for each of the subfolders.

Pam

P.D. Workman

Award-winning and USA Today Bestselling Author Find me at <Find+me+at+pdworkman.com>pdworkman.com Hot new release! Missing Powers A paranormal cozy mystery https://www.facebook.com/facebook.com/pdworkmanauthor https://www.linkedin.com/linkedin.com/in/pdworkman https://www.twitter.com/twitter.com/pdworkmanauthor

Join my e-mail list https://pdworkman.com/signup to get a free ebook and to be notified when my books are published.

On Sat, Dec 10, 2022 at 3:24 PM Kevin Barrett @.***> wrote:

Has anyone emailed me? I've yet to receive anything...

If it's easier, you can DM me on discord at kevboh#0705.

— Reply to this email directly, view it on GitHub <https://github.com/kevboh/longform/issues/116#issuecomment-1345397747 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AV42KG5ULKKEOIHQH6QIVX3WMT7J3ANCNFSM6AAAAAARVRTL2Y

. You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHub < https://github.com/kevboh/longform/issues/116#issuecomment-1356484624>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AXP4QNBMKWCT7RTFC27QWWTWNY2HDANCNFSM6AAAAAARVRTL2Y . You are receiving this because you were mentioned.

— Reply to this email directly, view it on GitHub https://github.com/kevboh/longform/issues/116#issuecomment-1356853089, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV42KG7ZDSEMDZ4I3FU6A7DWN5MG3ANCNFSM6AAAAAARVRTL2Y . You are receiving this because you were mentioned.Message ID: @.***>

pdworkman commented 1 year ago

I have tried several times to uninstall and eliminate all traces of Longform plugin for a clean install. However, it is still remembering past projects and looking for them. What can I do to effect a "clean" install? Screen Shot 2022-12-28 at 10 33 10 AM

egoebelbecker commented 1 year ago

In your vault directory is a subdirectory name .obsidian.

It has a subdirectory named plugins.

In there is another named longform.

Here's what it looks like on a Linux system: image

After you've removed the plugin, delete this directory, or at least its contents.

Install longform again.

If you're syncing plugin configs, delete it on all your workstations/phones/tablets before attempting a reinstall.

I gave up on syncing configs. It seems unpredictable.

pdworkman commented 1 year ago

Ah, I had thought about the synced devices. I’ll try that.

Pam

Award-winning and USA Today Bestselling Author http://www.pdworkman.com Join my e-mail list to get a free ebook and to be notified when my books are published

On 28 Dec 2022, at 12:51 pm, Eric Goebelbecker @.***> wrote:

 In your vault directory is a subdirectory name .obsidian.

It has a subdirectory named plugins.

In there is another named longform.

Here's what it looks like on a Linux system:

After you've removed the plugin, delete this directory, or at least its contents.

Install longform again.

If you're syncing plugin configs, delete it on all your workstations/phones/tablets before attempting a reinstall.

I gave up on syncing configs. It seems unpredictable.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

pdworkman commented 1 year ago

I believe I have managed to delete all longform projects from this vault. But I still get one console error when I start it. Any guidance on this issue? I want to get error-free before trying to set up projects again. Screen Shot 2022-12-31 at 12 28 20 PM

egoebelbecker commented 1 year ago

That's fixed in 2.0.1, which was released a couple of days ago.

pdworkman commented 1 year ago

Okay, I have successful fixed my vault that was not allowing me to create projects/add scenes to the drafts properly. Longform is working as expect.

As a test, I closed and reopened the vault to make sure that I wasn't getting any errors, and still got one. I will attach.

I did two questionable things which may have contributed to this error.

  1. I realized that "document A" that was in "Draft 0" should have been in "Draft 2". I used the Obsidian move command to move it from "Draft 0" to "Draft 2". It moved the original "document A" into "Draft 2". However, Longform also created a blank "document A" in "Draft 0". After making sure that I had the correct "document A" in "Draft 2", I used the Obsidian delete command to delete the blank "document A" that Longform had created in "Draft 0". This may have created a problem in the index. Is there are correct way to move scenes from one draft to another? Is there a correct way to delete scenes without screwing up the index?

  2. I was creating drafts in the newly defined projects from folders that already exist. I mistyped the draft "Editor notes and tasks", so Longform created a new folder with the typo that I made. I used the Obsidian move command to move the two files from the originally existing folder into the folder with the typo in the name that I had created with Longform. I said "yes" to add the two scenes into the draft. I deleted the originally existing folder using the Obsidian delete command. I then used the Obsidian rename command to rename the folder with the typo in the name to what it was supposed to be. Is there a better way to handle this in the future?

I don't know if either of these created the error, but they steps you can replicate to troubleshoot.

Screen Shot 2022-12-31 at 7 39 52 PM

celtickuma commented 1 year ago

I've also been struggling with this for the past couple of days. Create a project in Longform. Close everything. Come back to project. No Longform projects on the tab.

My troubleshooting info is shown below, but the bottom line is that when this occurs closing Obsidian, deleting the Indexed DB at /Users//Library/Application Support/obsidian/IndexedDB/app_obsidian.md_0.indexeddb.leveldb, and reopening Obsidian fixes the problem by forcing a reindex. Everything works normally. All Longform projects available with proper hierarchy. However, if Obsidian is shutdown, and does not reindex on next restart the problem recurs. A reindex on the vault whether forced or system generated fixes the problem in my particular instance.

Troubleshooting Info Two MacBook Pros, one running 10.15.7, one 11.6. Obsidian 1.1.9 Longform 2.0.1 Vault is stored on DropBox Assuming a state where everything is working normally, Close vault, Close Obsidian

Re-open vault. **If the vault does not reindex** Longform tab is present but no Longform projects. Longform index files look normal with proper YAML structure. Right clicking the Longform project folder does not show "Mark as Longform Project" Right clicking the Longform project folder shows "Create Longform Project" Create works but requires renaming the original index.md file, creating the project, renaming the original as index.md. **If the vault reindexes** Everything works as normal **Mitigation attempts** - Turn off Longform. Longform fails to unload. No effect when turned back on - Delete Obsidian cache at /Users//Library/Application Support/obsidian/Cache/Cache_Data. No effect. - Delete Obsidian code cache at //Library/Application Support/obsidian/Code Cache/js. No Effect. - Delete both caches. No effect. - Delete Indexed DB at /Users//Library/Application Support/obsidian/IndexedDB/app_obsidian.md_0.indexeddb.leveldb. Everything works normally. All Longform projects available with proper hierarchy.
celtickuma commented 1 year ago

In addition to my previous comments, I did a clean install of Longform. Added the plugin Enabled the plugin Longform tab showed no projects. The following was displayed on the Developer Console:

plugin:longform:36973 [Longform] Starting Longform 2.0.1… plugin:longform:37061 [Longform] No workflows found; adding default workflow. plugin:longform:29 Uncaught (in promise) Error: ENOENT: no such file or directory, scandir (location of scenes directory for project)

celtickuma commented 1 year ago

I'm not even sure how to post this. I inadvertently created a Longform index.md file in a directory while trying to troubleshoot the above behavior. This now shows up in the project list as Manual Longform. Now the Longform tab opens correctly every time including after Obsidian restarts. If there's anything you would like me to try, please let me know.

kevboh commented 1 year ago

Hi all,

I suspect these issues are the intersection of a few bugs that I'm working on fixing this week, namely:

I will update when the next release is out—hopefully it addresses these, I know this can be frustrating. Thanks for your patience and help here.

kevboh commented 1 year ago

2.0.2 has been released. Please let me know if this continues to be an issue.

mikelaaron commented 1 year ago

Thank you!

Michael Aaron @.***

On Jan 6, 2023, at 9:38 AM, Kevin Barrett @.***> wrote:

2.0.2 has been released. Please let me know if this continues to be an issue.

— Reply to this email directly, view it on GitHub https://github.com/kevboh/longform/issues/116#issuecomment-1373719810, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXP4QND6LKVBSNJ3HJH4LALWRAU6NANCNFSM6AAAAAARVRTL2Y. You are receiving this because you were mentioned.

celtickuma commented 1 year ago

Updated to 2.0.3. Closed vault Restarted Obsidian No projects under Longform tab Used command to reload vault without saving No projects under Longform tab Renamed Index in each of my projects Created projects in existing project folders. Restored original Index file Al projects show up in Longform tab with proper scenes in correct hierarchical order Closed vault Restarted Obsidian Two old projects showed up in Longform tab. All projects seem correct at this time. Will continue to monitor

kevboh commented 1 year ago

@celtickuma let's discuss your issue in #135. I'm very curious about your specific index files, as I can't reproduce this behavior and suspect it might be do to unconventional use on your end.

I'm going to close this issue. If someone is able to reproduce it in 2.0.3 please let me know and I'll reopen.