Skip to content
New issue

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

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

Already on GitHub? # to your account

NSCocoaErrorDomain Code=256 "Failed to retrieve app-scope key" #13

Open
bugsmachine opened this issue Oct 14, 2024 · 0 comments
Open

NSCocoaErrorDomain Code=256 "Failed to retrieve app-scope key" #13

bugsmachine opened this issue Oct 14, 2024 · 0 comments

Comments

@bugsmachine
Copy link

need bookmark for file:///Volumes/Macintosh%20HD/Users/caodingjie/Desktop/ms/
flutter: Error creating bookmark: PlatformException(UnexpectedError, Error while creating bookmark Error Domain=NSCocoaErrorDomain Code=256 "Failed to retrieve app-scope key" UserInfo={NSDebugDescription=Failed to retrieve app-scope key} for file:///Volumes/Macintosh%20HD/Users/caodingjie/Desktop/ms/, null, null)

IconButton(
icon: Icon(Icons.add),
onPressed: () async {
String? selectedDirectory = await FilePicker.platform.getDirectoryPath();
if (selectedDirectory != null) {
final secureBookmarks = SecureBookmarks();
final directory = Directory(selectedDirectory);
try {
final bookmark = await secureBookmarks.bookmark(directory);
await setUserDefaultOfLine1(bookmark, selectedDirectory);
setState(() {
_filmsFolder = selectedDirectory;
_isLoading = true;
});
await _loadVideoFiles();
setState(() {
_isLoading = false;
});
} catch (e) {
print('Error creating bookmark: $e');
}
}
},
),

This code works maybe a week ago, during this week I just did some UI works and now had this error.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant