gort818 / qtwebflix

A qt webengine program for netflix
GNU General Public License v3.0
248 stars 28 forks source link

Crash after qt5-webengine update #53

Closed magicvodi closed 5 years ago

magicvodi commented 5 years ago

After updating qt5-webengine on Arch today, qtwebflix crashes after a few seconds, right after loading the Netflix homepage. Downgrading qt5-webengine solves the problem. I tried recompiling the package from git, it doesn't change anything.

$ grep qt5-webengine /var/log/pacman.log
[...]
[2019-02-06 08:41] [ALPM] upgraded qt5-webengine (5.12.0-1 -> 5.12.1-1)
$ ./qtwebflix --version
qtwebflix 0.1-161-g9168c4c
$ ./qtwebflix 
Netflix Player detected! Injecting Netflix 1080p Unlocker...
Transitioning to new MPRIS interface:  21NetflixMprisInterface
[14936:14972:0206/104818.218658:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: PRAGMA auto_vacuum
[14936:14972:0206/104818.218691:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: PRAGMA journal_mode = TRUNCATE
[14936:14972:0206/104818.218734:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: SELECT name FROM sqlite_master WHERE type=? AND name=? COLLATE NOCASE
[14936:14972:0206/104818.218775:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: SELECT name FROM sqlite_master WHERE type=? AND name=? COLLATE NOCASE
[14936:14972:0206/104818.218789:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR)
[14936:14972:0206/104818.218878:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: PRAGMA auto_vacuum
[14936:14972:0206/104818.218978:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: PRAGMA journal_mode = TRUNCATE
[14936:14972:0206/104818.219055:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: SELECT name FROM sqlite_master WHERE type=? AND name=? COLLATE NOCASE
[14936:14972:0206/104818.219137:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: SELECT name FROM sqlite_master WHERE type=? AND name=? COLLATE NOCASE
[14936:14972:0206/104818.219202:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR)
[14936:14936:0206/104818.348991:ERROR:binder_registry.h(100)] Failed to locate a binder for interface "media.mojom.PlatformVerification".
js: Uncaught TypeError: Cannot read property 'jsonGraph' of undefined
[14936:14948:0206/104819.956295:FATAL:client_socket_pool_base.cc(845)] Check failed: i != group_map_.end(). 
#0 0x7f8c0bf05b2e <unknown>
#1 0x7f8c0be7ff5c <unknown>
#2 0x7f8c0c3e8df9 <unknown>
#3 0x7f8c0c2dd3b3 <unknown>
#4 0x7f8c0c1fcc31 <unknown>
#5 0x7f8c0c1fcdaa <unknown>
#6 0x7f8c0e685545 <unknown>
#7 0x7f8c0e683d70 <unknown>
#8 0x7f8c0e683dd1 <unknown>
#9 0x7f8c0e685cd9 <unknown>
#10 0x7f8c0e685d11 <unknown>
#11 0x7f8c0e674d5b <unknown>
#12 0x7f8c0e675021 <unknown>
#13 0x7f8c0cbe50a2 <unknown>
#14 0x7f8c0cbe5131 <unknown>
#15 0x7f8c0bcd85ef <unknown>
#16 0x7f8c0c181c54 <unknown>
#17 0x7f8c0c18490b <unknown>
#18 0x7f8c0c1864f4 <unknown>
#19 0x7f8c0c18a455 <unknown>
#20 0x7f8c0c17fb86 <unknown>
#21 0x7f8c0c19b2a0 <unknown>
#22 0x7f8c0c19b555 <unknown>
#23 0x7f8c0ac212f3 <unknown>
#24 0x7f8c0ac20bff <unknown>
#25 0x7f8c0ac1d81a <unknown>
#26 0x7f8c0ac14745 <unknown>
#27 0x7f8c0ac06d2b <unknown>
#28 0x7f8c0ac29cbc <unknown>
#29 0x7f8c0bf15dd7 <unknown>
#30 0x7f8c072af552 <unknown>
#31 0x7f8c072afcf7 event_base_loop
#32 0x7f8c0bf13a09 <unknown>
#33 0x7f8c0beaca5b <unknown>
#34 0x7f8c0b85f644 <unknown>
#35 0x7f8c0bee18e8 <unknown>
#36 0x7f8c0bf10b71 <unknown>
#37 0x7f8c07a38a9d start_thread
#38 0x7f8c0808eb23 __GI___clone

Received signal 6
#0 0x7f8c0bf05b2e <unknown>
#1 0x7f8c0bf04f4b <unknown>
#2 0x7f8c0bf05587 <unknown>
#3 0x7f8c07fcae00 <unknown>
#4 0x7f8c07fcad7f __GI_raise
#5 0x7f8c07fb5672 __GI_abort
#6 0x7f8c0bef9cf5 <unknown>
#7 0x7f8c0be80036 <unknown>
#8 0x7f8c0c3e8df9 <unknown>
#9 0x7f8c0c2dd3b3 <unknown>
#10 0x7f8c0c1fcc31 <unknown>
#11 0x7f8c0c1fcdaa <unknown>
#12 0x7f8c0e685545 <unknown>
#13 0x7f8c0e683d70 <unknown>
#14 0x7f8c0e683dd1 <unknown>
#15 0x7f8c0e685cd9 <unknown>
#16 0x7f8c0e685d11 <unknown>
#17 0x7f8c0e674d5b <unknown>
#18 0x7f8c0e675021 <unknown>
#19 0x7f8c0cbe50a2 <unknown>
#20 0x7f8c0cbe5131 <unknown>
#21 0x7f8c0bcd85ef <unknown>
#22 0x7f8c0c181c54 <unknown>
#23 0x7f8c0c18490b <unknown>
#24 0x7f8c0c1864f4 <unknown>
#25 0x7f8c0c18a455 <unknown>
#26 0x7f8c0c17fb86 <unknown>
#27 0x7f8c0c19b2a0 <unknown>
#28 0x7f8c0c19b555 <unknown>
#29 0x7f8c0ac212f3 <unknown>
#30 0x7f8c0ac20bff <unknown>
#31 0x7f8c0ac1d81a <unknown>
#32 0x7f8c0ac14745 <unknown>
#33 0x7f8c0ac06d2b <unknown>
#34 0x7f8c0ac29cbc <unknown>
#35 0x7f8c0bf15dd7 <unknown>
#36 0x7f8c072af552 <unknown>
#37 0x7f8c072afcf7 event_base_loop
#38 0x7f8c0bf13a09 <unknown>
#39 0x7f8c0beaca5b <unknown>
#40 0x7f8c0b85f644 <unknown>
#41 0x7f8c0bee18e8 <unknown>
#42 0x7f8c0bf10b71 <unknown>
#43 0x7f8c07a38a9d start_thread
#44 0x7f8c0808eb23 __GI___clone
  r8: 0000000000000000  r9: 00007f8bd27f9c40 r10: 0000000000000008 r11: 0000000000000246
 r12: 00007f8bd27fa0c0 r13: 00007f8bd27fa0e0 r14: 000000000000006c r15: 00007f8bd27f9ec0
  di: 0000000000000002  si: 00007f8bd27f9c40  bp: 00007f8bd27f9e90  bx: 0000000000000006
  dx: 0000000000000000  ax: 0000000000000000  cx: 00007f8c07fcad7f  sp: 00007f8bd27f9c40
  ip: 00007f8c07fcad7f efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.
gort818 commented 5 years ago

I will look into this, it seems they have updated chromium, and changed the way cookies are stored. I would start with removing ~/.local/share/qtwebflix/QtWebEngine/Default and ~/.cache/qtwebflix and see if that helps

omni6 commented 5 years ago

I can confirm some odd behaviour.. my login data wasn't saved and i had to fill in login every restart. Compiled against new qt version and deleted cache and config, everything is fine again.

gort818 commented 5 years ago

Removing the cache seemed to stop the crashes but I still get the login page every time I reload.

gort818 commented 5 years ago

@omni6 can you tell me the steps you took I am still getting a sqlite error and have to log in each time.

omni6 commented 5 years ago

@gort818 sorry, have to correct myself. The login issue persists.

magicvodi commented 5 years ago

I will look into this, it seems they have updated chromium, and changed the way cookies are stored. I would start with removing ~/.local/share/qtwebflix/QtWebEngine/Default and ~/.cache/qtwebflix and see if that helps

Crashing stopped, but i have the same login issue.

$ qtwebflix 
js: Refused to apply style from 'https://www.netflix.com/personalization/cl2/freeform/WebsiteDetect?source=wwwhead&fetchType=css&modalView=login' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
normal ua "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.0 Chrome/69.0.3497.128 Safari/537.36"
fixed ua "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.0 Chrome/69.0.3497.128 Safari/537.36"
Transitioning to new MPRIS interface:  21NetflixMprisInterface
[8757:8790:0208/153153.459237:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: PRAGMA auto_vacuum
[8757:8790:0208/153153.459266:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: PRAGMA journal_mode = TRUNCATE
[8757:8790:0208/153153.459298:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: SELECT name FROM sqlite_master WHERE type=? AND name=? COLLATE NOCASE
[8757:8790:0208/153153.459335:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: SELECT name FROM sqlite_master WHERE type=? AND name=? COLLATE NOCASE
[8757:8790:0208/153153.459347:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR)
[8757:8790:0208/153153.459433:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: PRAGMA auto_vacuum
[8757:8790:0208/153153.459447:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: PRAGMA journal_mode = TRUNCATE
[8757:8790:0208/153153.459466:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: SELECT name FROM sqlite_master WHERE type=? AND name=? COLLATE NOCASE
[8757:8790:0208/153153.459489:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: SELECT name FROM sqlite_master WHERE type=? AND name=? COLLATE NOCASE
[8757:8790:0208/153153.459500:ERROR:connection.cc(1862)] Cookie sqlite error 5, errno 0: database is locked, sql: CREATE TABLE meta(key LONGVARCHAR NOT NULL UNIQUE PRIMARY KEY, value LONGVARCHAR)
js: Refused to apply style from 'https://www.netflix.com/personalization/cl2/freeform/WebsiteDetect?source=wwwhead&fetchType=css&modalView=login' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
normal ua "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.0 Chrome/69.0.3497.128 Safari/537.36"
fixed ua "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.0 Chrome/69.0.3497.128 Safari/537.36"
 write settings: "https://www.netflix.com/at-en/Login?nextpage=https%3A%2F%2Fwww.netflix.com%2Fbrowse%3Flocale%3Den-AT"
gort818 commented 5 years ago

It is definitely a chromium issue, best thing we can do for now is to downgrade qtwebengine.

sudo pacman -U /var/cache/pacman/pkg/qt5-webengine-5.12.0-1-x86_64.pkg.tar.xz
omni6 commented 5 years ago

Someone have to file a bug report... But what i dont't understand is that this issue seems to be qtweblix only. Should it be the same if i use falkon/qute to login netflix?

gort818 commented 5 years ago

@omni6 Have you tested it in Falkon?

omni6 commented 5 years ago

Yes tested it right now. Falkon stays logged in!

omni6 commented 5 years ago

@gort818 just a feeling ... build qtwebflix from here

https://github.com/gort818/qtwebflix/tree/1aecbdd1bb929c29c6054c3ba5eb412c9b1af01a

Here login still works

omni6 commented 5 years ago

OK

When i switch from master to 1aecbdd1bb929c29c6054c3ba5eb412c9b1af01a everything works. Switching back: crash

[8616:8616:0211/202732.476113:ERROR:binder_registry.h(100)] Failed to locate a binder for interface "media.mojom.PlatformVerification".
Received signal 11 SEGV_ACCERR 7f665c13d1b0
#0 0x7f66dee3fb2e <unknown>
#1 0x7f66dee3ef4b <unknown>
#2 0x7f66dee3f587 <unknown>
#3 0x7f66daee7e00 <unknown>
#4 0x7f665c13d1b0 <unknown>
  r8: 0000000000000007  r9: 0000000000000006 r10: 00007f666e7fa60c r11: 0000000000000000
 r12: 00007f666e7fa750 r13: 00007f666e7fab80 r14: 00000000ffffffff r15: 0000000000000000
  di: 00007f665c09f890  si: 00007f665c14e1d0  bp: 00007f666e7fa940  bx: 00007f665c14e1b0
  dx: 00007f666e7fa750  ax: 00007f665c13d1b0  cx: 0000000000000000  sp: 00007f666e7fa748
  ip: 00007f665c13d1b0 efl: 0000000000010206 cgf: 002b000000000033 erf: 0000000000000015
 trp: 000000000000000e msk: 0000000000000000 cr2: 00007f665c13d1b0
[end of stack trace]
Calling _exit(1). Core file will not be generated.
gort818 commented 5 years ago

@omni6 can you bisect and find the bad commit? If not I will try later sometime this week.

omni6 commented 5 years ago

On it!

gort818 commented 5 years ago

@omni6 did some testing.. it seems setting the useragent causes qtwebflix to crash now. I will have to remove that for the moment.. that sucks.

gort818 commented 5 years ago

@magicvodi @omni6 Ok I think we are good can you guys give it a test?

omni6 commented 5 years ago

Ok I think we are good can you guys give it a test?

Done, already catched this commit yesterday but messed up with non deleted config files...anyway full qtwebflix power back again. Ever thought about a pre config menu where you can choose the streaming service? So you could start the webengine process without changing the useragent in running process... maybe also useful for the mpris interface for different sites!?

omni6 commented 5 years ago

@gort818

it seems setting the useragent causes qtwebflix to crash now. I will have to remove that for the moment.. that sucks.

Ah, i see you have found alternative to simply remove the ua-switcher...

gort818 commented 5 years ago

@omni6 so the problem appears when changing the user agent after a page has loaded while using the Qt library this was doable before 5.12.1, So it still changes the ua when using amazon prime but uses javascript instead.

I do have command line options where you can set the provider and ua before rendering the web page that still works fine.

gort818 commented 5 years ago

Can this be closed? Anyone still having issues?

magicvodi commented 5 years ago

I made a new build from master and it seems to work now.

JuBan1 commented 5 years ago

Hi there. I've had the same issue and can confirm that building from master fixes it for me too. Thanks for you work!

I've flagged the aur package as out-of-date so the maintainer knows to update the package.

omni6 commented 5 years ago

@JuBan1 I am the maintainer. Please do not mark git packages ood unless they doesn't build. Do not worry, i removed the ood flag already.

omni6 commented 5 years ago

@gort818 I think this can be closed.

gort818 commented 5 years ago

fixed with bf7dee5

The-Compiler commented 5 years ago

I've seen this in my own project as well - reported upstream as QTBUG- 75884.