SQLite.swift icon indicating copy to clipboard operation
SQLite.swift copied to clipboard

Cannot open file

Open digitxo opened this issue 5 years ago • 9 comments

I dragged my ".db" file into my project..

let db = try Connection("architect.db")

Prints this error to console:

2020-01-30 23:21:16.354630-0800 architect[398:88870] [logging-persist] cannot open file at line 43353 of [378230ae7f]

2020-01-30 23:21:16.354718-0800 architect[398:88870] [logging-persist] os_unix.c:43353: (0) open(//architect.db) - Undefined error: 0

The operation couldn’t be completed. (SQLite.Result error 0.)

2020-01-30 23:21:16.363920-0800 architect[398:88870] [logging-persist] cannot open file at line 43353 of [378230ae7f]

2020-01-30 23:21:16.363993-0800 architect[398:88870] [logging-persist] os_unix.c:43353: (0) open(//architect.db) - Undefined error: 0

The operation couldn’t be completed. (SQLite.Result error 0.)

2020-01-30 23:21:16.365709-0800 architect[398:88870] [logging-persist] cannot open file at line 43353 of [378230ae7f]

2020-01-30 23:21:16.365758-0800 architect[398:88870] [logging-persist] os_unix.c:43353: (0) open(//architect.db) - Undefined error: 0

The operation couldn’t be completed. (SQLite.Result error 0.)

digitxo avatar Jan 31 '20 20:01 digitxo

Hi, I'm same error. See the picture. Agostinho Captura de Tela 2020-01-31 às 20 00 37 Captura de Tela 2020-01-31 às 20 52 06

SieczkowskiAL avatar Jan 31 '20 23:01 SieczkowskiAL

import SQLite3 -> import SQLite

Hi, I'm same error. See the picture. Agostinho Captura de Tela 2020-01-31 às 20 00 37 Captura de Tela 2020-01-31 às 20 52 06

NunciosChums avatar Apr 29 '20 05:04 NunciosChums

2020-09-09 09:47:36.019497+0700 YogaAppleTV[222:8547] open on /var/mobile/Containers/Data/Application/4C951721-F6D1-4225-ACDF-D18ABD44D4E1/Documents/fiveYoga.db: Operation not permitted Unable to copy file 2020-09-09 09:47:36.023707+0700 YogaAppleTV[222:8547] [logging-persist] cannot open file at line 43353 of [378230ae7f] 2020-09-09 09:47:36.023820+0700 YogaAppleTV[222:8547] [logging-persist] os_unix.c:43353: (0) open(/var/mobile/Containers/Data/Application/4C951721-F6D1-4225-ACDF-D18ABD44D4E1/Documents/fiveYoga.db) - Undefined error: 0 Loi Loi mat 2020-09-09 09:47:38.708617+0700 YogaAppleTV[222:8547] [logging-persist] cannot open file at line 43353 of [378230ae7f] 2020-09-09 09:47:38.708905+0700 YogaAppleTV[222:8547] [logging-persist] os_unix.c:43353: (0) open(/var/mobile/Containers/Data/Application/4C951721-F6D1-4225-ACDF-D18ABD44D4E1/Documents/fiveYoga.db) - Undefined error: 0 Loi Loi mat 2020-09-09 09:47:38.715021+0700 YogaAppleTV[222:8547] [TableView] Warning once only: UITableView was told to layout its visible cells and other contents without being in the view hierarchy (the table view or one of its superviews has not been added to a window). This may cause bugs by forcing views inside the table view to load and perform layout without accurate information (e.g. table view bounds, trait collection, layout margins, safe area insets, etc), and will also cause unnecessary performance overhead due to extra layout passes. Make a symbolic breakpoint at UITableViewAlertForLayoutOutsideViewHierarchy to catch this in the debugger and see what caused this to occur, so you can avoid this action altogether if possible, or defer it until the table view has been added to a window. Table view: <UITableView: 0x1018bec00; frame = (100 65; 384 518); autoresize = RM+BM; gestureRecognizers = <NSArray: 0x281e4a5b0>; layer = <CALayer: 0x281087880>; contentOffset: {0, 0}; contentSize: {384, 0}; adjustedContentInset: {0, 0, 0, 0}; dataSource: <YogaAppleTV.HomeVC: 0x10150f4d0>>

masterprohd avatar Sep 09 '20 02:09 masterprohd

Would this have anything to do with the extension? I'm having a similar issue with a ".mbtiles" database.

tjdaniel2 avatar Apr 30 '21 14:04 tjdaniel2

@digitxo Are you sure that your .db file is in your working directory?

nathanfallet avatar Aug 23 '21 10:08 nathanfallet

I'm getting the same error

infinigent-solutions avatar Oct 25 '21 13:10 infinigent-solutions

I'm getting the same error, too

underthestars-zhy avatar Jun 26 '22 06:06 underthestars-zhy

I'm getting the same error, too

I can open my .db file with other apps. But I cannot open it by this package

underthestars-zhy avatar Jun 26 '22 06:06 underthestars-zhy

I'm getting the same error, too

I can open my .db file with other apps. But I cannot open it by this package

I am also encountering this error. I believe the sandbox is preventing the reading of the copied database file. Even if I move it into the Application Support folder and modify some extended attributes, it still doesn't work. However, after I moved the database file into the Downloads folder and granted the permissions as shown below, the problem was resolved.

image

damnever avatar Apr 20 '24 09:04 damnever