tvirl icon indicating copy to clipboard operation
tvirl copied to clipboard

Philips: Cant remove old channels! after reinstalling app [ERR-5-PHILIPS]

Open NoWLB opened this issue 6 years ago • 39 comments

Reinstalled the app, and now the channels are stuck on there cant add new ones and cant remove the old ones, making my tv (55oled903/12) unuseable so i cant use antenna channels. because the memory is full or something (i dont know why)

NoWLB avatar Jul 13 '19 20:07 NoWLB

Did you try reinstalling the app, and re-removing the channels?

On Sun, 14 Jul 2019, 04:22 NoWLB, [email protected] wrote:

Reinstalled the app, and now the channels are stuck on there cant add new ones and cant remove the old ones, making my tv (55oled903/12) unuseable so i cant use antenna channels. because the memory is full or something (i dont know why)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/stari4ek/tvirl/issues/5?email_source=notifications&email_token=AFLWGQYOXTFXRHHIG4IVQZ3P7I2RVA5CNFSM4IDBXK42YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G7BP3HQ, or mute the thread https://github.com/notifications/unsubscribe-auth/AFLWGQ23P55VQ26WFN2VYY3P7I2RVANCNFSM4IDBXK4Q .

ghost avatar Jul 14 '19 03:07 ghost

I tried to do that, but it only deleted 0 channels and 0 programs. I dont know if the link is dead because i tried a 24 hour test of a iptv company. If i try with another link I only getting this error IMG_20190713_191258

do you have any idea :/?

NoWLB avatar Jul 14 '19 09:07 NoWLB

I have tried to "Reinstall the tv" but it dosent delete the channel memory.

and i have disk space on my tv (about 10Gb)

NoWLB avatar Jul 14 '19 09:07 NoWLB

Please check the FAQ about TVirl's integration to system: https://github.com/stari4ek/tvirl/wiki/faq

TVirl installs all data (channels and programs) to system DB. Cleaning data from system settings for TVirl does not remove those data. TVirl's own "clean all" from it's main menu does remove all previously installed data if it succeed.

It looks like you have Philips TV.

This issue is plaguing Philips TVs and only them. Some other users with huge amount of channels reported it before.

Philips system has some kind of device-specific issue with it's disk partitions and system database TVirl uses to cooperate with system.

This kind of error raises for other devices when there is no free disk space and errors are always fixed when free disk space is allocated. But on Philips it happens even if there're plenty of free disk space (as reported by the system).

My guesses based on all technical evidences that Philips TV has their own unique non-standard disk partitions layout for system folders. And those partition is small and it can be filled up by active DB usage from TVirl or other apps.

All TV (channels/programs) data are managed by next system packages:

  • "TV Storage" (com.android.providers.tv)
  • "Live TV" (com.android.tv)
  • "Live Channels" (com.google.android.tv)

You can try to clean up those apps using system settings - but according to reports from other users - there is no luck with it. (it does work on shield/mibox)

Sorry, I do not have Philips TV to investigate this device-specific issue.

stari4ek avatar Jul 26 '19 09:07 stari4ek

Error comes from ContentResolver which operates with sqlite:

Caused by: android.database.sqlite.SQLiteException: cannot rollback - no transaction is active (code 1)

Digging around sqlite source code didn't bring any valuable evidences.

Callstack:

java.lang.RuntimeException: Failed to delete channels (batch)
	at by.stari4ek.iptv4atv.tvinput.tvcontract.b4.e.a(ActionRemoveChannelsBatch.java:17)
	at by.stari4ek.iptv4atv.tvinput.tvcontract.b4.e.a(ActionRemoveChannelsBatch.java:1)
	at by.stari4ek.iptv4atv.tvinput.tvcontract.d4.e.a(ChannelsInstaller.java:6)
	at by.stari4ek.iptv4atv.tvinput.tvcontract.d4.b.a(Unknown Source:10)
	at h.b.k0.e.b.g0$a.a(FlowableMap.java:4)
	at by.stari4ek.iptv4atv.tvinput.tvcontract.f4.f1$a.a(OperatorBatchChannelsTasks.java:6)
	at by.stari4ek.iptv4atv.tvinput.tvcontract.f4.f1$a.a(OperatorBatchChannelsTasks.java:1)
	at by.stari4ek.iptv4atv.tvinput.tvcontract.f4.j1$a.a(OperatorReorderObsoleteChannelsFirst.java:6)
	at by.stari4ek.iptv4atv.tvinput.tvcontract.f4.j1$a.a(OperatorReorderObsoleteChannelsFirst.java:1)
	at h.b.k0.e.b.j$a.a(FlowableDistinct.java:5)
	at h.b.k0.e.b.e$a.a(FlowableConcatArray.java:3)
	at h.b.k0.e.b.j0$a.b(FlowableOnBackpressureBuffer.java:14)
Caused by: android.database.sqlite.SQLiteException: cannot rollback - no transaction is active (code 1)
	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:179)
	at android.database.DatabaseUtils.readExceptionWithOperationApplicationExceptionFromParcel(DatabaseUtils.java:158)
	at android.content.ContentProviderProxy.applyBatch(ContentProviderNative.java:522)
	at android.content.ContentProviderClient.applyBatch(ContentProviderClient.java:465)
	at android.content.ContentResolver.applyBatch(ContentResolver.java:1578)
	at by.stari4ek.utils.f.a(ContentResolverUtils.java:2)
	at by.stari4ek.utils.f.a(ContentResolverUtils.java:1)
	at by.stari4ek.iptv4atv.tvinput.tvcontract.b4.e.a(ActionRemoveChannelsBatch.java:15)
	at by.stari4ek.iptv4atv.tvinput.tvcontract.b4.e.a(ActionRemoveChannelsBatch.java:1)
	at by.stari4ek.iptv4atv.tvinput.tvcontract.d4.e.a(ChannelsInstaller.java:6)
	at by.stari4ek.iptv4atv.tvinput.tvcontract.d4.b.a(Unknown Source:10)
	at h.b.k0.e.b.g0$a.a(FlowableMap.java:4)

stari4ek avatar Jul 26 '19 09:07 stari4ek

I have this issue too (I have 2 Philips Android TVs) is this not solvable using TVirl or any other known app? Once importing IPTV channels can you not reimport again? Thanks.

mjs00000 avatar Aug 08 '19 19:08 mjs00000

@mjs00000, TVirl do changes in system DB with channels only if there are changes in playlist itself. So if there is no changes - it won't touch "channels" DB. But "programs" DB is changed all the time if you have valid EPG and update it time-to-time.

stari4ek avatar Aug 08 '19 20:08 stari4ek

BTW, I saw same error from Firebase library (google's one) which failed to perform some DB operations during app's start-up. So it's not related to TVirl itself, but system issue.

stari4ek avatar Aug 08 '19 20:08 stari4ek

Hey! I have an update on this problem. We returned the tv and bought another one,

But the old tv did they sent to the Service company, And what I see they changed the whole mainboard of the old tv.

So maybe this is a hardware breaking problem and you maybe should Remove the support of the app for Philips tv to this get fixed.

Kind Regards Noel

NoWLB avatar Sep 06 '19 12:09 NoWLB

Thank you for the update

stari4ek avatar Sep 07 '19 19:09 stari4ek

Multiple users reported that issue gone by itself.

stari4ek avatar Sep 25 '19 18:09 stari4ek

So its has been fixed?

NoWLB avatar Sep 26 '19 08:09 NoWLB

Do not know any specifics. It could be TV software update or some kind of auto-purging finally working.

stari4ek avatar Sep 26 '19 19:09 stari4ek

I just found this thread while trying to fix this problem your app caused with my Philips Android TV. The TV is just 1 day old and I have lost the Favourites function after getting this error. A factory reset has not solved the issue. Please help me recover Favourites.

markbelch avatar Dec 26 '19 00:12 markbelch

What Tv modell did you get and what android version do you have? and have you tried to software update it?

NoWLB avatar Dec 26 '19 09:12 NoWLB

The tv is a Philips 50PUS7304/12. I have been able to do a factory reset now. There's still one problem, I am unable to create a Favourites List. All I get is a black screen. I previously had a Favourites List of satellite channels.

markbelch avatar Dec 26 '19 12:12 markbelch

I just found this thread while trying to fix this problem your app caused with my Philips Android TV. The TV is just 1 day old and I have lost the Favourites function after getting this error. A factory reset has not solved the issue. Please help me recover Favourites.

Please note, that TVirl does nothing harmful to the system. It adds channels/programs/logo to the system according to API provided by Android TV/Tv Input Framework (https://source.android.com/devices/tv).

It works well for all other devices (Sony, MiBox, NVidia Shield, ...).

There is some issue on Philips side with their implementation of TV App/TV Input Framework which prevents it from working properly.

There's still one problem, I am unable to create a Favourites List

Sorry, TVirl does not anything about "favourites list". This is not part of "Tv Input Framework" and there is no way TVirl can manipulate with it.

BTW, there is small amount (comparing to others) of Philips users who uses TVirl

stari4ek avatar Dec 26 '19 15:12 stari4ek

@markbelch , Can you explain a bit what did happened exactly? Have you got error referenced here (SQLiteException or "disk is full")? Or there was some conflict with satellite channels?

If first one, how big your playlist? How many channels and logo do you have in it?

stari4ek avatar Dec 26 '19 15:12 stari4ek

I've blocked (at least temporary) Philips TVs in Play Store console for TVirl for now. I don't believe that they will ever fix their crappy software (there're some other issues related to Philips only) but without real tv in hands it's impossible to investigate issues and find out any workaround for it

stari4ek avatar Dec 26 '19 15:12 stari4ek

I have 4705 channels in the playlist plus logos and was only getting the "disk is full" error. I think I should replace the TV with a Sony instead so that I can use TVirl. For me, the integration of IPTV + Satellite channels into one channel list is the main attraction of an Android TV.

markbelch avatar Dec 26 '19 17:12 markbelch

Sony has it's own twists sometime but it does not have that much troubles for TVirl. Honestly speaking all TVs have issues and some own specifics related to "Tv Input Framework" (most probably they polish system TV App for own cable/satellite needs and break other system stuff for 3rd party tv inputs like TVirl). Sony, TCL, Xiaomi, but Philips is the most problematic in my experience. Most polished and supported Android TV device is NVidia Shield, hands down here.

@markbelch, Did you manage to fully reset your TV? Cause other Philips users reported that when they reset device - channels stay on the device, even if no playlist installation performed by TVirl after reset (this is another "wtf?"). If so, please provide some information or link for other users to follow if needed.

4k playlist is not the biggest one (there're some 20-40k+ with VODs playlists used in the wild). One user reported that there wasn't "disk is full" error when he installed playlist with logo disabled. TVirl adds all channels logo to system DB and this is the most consuming part of those DB. Default (from AOSP) implementation of TvProvider (com.android.providers.tv system package) resizes all images before adding them to the DB. But there is no guarantee that Philips implementation performs the same. If there are any limitations for DB itself - theoretically it can bring this kind of issue. In next version (0.4.4.5) TVirl will resize all channel's logo by itself before sending to system DB. So, theoretically, it can prevent "overflowing" DB if there're limitations and it does not resize images by itself.

stari4ek avatar Dec 26 '19 20:12 stari4ek

I wasn't able to fully reset the Philips TV. The satellite channels I had tuned in were deleted but my original favourites list returned. Previously, I had no access to a favourites list at all, however I got the favourites list back but it could not be edited. Any channels added to the list could not be saved, deleted or moved.

The TV was working for a few hours but suddenly shut itself down. I now only get the Android Recovery screen. Clicking factory data reset from this screen results in a cycle of the TV formatting and erasing data > the Philips logo > the Android boot logo > a black screen.

After about 12-15 cycles, the set up screen appears. I can pair the remote and select my region but the the TV powers off and returns to the Android Recovery screen. The TV is now totally useless and I haven't been able to find any solution to recover the system.

I suspect the cause of the problem is caused by Philips poor implementation of Android.

IMG_7411

markbelch avatar Dec 29 '19 12:12 markbelch

I have a replacement Philips TV coming. I'd like to install Live Channels then reinstall the playlist on TVirl without the logos. I'll update on how it goes.

markbelch avatar Dec 29 '19 16:12 markbelch

Thank you for the update.

There is update (0.4.4.5) coming which have some functionality added on TVirl's side, which is implemented in AOSP version of Tv Input Framework, but for example is missing (or configured in another way) on Sony. So, there is a chance that it's also missing on Philips:

  • resize channel's logo images to fit into 256x256 px before adding
  • automatically remove old programs
  • automatically remove programs when it's channel removed

Theoretically, it can workaround issue with SQL DB on Philips.

stari4ek avatar Jan 02 '20 14:01 stari4ek

Issue is still valid. I'm getting reports for Philips TV which fails to add/delete channels.

stari4ek avatar Apr 28 '20 07:04 stari4ek

According to report from user, having favorites added for channels from TVirl - prevented system from proper reset (there were installed channels after wipe, and they did work). Removing all favorites and performing another reset - did remove installed channels.

This is really hard to tell, what the magic is happening with Philips TVs

stari4ek avatar May 06 '20 09:05 stari4ek

Another callstack, when TVirl tries to delete programs for channel which was removed from playlist:

com.pushtorefresh.storio3.StorIOException: Error has occurred during Delete operation. query = DeleteQuery{uri=content://android.media.tv/program?channel=68, where='', whereArgs=[]}
	at e.g.a.c.e.a.e$c.a(PreparedDeleteByQuery.java:8)
	at e.g.a.d.a.b(ChainImpl.java:5)
	at e.g.a.c.e.a.d.a(PreparedDelete.java:6)
        ... 
 Caused by: android.database.sqlite.SQLiteFullException: database or disk is full (code 13)
	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:175)
	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
	at android.content.ContentProviderProxy.delete(ContentProviderNative.java:547)
	at android.content.ContentResolver.delete(ContentResolver.java:1636)
       ...

stari4ek avatar May 19 '20 13:05 stari4ek

This issue can be solved by resetting the TV. Here is the guide provided by user which got it from Philips support: Guide: How to reset Philips

stari4ek avatar Jul 29 '20 13:07 stari4ek

Got more concrete error on

  • Philips 4K UHD LED Android TV with Ambilight 3-sided and Google Assistant
  • Android 9
  • Disk free: 1.04 GB
Caused by android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 4874 SQLITE_IOERR_SHMSIZE)
       at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:177)
       at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
       at android.content.ContentProviderProxy.query(ContentProviderProxy.java:418)
       at android.content.ContentResolver.query(ContentResolver.java:802)
       at android.content.ContentResolver.query(ContentResolver.java:752)
       at android.content.ContentResolver.query(ContentResolver.java:710)
       at com.pushtorefresh.storio3.contentresolver.impl.DefaultStorIOContentResolver$LowLevelImpl.query(DefaultStorIOContentResolver.java:317)
       at com.pushtorefresh.storio3.contentresolver.operations.get.DefaultGetResolver.performGet(DefaultGetResolver.java:20)
       at com.pushtorefresh.storio3.contentresolver.operations.get.PreparedGetListOfObjects$RealCallInterceptor.intercept(PreparedGetListOfObjects.java:80)
       at com.pushtorefresh.storio3.impl.ChainImpl.proceed(ChainImpl.java:65)
       at com.pushtorefresh.storio3.contentresolver.operations.get.PreparedGet.executeAsBlocking(PreparedGet.java:45)
       at com.pushtorefresh.storio3.contentresolver.operations.get.PreparedGetMandatoryResult.executeAsBlocking(PreparedGetMandatoryResult.java:27)
       at com.pushtorefresh.storio3.operations.internal.SingleOnSubscribeExecuteAsBlocking.subscribe(SingleOnSubscribeExecuteAsBlocking.java:28)
       at io.reactivex.internal.operators.single.SingleCreate.subscribeActual(SingleCreate.java:39)
       at io.reactivex.Single.subscribe(Single.java:3666)
       at io.reactivex.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)
       at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:578)
       at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
       at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:764)

From documentation (https://www.sqlite.org/rescode.html#ioerr_shmsize):

(4874) SQLITE_IOERR_SHMSIZE The SQLITE_IOERR_SHMSIZE error code is an extended error code for SQLITE_IOERR indicating an I/O error within the xShmMap method on the sqlite3_io_methods object while trying to enlarge a "shm" file as part of WAL mode transaction processing. This error may indicate that the underlying filesystem volume is out of space.

"volume is out of space" while "Disk free: 1.04 GB". Still looks like TvProvider's DB is stored on volume with limited amount of space or quota applied

stari4ek avatar Aug 12 '20 09:08 stari4ek

According to adb logcat obtained from a device, Philips does mirror TV database to "user settings" partition (/data/vendor/user_setting/rw/tv.db-wal):

12-01 21:25:27.154  7581  8195 I SQLiteConnection: /data/vendor/user_setting/rw/tv.db-wal 31043584 bytes: Bigger than 1048576; truncating
12-01 21:25:27.245  7581  8195 E SQLiteLog: (13) statement aborts at 1: [PRAGMA wal_checkpoint(TRUNCATE)] database or disk is full
12-01 21:25:27.246  7581  8195 W SQLiteConnection: Failed to truncate the -wal file
12-01 21:25:27.246  7581  8195 W SQLiteConnection: android.database.sqlite.SQLiteFullException: database or disk is full (code 13 SQLITE_FULL)
12-01 21:25:27.246  7581  8195 W SQLiteConnection: 	at android.database.sqlite.SQLiteConnection.nativeExecuteForString(Native Method)
12-01 21:25:27.246  7581  8195 W SQLiteConnection: 	at android.database.sqlite.SQLiteConnection.executeForString(SQLiteConnection.java:691)
12-01 21:25:27.246  7581  8195 W SQLiteConnection: 	at android.database.sqlite.SQLiteConnection.maybeTruncateWalFile(SQLiteConnection.java:345)
12-01 21:25:27.246  7581  8195 W SQLiteConnection: 	at android.database.sqlite.SQLiteConnection.setWalModeFromConfiguration(SQLiteConnection.java:307)
12-01 21:25:27.246  7581  8195 W SQLiteConnection: 	at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:218)
12-01 21:25:27.246  7581  8195 W SQLiteConnection: 	at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:196)
12-01 21:25:27.246  7581  8195 W SQLiteConnection: 	at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:503)
12-01 21:25:27.246  7581  8195 W SQLiteConnection: 	at android.database.sqlite.SQLiteConnectionPool.tryAcquireNonPrimaryConnectionLocked(SQLiteConnectionPool.java:987)
12-01 21:25:27.246  7581  8195 W SQLiteConnection: 	at android.database.sqlite.SQLiteConnectionPool.waitForConnection(SQLiteConnectionPool.java:693)
12-01 21:25:27.246  7581  8195 W SQLiteConnection: 	at android.database.sqlite.SQLiteConnectionPool.acquireConnection(SQLiteConnectionPool.java:378)
12-01 21:25:27.246  7581  8195 W SQLiteConnection: 	at android.database.sqlite.SQLiteSession.acquireConnection(SQLiteSession.java:894)
12-01 21:25:27.246  7581  8195 W SQLiteConnection: 	at android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:834)
12-01 21:25:27.246  7581  8195 W SQLiteConnection: 	at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62)
12-01 21:25:27.246  7581  8195 W SQLiteConnection: 	at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:149)
12-01 21:25:27.246  7581  8195 W SQLiteConnection: 	at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:137)
12-01 21:25:27.246  7581  8195 W SQLiteConnection: 	at android.database.CursorToBulkCursorAdaptor.getBulkCursorDescriptor(CursorToBulkCursorAdaptor.java:145)
12-01 21:25:27.246  7581  8195 W SQLiteConnection: 	at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:111)
12-01 21:25:27.246  7581  8195 W SQLiteConnection: 	at android.os.Binder.execTransact(Binder.java:731)
>adb shell df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/root             2.2G  1.6G  590M  75% /
tmpfs                 977M  380K  976M   1% /dev
tmpfs                 977M     0  977M   0% /mnt
/dev/block/dm-1       438M  235M  194M  55% /vendor
/dev/block/mmcblk0p37 4.8G  1.9G  2.7G  42% /data
/dev/block/mmcblk0p5  5.8M  116K  5.5M   3% /perm
tmpfs                 977M   23M  954M   3% /data/vendor/tmp
/dev/block/mmcblk0p20 248M  9.2M  234M   4% /data/vendor/3rd_rw
/data/media           4.8G  1.9G  2.7G  42% /storage/emulated

stari4ek avatar Dec 01 '20 19:12 stari4ek