Scapple XML save error

Hi - I keep getting the error "The document “documentname.scap"could not be saved. There was a problem creating the XML data.” I have deleted and reinstalled scapple to no avail. If anyone can help it would be great because if I can’t fix this I can’t actually use scapple anymore. I’ve been using it for years now and suddenly I can’t. On a MacBook pro 2018 with the latest os (monterey 12.5)

Firstly, you are never stuck with whatever version you last installed. We always make the previous version available for this very reason: sometimes a bug can keep you from working, and we aren’t Apple. We aren’t going to force you to use only the buggiest latest version. :slight_smile:

Before doing that though, if you have the time to do some testing, here is what I’d check:

  1. First, try a simple reinstall using a fresh download of the latest version. We may have just been looking at an installation/upgrader script glitch that resulted in a corrupted installation. This is not terribly uncommon.

  2. If the problem persists, then in Finder use the Go/Utilities menu command, and double-click on the Console icon. In the search bar, type in “scapple”, and then click the “Start streaming” button in the middle of the view. Leave this open as you test, paying particular attention whenever hitting the problem. You can copy and paste any logging output you get into a response, here.

  3. Check to see if you can create a new document. You should have an empty one already if you launched Scapple on its own. Just put a note in there, and Cmd-S to save it somewhere. Close and re-open. Does this act normally or do you get the XML error?

  4. Next try an existing file. Do you get any logging information in Console if the XML error appears?

Thanks for any help you can provide! We do not have many reports of this, so I don’t think there are any broad problems with the software. What we’re likely looking at is something very specific. A copy of one of the .scap files that causes this error could be useful to us. If you’re willing to send on, click on my avatar above this post, and then the “Message” button to send a private message. You can drag the .scap file into the composition window to attach it.

There is a problem saving my diagram.

I get a techno dialog box with the message:

"The document “Untitled 2” could not be saved.

There was a problem creating the XML data."

The other person reporting this never got back with us, if you get a chance to go through the above troubleshooting it would be appreciated. We currently have no idea what this error means, because none of us know how to make it happen.

I closed the document, and am trying to reproduce it for you.

UnfortunatelyI can’t reproduce the error. I made a screenshot of the diagram and re-draw it. It now saves correctly. Very strange.

It’s true - I never did get back to you sorry about that. Your response to my problem was so lovely too. I put it on the list of things to have a look at and then I wandered off and by the time I got back to it it had fixed itself. I couldn’t reproduce it I’m sorry. It was really annoying though. If it EVER happens again I will return to this thread and answer all the questions. Thanks.

1 Like

Thanks for the updates, both! That it comes and goes and is difficult to reproduce could explain why we haven’t seen it. For all we know at this point it’s completely unrelated to the data itself and is an issue with saving at a much lower level. E.g. maybe the system is giving a failure to save response, and we’re getting mixed signals about it, producing a confusing error message. This disk spins up, or whatever locked file goes away, and it mysteriously starts working again.

I have been able to re-create this error by creating a bubble and then cutting the text. The bubble remains with no text content or formatting. When trying to save I get the xml error but if i remove the empty bubbles then it saves normally.

Thanks! With the software working properly, empty notes (what I presume to be “bubbles”) are automatically deleted since they no longer server any purpose. So that you are left with an empty note is in itself a problem—maybe not the problem, and only another symptom of it, but it’s a clue nonethless!

I cannot, unfortunately, reproduce this with the given data though, with default settings:

  1. Press ⌘N to create a new board.

  2. Press ⌘↩ to add a new note.

  3. Press ⌘X to cut the “New Note” starter text.

  4. Press Esc to toggle editing off.

    At this point the board is empty again, because we didn’t leave any content in the note and it was cleaned up. But we try to save anyway.

  5. Press ⌘S and save it somewhere.

Depending on whether following this checklist causes an error for you or not, proceed with one of the following secondary tests:

Expanding the Checklist

If you also have no issues, and do not get an error when saving the above test board, then let me know what it takes to change that checklist so that it does show an error. Maybe I need to click outside of the note after cutting, instead of pressing Esc; maybe you dragged a note out from one of the styles in the Styles inspector pane instead of using the shortcut, et cetera. Every little thing can matter.

Checking Preferences

Now if you try that checklist and you get the warning message, then try resetting your preferences and trying again:

  1. From Finder, use Go ▸ Utilities and double-click Terminal.

  2. Issue the following two commands into the shell:

    mv ~/Library/Preferences/com.literatureandlatte.scapple.plist ~/Desktop
    killall -u $USER cfprefsd
    

Now run the test again with default settings (as I did), and if that now works, then go through the settings and try restoring them to what you prefer using until you get the problem again. If that’s what it takes, let me know which settings to change.

Once you’re done testing, you can drag the plist file from your Desktop back into ~/Library/Preferences and run the same “killall” command to force the Mac to restore its preference cache from the disk.

I just had this problem and suspect it is as you mentioned something to do with an empty text bubble.
I had copy and pasted a paragraph and then split it up using cmd apple k, and then started getting the error. Have opened a new blank project successfully however.

thanks

John

I’d make sure you are using the latest version (1.5) before doing any further troubleshooting. As noted in the post directly above yours, the software strives to ensure empty notes cannot be created, so ordinarily that condition should never arise in the first place.

1 Like

I have a saved file which I’ve been working on for a while. Today I spent a bunch more time on it, and now when i go to save it, it says “The document “[filename]” could not be saved. There was a problem creating the XML data.”
It also says this when I try to Duplicate the file “The file could not be saved. There was a problem creating the XML data.”

Any ideas? Is there some string in the content I added that caused a problem, or maybe a nested Background Shape? I’m totally shooting in the dark here. I’d love to be able to save my work and not lose it ….

This is Scapple Version 1.5.4 (15557) on macOS Tahoe 26.5.2 on an M4 Max.

Have you tried Save As… (on File menu when Option key is held down). When doing this use a new name and save it to some other location like your Downloads folder.

I don’t have a fix for you, but here are things I would do immediately:

  1. Get to the Scapple file in the Finder and duplicate the file that is currently on disk – for safety.

  2. I would also try File > Export > PDF, so as to have an accurate visual record of the current map.

Between the safety duplicate and the visual record given by the PDF, you could recreate the changes you made in the current session – in case there is not a way to save the unsaved file.

-GR

P.S. Depending on your content there may be other Export formats you could want to save to that might be useful to you in a pinch.

1 Like

Yeah. For some reason it’s “Duplicate” on my machine, and yes: certainly tried that. It gives me the error before it asks me for a new filename/location :frowning:

I like your ideas about exporting as PDF, and copying the file that’s on disk. I did both of those.
I also just zoomed really far out and then drag’d a box around everything, and Copied that, then created a new file and pasted - and that worked too: I was able to save the new file successfully. Super weird.
Which gave me an idea: Copy everything, then close the file (and Discard all changes), then open it (old version), then select everything, delete everything, and paste the copy of everything, and try to save it: and yes, that worked also. Yay!
So: my work is not lost. But something was certainly weird and off, and scary there for a bit.
Thanks for your help!

1 Like

I’ve merged this with the existing bug report thread, which as yet remains unresolved as the conditions for arriving at it are unknown. Scroll up for the most recent updates, which indicate the problem comes from empty notes being left on the board—which in theory the software should never allow.

2 Likes

Well, I can recreate a board with blank notes easily, but that alone isn’t giving me any errors saving.

  1. Set the default note text to empty
  2. Create a new note, then press Escape – the note is empty and is automatically deleted
  3. Cmd-Z to Undo

The empty note is restored, and will remain when you create additional notes. But as I said, I can save the board, close, reopen, edit, and save it again without the XML error, so there’s definitely something else at play.

1 Like

Thanks everyone!
I started a new file with the aim of figuring out how to reproduce the problem, continually pressing command+s, and it kept bringing up the dialog asking for a filename, so I hit escape and kept trying. Then at some point I accidentally hit enter on the filename, and the next dialog was this error again: so I managed to reproduce it!
So: it turns out that command+s does not demonstrate the problem until after there’s a filename. Good to know, after about 45 minutes of doing lots of random attempts to repro it. One of those worked, but I’m not sure which one.
So, I made another new file, gave it a name, and then tried all the things I could think of, again, constantly saving. After another hour of trying all the things I can think of: no luck reproducing it :frowning: I’ll pay careful attention going forward, and press command+s frequently, to see if I can repro it. But it might be a while before I get it. If I do: I’ll report back here.

1 Like