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

App Quit Unexpectedly after trying to set a wallpaper #40

Open
jeffrey0606 opened this issue Jul 11, 2023 · 0 comments
Open

App Quit Unexpectedly after trying to set a wallpaper #40

jeffrey0606 opened this issue Jul 11, 2023 · 0 comments

Comments

@jeffrey0606
Copy link

Here is the error message I get and my app quits immediately:
Fatal error: 'try!' expression unexpectedly raised an error: unable to open database file (code: 14) Lost connection to device

Here is my code to set the wallpaper:
let path = (call.arguments as! Dictionary<String, AnyObject>)["path"] as! String; let scale = (call.arguments as! Dictionary<String, AnyObject>)["scale"] as! String; print("switft wallpaper path: ", path) let imageURL = URL(fileURLWithPath: path, isDirectory: false) try! Wallpaper.set(imageURL, screen: .all, scale: Wallpaper.Scale(rawValue: scale) ?? .auto)

Here is the full error when I run it from xcode:
switft wallpaper path: /Users/jeff/Library/Containers/com.AppName.co/Data/Wallpapers/yyuvw2q4ptpoatl.jpg 2023-07-11 15:49:36.137925+0100 AppName[17643:174990] [logging-persist] cannot open file at line 46846 of [554764a6e7] 2023-07-11 15:49:36.137996+0100 AppName[17643:174990] [logging-persist] os_unix.c:46847: (0) open(/Users/jeff/Library/Containers/com.AppName.co/Data/Library/Application Support/Dock/desktoppicture.db) - Undefined error: 0 AppName/MainFlutterWindow.swift:64: Fatal error: 'try!' expression unexpectedly raised an error: unable to open database file (code: 14) 2023-07-11 15:49:36.139022+0100 xxx[17643:174990] AppName/MainFlutterWindow.swift:64: Fatal error: 'try!' expression unexpectedly raised an error: unable to open database file (code: 14)

What I fins strange is that this file Dock/desktoppicture.db doesn't exits in this location /Users/jeff/Library/Containers/com.AppName.co/Data/Library/Application Support/Dock/desktoppicture.db
but before I changed my app package_name the file could be found in the previous app directory folder location.

Will appreciate any assistance with this issue
Thanks,
Jeffrey.

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

No branches or pull requests

1 participant