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
Fyne error: Preferences load error #2936
Comments
Would you mind including the entire example code? Also, can you please try with the latest v2.1.x release (v2.1.4 at the time of writing)? |
Trace the source code and find the ~/library/preferences/xxx/fyne directory. Delete the Fyne folder and no error will be reported. It is suspected that an exception occurred during the process of writing the configuration. |
yes v2.1.4 |
Sorry, I don’t understand what you mean with “tracing the source code”. Can you please add your example code (see information in the template) to the issue description? |
It does look like the code is generating some sort of invalid JSON somehow. |
the preference file is empty. |
I mean "debug". |
OK thanks. So somehow we are writing an empty file? This is super strange. |
Describe the bug:
2022/04/21 20:15:04 Fyne error: Preferences load error:
2022/04/21 20:15:04 Cause: EOF
2022/04/21 20:15:04 At: ./vendor/fyne.io/fyne/v2/app/preferences.go:84
To Reproduce:
Steps to reproduce the behaviour:
Preferences is used in the project. At first, it is good. After running for a period of time, an error will be prompted. Even if the code of preferences is deleted from the project, the operation will still report an error.
Screenshots:
Example code:
xxx.Preferences().String("xxx")
xxx.Preferences().SetString("xxx","ccc")
xxx.Preferences().RemoveValue("xxx")
Device (please complete the following information):
The text was updated successfully, but these errors were encountered: