mixpanel / mixpanel-react-native

Official React Native Tracking Library for Mixpanel Analytics
https://mixpanel.com
Apache License 2.0
105 stars 44 forks source link

[iOS] Events are not recorded. #103

Closed billkim84 closed 2 years ago

billkim84 commented 2 years ago

Tracked several events but most of them were missing from the events dashboard. Here are full logs.

[Mixpanel - MPDB.swift - func insertRow(_:data:flag:)] (info) - Successfully inserted row into table mixpanel_147c917d38611395fce1429821044574events [Mixpanel - MPDB.swift - func insertRow(:data:flag:)] (info) - Successfully inserted row into table mixpanel_147c917d38611395fce1429821044574events [Mixpanel - MPDB.swift - func insertRow(:data:flag:)] (info) - Successfully inserted row into table mixpanel_147c917d38611395fce1429821044574events [Mixpanel - MPDB.swift - func insertRow(:data:flag:)] (info) - Successfully inserted row into table mixpanel_147c917d38611395fce1429821044574events [Mixpanel - MPDB.swift - func insertRow(:data:flag:)] (info) - Successfully inserted row into table mixpanel_147c917d38611395fce1429821044574events [Mixpanel - MPDB.swift - func insertRow(:data:flag:)] (info) - Successfully inserted row into table mixpanel_147c917d38611395fce1429821044574_events [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - Failed to insert row into table mixpanel_147c917d38611395fce1429821044574_events [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - database is locked [Mixpanel - MPDB.swift - func close()] (info) - Connection to database closed. [Mixpanel - MPDB.swift - func recreate()] (info) - Deleted database file at path: /var/mobile/Containers/Data/Application/BB7615F6-46F8-4641-AC70-DB5BE085AFE6/Library/147c917d38611395fce1429821044574_MPDB.sqlite [Mixpanel - MPDB.swift - func reconnect()] (warning) - No database connection found. Calling MPDB.open() [Mixpanel - MPDB.swift - func open()] (info) - Successfully opened connection to database at path: /var/mobile/Containers/Data/Application/BB7615F6-46F8-4641-AC70-DB5BE085AFE6/Library/147c917d38611395fce1429821044574_MPDB.sqlite [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - Failed to insert row into table mixpanel_147c917d38611395fce1429821044574_events [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error [Mixpanel - MPDB.swift - func close()] (info) - Connection to database closed. [Mixpanel - MPDB.swift - func recreate()] (info) - Deleted database file at path: /var/mobile/Containers/Data/Application/BB7615F6-46F8-4641-AC70-DB5BE085AFE6/Library/147c917d38611395fce1429821044574_MPDB.sqlite [Mixpanel - MPDB.swift - func reconnect()] (warning) - No database connection found. Calling MPDB.open() [Mixpanel - MPDB.swift - func open()] (info) - Successfully opened connection to database at path: /var/mobile/Containers/Data/Application/BB7615F6-46F8-4641-AC70-DB5BE085AFE6/Library/147c917d38611395fce1429821044574_MPDB.sqlite [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - mixpanel_147c917d38611395fce1429821044574_events table create failed [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:54:31.490841+0900 Tengo[41204:11914439] [logging] disk I/O error in "CREATE TABLE IF NOT EXISTS mixpanel_147c917d38611395fce1429821044574_people(id integer primary key autoincrement,data blob,time real,flag integer);" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - CREATE statement for table mixpanel_147c917d38611395fce1429821044574_people could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:54:31.491566+0900 Tengo[41204:11914439] [logging] disk I/O error in "CREATE TABLE IF NOT EXISTS mixpanel_147c917d38611395fce1429821044574_groups(id integer primary key autoincrement,data blob,time real,flag integer);" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - CREATE statement for table mixpanel_147c917d38611395fce1429821044574_groups could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:54:31.492898+0900 Tengo[41204:11914439] [logging] disk I/O error in "INSERT INTO mixpanel_147c917d38611395fce1429821044574_people (data, flag, time) VALUES(?, ?, ?);" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - INSERT statement for table mixpanel_147c917d38611395fce1429821044574_people could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error [Mixpanel - MPDB.swift - func close()] (info) - Connection to database closed. [Mixpanel - MPDB.swift - func recreate()] (info) - Deleted database file at path: /var/mobile/Containers/Data/Application/BB7615F6-46F8-4641-AC70-DB5BE085AFE6/Library/147c917d38611395fce1429821044574_MPDB.sqlite [Mixpanel - MPDB.swift - func reconnect()] (warning) - No database connection found. Calling MPDB.open() [Mixpanel - MPDB.swift - func open()] (info) - Successfully opened connection to database at path: /var/mobile/Containers/Data/Application/BB7615F6-46F8-4641-AC70-DB5BE085AFE6/Library/147c917d38611395fce1429821044574_MPDB.sqlite [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - mixpanel_147c917d38611395fce1429821044574_events table create failed [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:54:31.513448+0900 Tengo[41204:11913869] [logging] disk I/O error in "CREATE TABLE IF NOT EXISTS mixpanel_147c917d38611395fce1429821044574_people(id integer primary key autoincrement,data blob,time real,flag integer);" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - CREATE statement for table mixpanel_147c917d38611395fce1429821044574_people could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:54:31.514550+0900 Tengo[41204:11913869] [logging] disk I/O error in "CREATE TABLE IF NOT EXISTS mixpanel_147c917d38611395fce1429821044574_groups(id integer primary key autoincrement,data blob,time real,flag integer);" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - CREATE statement for table mixpanel_147c917d38611395fce1429821044574_groups could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:54:31.516027+0900 Tengo[41204:11913869] [logging] disk I/O error in "INSERT INTO mixpanel_147c917d38611395fce1429821044574_people (data, flag, time) VALUES(?, ?, ?);" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - INSERT statement for table mixpanel_147c917d38611395fce1429821044574_people could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error [Mixpanel - MPDB.swift - func close()] (info) - Connection to database closed. [Mixpanel - MPDB.swift - func recreate()] (info) - Deleted database file at path: /var/mobile/Containers/Data/Application/BB7615F6-46F8-4641-AC70-DB5BE085AFE6/Library/147c917d38611395fce1429821044574_MPDB.sqlite [Mixpanel - MPDB.swift - func reconnect()] (warning) - No database connection found. Calling MPDB.open() [Mixpanel - MPDB.swift - func open()] (info) - Successfully opened connection to database at path: /var/mobile/Containers/Data/Application/BB7615F6-46F8-4641-AC70-DB5BE085AFE6/Library/147c917d38611395fce1429821044574_MPDB.sqlite [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - mixpanel_147c917d38611395fce1429821044574_events table create failed [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:54:31.540124+0900 Tengo[41204:11914439] [logging] disk I/O error in "CREATE TABLE IF NOT EXISTS mixpanel_147c917d38611395fce1429821044574_people(id integer primary key autoincrement,data blob,time real,flag integer);" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - CREATE statement for table mixpanel_147c917d38611395fce1429821044574_people could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:54:31.540819+0900 Tengo[41204:11914439] [logging] disk I/O error in "CREATE TABLE IF NOT EXISTS mixpanel_147c917d38611395fce1429821044574_groups(id integer primary key autoincrement,data blob,time real,flag integer);" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - CREATE statement for table mixpanel_147c917d38611395fce1429821044574_groups could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:54:31.541774+0900 Tengo[41204:11914439] [logging] disk I/O error in "INSERT INTO mixpanel_147c917d38611395fce1429821044574_people (data, flag, time) VALUES(?, ?, ?);" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - INSERT statement for table mixpanel_147c917d38611395fce1429821044574_people could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error [Mixpanel - MPDB.swift - func close()] (info) - Connection to database closed. [Mixpanel - MPDB.swift - func recreate()] (info) - Deleted database file at path: /var/mobile/Containers/Data/Application/BB7615F6-46F8-4641-AC70-DB5BE085AFE6/Library/147c917d38611395fce1429821044574_MPDB.sqlite [Mixpanel - MPDB.swift - func reconnect()] (warning) - No database connection found. Calling MPDB.open() [Mixpanel - MPDB.swift - func open()] (info) - Successfully opened connection to database at path: /var/mobile/Containers/Data/Application/BB7615F6-46F8-4641-AC70-DB5BE085AFE6/Library/147c917d38611395fce1429821044574_MPDB.sqlite [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - mixpanel_147c917d38611395fce1429821044574_events table create failed [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:54:31.549693+0900 Tengo[41204:11913869] [logging] disk I/O error in "CREATE TABLE IF NOT EXISTS mixpanel_147c917d38611395fce1429821044574_people(id integer primary key autoincrement,data blob,time real,flag integer);" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - CREATE statement for table mixpanel_147c917d38611395fce1429821044574_people could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:54:31.550407+0900 Tengo[41204:11913869] [logging] disk I/O error in "CREATE TABLE IF NOT EXISTS mixpanel_147c917d38611395fce1429821044574_groups(id integer primary key autoincrement,data blob,time real,flag integer);" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - CREATE statement for table mixpanel_147c917d38611395fce1429821044574_groups could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:54:31.551318+0900 Tengo[41204:11913869] [logging] disk I/O error in "INSERT INTO mixpanel_147c917d38611395fce1429821044574_people (data, flag, time) VALUES(?, ?, ?);" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - INSERT statement for table mixpanel_147c917d38611395fce1429821044574_people could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error [Mixpanel - MPDB.swift - func close()] (info) - Connection to database closed. [Mixpanel - MPDB.swift - func recreate()] (info) - Deleted database file at path: /var/mobile/Containers/Data/Application/BB7615F6-46F8-4641-AC70-DB5BE085AFE6/Library/147c917d38611395fce1429821044574_MPDB.sqlite2021-09-29 13:54:31.552836+0900 Tengo[41204:11914413] [logging] BUG IN CLIENT OF libsqlite3.dylib: database integrity compromised by API violation: vnode unlinked while in use: /private/var/mobile/Containers/Data/Application/BB7615F6-46F8-4641-AC70-DB5BE085AFE6/Library/147c917d38611395fce1429821044574_MPDB.sqlite [Mixpanel - MPDB.swift - func reconnect()] (warning) - No database connection found. Calling MPDB.open()2021-09-29 13:54:31.552882+0900 Tengo[41204:11914413] [logging] invalidated open fd: 47 (0x11) [Mixpanel - MPDB.swift - func open()] (info) - Successfully opened connection to database at path: /var/mobile/Containers/Data/Application/BB7615F6-46F8-4641-AC70-DB5BE085AFE6/Library/147c917d38611395fce1429821044574_MPDB.sqlite [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - mixpanel_147c917d38611395fce1429821044574_events table create failed [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:54:31.562614+0900 Tengo[41204:11914439] [logging] disk I/O error in "CREATE TABLE IF NOT EXISTS mixpanel_147c917d38611395fce1429821044574_people(id integer primary key autoincrement,data blob,time real,flag integer);" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - CREATE statement for table mixpanel_147c917d38611395fce1429821044574_people could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:54:31.563574+0900 Tengo[41204:11914439] [logging] disk I/O error in "CREATE TABLE IF NOT EXISTS mixpanel_147c917d38611395fce1429821044574_groups(id integer primary key autoincrement,data blob,time real,flag integer);" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - CREATE statement for table mixpanel_147c917d38611395fce1429821044574groups could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error [Mixpanel - MPDB.swift - func createTableFor(:)] (info) - mixpanel_147c917d38611395fce1429821044574events table created [Mixpanel - MPDB.swift - func createTableFor(:)] (info) - mixpanel_147c917d38611395fce1429821044574people table created [Mixpanel - MPDB.swift - func createTableFor(:)] (info) - mixpanel_147c917d38611395fce1429821044574_groups table created 2021-09-29 13:54:32.213290+0900 Tengo[41204:11914439] [logging] disk I/O error in "SELECT id, data FROM mixpanel_147c917d38611395fce1429821044574_events WHERE flag = 0 ORDER BY time" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - SELECT statement for table mixpanel_147c917d38611395fce1429821044574_events could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:54:32.214530+0900 Tengo[41204:11914439] [logging] disk I/O error in "SELECT id, data FROM mixpanel_147c917d38611395fce1429821044574_people WHERE flag = 0 ORDER BY time" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - SELECT statement for table mixpanel_147c917d38611395fce1429821044574_people could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:54:32.215037+0900 Tengo[41204:11914439] [logging] disk I/O error in "SELECT id, data FROM mixpanel_147c917d38611395fce1429821044574_groups WHERE flag = 0 ORDER BY time" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - SELECT statement for table mixpanel_147c917d38611395fce1429821044574groups could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error [Mixpanel - Network.swift - func buildURLRequest(:resource:)] (debug) - Fetching URL [Mixpanel - Network.swift - func buildURLRequest(:resource:)] (debug) - Fetching URL [Mixpanel - Network.swift - func buildURLRequest(:resource:)] (debug) - https://api.mixpanel.com/decide?version=1&lib=iphone&token=147c917d38611395fce1429821044574&distinct_id=01083227129&properties=%7B%22$swift_lib_version%22:%223.0.0.beta.5%22,%22$ios_app_release%22:%221.1.6%22,%22$ios_device_model%22:%22iPhone12,1%22,%22$ios_version%22:%2214.7.1%22,%22$ios_app_version%22:%2262%22,%22$ios_lib_version%22:%223.0.0.beta.5%22%7D [Mixpanel - Network.swift - func buildURLRequest(_:resource:)] (debug) - https://api.mixpanel.com/decide?version=1&lib=iphone&token=147c917d38611395fce1429821044574&distinct_id=01083227129&properties=%7B%22$swift_lib_version%22:%223.0.0.beta.5%22,%22$ios_app_release%22:%221.1.6%22,%22$ios_device_model%22:%22iPhone12,1%22,%22$ios_version%22:%2214.7.1%22,%22$ios_app_version%22:%2262%22,%22$ios_lib_version%22:%223.0.0.beta.5%22%7D [Mixpanel - MPDB.swift - func insertRow(_:data:flag:)] (info) - Successfully inserted row into table mixpanel_147c917d38611395fce1429821044574_events 2021-09-29 13:55:40.539386+0900 Tengo[41204:11914801] [logging] disk I/O error in "SELECT id, data FROM mixpanel_147c917d38611395fce1429821044574_events WHERE flag = 0 ORDER BY time" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - SELECT statement for table mixpanel_147c917d38611395fce1429821044574events could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error [Mixpanel - MPDB.swift - func readRows(:numRows:flag:)] (info) - Successfully read 1 from table mixpanel_147c917d38611395fce1429821044574_events 2021-09-29 13:55:40.542069+0900 Tengo[41204:11914801] [logging] disk I/O error in "SELECT id, data FROM mixpanel_147c917d38611395fce1429821044574people WHERE flag = 0 ORDER BY time" [Mixpanel - Flush.swift - func flushQueueInBatches(:type:)] (debug) - Sending batch of data [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - SELECT statement for table mixpanel_147c917d38611395fce1429821044574_people could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:55:40.544686+0900 Tengo[41204:11914801] [logging] disk I/O error in "SELECT id, data FROM mixpanel_147c917d38611395fce1429821044574_groups WHERE flag = 0 ORDER BY time" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - SELECT statement for table mixpanel_147c917d38611395fce1429821044574groups could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error [Mixpanel - Flush.swift - func flushQueueInBatches(:type:)] (debug) - [["id": 1, "event": Complete Purchase, "$mpmetadata": { [Mixpanel - Network.swift - func buildURLRequest(:resource:)] (debug) - Fetching URL [Mixpanel - Network.swift - func buildURLRequest(:resource:)] (debug) - https://api.mixpanel.com/track/ [Mixpanel - MPDB.swift - func deleteRows(:ids:)] (info) - Succesfully deleted rows from table mixpanel_147c917d38611395fce1429821044574_events 2021-09-29 13:56:40.539344+0900 Tengo[41204:11915042] [logging] disk I/O error in "SELECT id, data FROM mixpanel_147c917d38611395fce1429821044574_events WHERE flag = 0 ORDER BY time" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - SELECT statement for table mixpanel_147c917d38611395fce1429821044574_events could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:56:40.540060+0900 Tengo[41204:11915042] [logging] disk I/O error in "SELECT id, data FROM mixpanel_147c917d38611395fce1429821044574_people WHERE flag = 0 ORDER BY time" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - SELECT statement for table mixpanel_147c917d38611395fce1429821044574_people could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error 2021-09-29 13:56:40.540548+0900 Tengo[41204:11915042] [logging] disk I/O error in "SELECT id, data FROM mixpanel_147c917d38611395fce1429821044574_groups WHERE flag = 0 ORDER BY time" [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - SELECT statement for table mixpanel_147c917d38611395fce1429821044574_groups could not be prepared [Mixpanel - MPDB.swift - func logSqlError(message:)] (error) - disk I/O error

zihejia commented 2 years ago

hi @billkim84 , Sorry for the late response. Could you see at least some events or nothing at all? What about Android? If nothing, could you share your tracking code snippet? Did you ever call flush() manually?

dror-laguna commented 2 years ago

calling flush worked for me but i don't want to manged it on my own? is that an open issue? IOS is not automatically flush events?

zihejia commented 2 years ago

Hi @dror-laguna , the default flush internal is 60s, and if you put your app in the background, it will flush. But we can tweak it a bit shorter and will release a new version for this.

vmatsiiako commented 2 years ago

I have the same issue. Has anyone found a solution?

zihejia commented 2 years ago

There was an issue that might cause the iOS flush timer to stop working. It's been fixed in 1.3.5. Now it should flush when the default flush timer expires(every 60s). If you need events to be sent immediately, you can call flush() manually. Please also check the FAQ for Why aren't my events showing up?. I'm closing this issue now, please feel free to reopen if the problem still exists.