Skip to content

DB query fail with error disk I/O error (code: 10) when accessing from widget extension #1187

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

Open
ankitagg-ms opened this issue Feb 7, 2023 · 5 comments

Comments

@ankitagg-ms
Copy link

Build Information

  • Include the SQLite.swift version, commit or branch experiencing the issue: 0.14.1
  • Mention Xcode and OS X versions affected: Xcode 14 and ios version 15, 16
  • How do do you integrate SQLite.swift in your project?
    • CocoaPods

We have widget which shows data present in app DB.
For some users, after some time.
Widget extension is not able to fetch Data from DB and throws error disk I/O error (code: 10)

It works initially when app is suspended.
We think, widget shows data until first refresh.
However, when it goes for refresh..
Error occurs.

Implementation has not been updated recently and has been working for all users.
We are using read only DB for widgets, since it does not need to write to DB.

For one user, this issue is continuously happening.

@nathanfallet
Copy link
Collaborator

Can you provide some code to reproduce the issue? As well as the detailed error?

@nathanfallet
Copy link
Collaborator

Could it be linked to #870?

@ankitagg-ms
Copy link
Author

My logs only this information about error disk I/O error (code: 10)
Not able to log extended error code when using sqlite.swift sdk for ios.

I think, #870 this is different as it talks about shared group and copying database where as we are accessing same database from different connection from my widget extension

@nathanfallet
Copy link
Collaborator

In both case, a new object is instantiated by your app and the app extension (which is the widget in your case). Both access the same database, which file can be shared using Access Group (otherwise only the app/extension that created it can access it, and they will both have their own file)

@HeminWon
Copy link

HeminWon commented Oct 17, 2024

error info

SQLite/Statement.swift:218: Fatal error: 'try!' expression unexpectedly raised an error: disk I/O error (code: 10)

I am calling the code this way, and it works fine under normal circumstances. However, when I use third-party login and return from the third-party service, I encounter a crash.image

image

image

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

3 participants