Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit is aborted silently because of tonel error #341

Closed
LinqLover opened this issue Aug 20, 2021 · 5 comments
Closed

Commit is aborted silently because of tonel error #341

LinqLover opened this issue Aug 20, 2021 · 5 comments

Comments

@LinqLover
Copy link
Contributor

Sometimes I'm wondering why no one is having so many problems with Squot like me. 😅

Suddenly, when I press Commit, the window closes, but a commit is not generated.

If I evaluate self createVersion manually in [] in [] in SquotInteractiveSave>>applyToWorkingCopy, I get an error from tonel:
MessageNotUnderstood: UndefinedObject>>addAll: from [] in TonelWriterForFileSystem(TonelWriter)>>writePackage:, currentPackageProperties is nil and self currentPackageProperties raises another error:
STONReaderError: At character 8: 'invalid input', which is probably because git:/packages/Sandblocks-Core/package.st in this working copy has a content ( (self packageDir / 'package.st') readStreamDo: [:stream | stream contents]) like this: Package , followed by 1024 null-characters.

In the end, I was able to resolve the bug by deleting the broken file manually.

Still, here are some thoughts about this incident (which took me ~1h to resolve):

  1. Somehow the promise logic absorbs any error that is signaled from within the promise being resolved while committing. This seems to be a serious bug in my inexpert opinion.
  2. Apparently for some unknown reason, that package.st is damaged. How could this happen? Should this have been validated? Should there be a programmatic option to resolve such errors (without losing your entire working copy)?
@j4yk
Copy link
Collaborator

j4yk commented Aug 21, 2021

Curious indeed.

Did your broken package.st really consist of 'Package ' + 1024*'\0' in Git, or might there also be an error in the stream contents method, or even the Git blob reading?

@j4yk
Copy link
Collaborator

j4yk commented Aug 21, 2021

Missing commit reproduced with a fake error in SquotFileSystemStore>>store:. So the error handling with the Promises is incorrect in one more more places.

I think we should open a separate issue for the broken package.st file and the Tonel package storing not being robust.

@LinqLover
Copy link
Contributor Author

Did your broken package.st really consist of 'Package ' + 1024*'\0' in Git, or might there also be an error in the stream contents method, or even the Git blob reading?

Ah, I did not check that, sorry for that. For the future, I promise myself to always create a temporary copy of the broken image so I hopefully will be able to give you more information on these questions ... I'll open another issue for the tonel issue when it occurs again. :-)

@j4yk
Copy link
Collaborator

j4yk commented Aug 22, 2021

If the file comes from Git, you can just look at it in the history.

@j4yk j4yk closed this as completed in eb8569b Aug 25, 2021
@LinqLover
Copy link
Contributor Author

If the file comes from Git, you can just look at it in the history.

Unfortunately I can't find it right now ...

Ah, thank you for fixing the promise issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants