AcademySoftwareFoundation / OpenRV

Open source version of RV, the Sci-Tech award-winning media review and playback software.
Other
589 stars 145 forks source link

[Bug]: RV on Windows cannot access cookies from two instances #187

Open mikepkes opened 1 year ago

mikepkes commented 1 year ago

What happened?

When RV launches on Windows, it causes a lock on the web cache/cookie db that prevents accesses from other instances of RV. This causes any web interface (such as Screening room, etc) to no longer have access to cookies, and cannot write cookies.

List all the operating systems versions where this is happening

Windows 10

On what computer hardware is this happening?

ThreadRippper with RTX 2080ti

Relevant console log output

[51188:53184:0623/112239.896:ERROR:cache_util_win.cc(20)] Unable to move the cache: Access is denied. (0x5)
[51188:53184:0623/112239.896:ERROR:cache_util.cc(140)] Unable to move cache folder <appdata>\Local\Autodesk\RV\cache\QtWebEngine\Default\Cache to <appdata>\Local\Autodesk\RV\cache\QtWebEngine\Default\old_Cache_002
[51188:53184:0623/112239.896:ERROR:disk_cache.cc(184)] Unable to create cache

Environment variables

No response

Extra information

No response

Code of Conduct

mikepkes commented 1 year ago

Additional output shows the db remains locked after waiting:

[51188:32692:0623/112309.337:ERROR:database.cc(1696)] Cookie sqlite error 5, errno 33: database is locked, sql: UPDATE cookies SET last_access_utc=? WHERE name=? AND host_key=? AND path=? [51188:32692:0623/112309.337:ERROR:database.cc(1696)] Cookie sqlite error 5, errno 33: database is locked, sql: UPDATE cookies SET last_access_utc=? WHERE name=? AND host_key=? AND path=? [51188:32692:0623/112309.337:ERROR:database.cc(1696)] Cookie sqlite error 5, errno 33: database is locked, sql: DELETE FROM cookies WHERE name=? AND host_key=? AND path=? [51188:32692:0623/112309.337:ERROR:database.cc(1696)] Cookie sqlite error 5, errno 33: database is locked, sql: INSERT INTO cookies (creation_utc, host_key, name, value, encrypted_value, path, expires_utc, is_secure, is_httponly, samesite, last_access_utc, has_expires, is_persistent, priority,source_scheme) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [51188:32692:0623/112309.338:ERROR:database.cc(1696)] Cookie sqlite error 5, errno 33: database is locked, sql: UPDATE cookies SET last_access_utc=? WHERE name=? AND host_key=? AND path=?
[51188:32692:0623/112309.338:ERROR:database.cc(1696)] Cookie sqlite error 5, errno 33: database is locked, sql: DELETE FROM cookies WHERE name=? AND host_key=? AND path=? [51188:32692:0623/112309.338:ERROR:database.cc(1696)] Cookie sqlite error 5, errno 33: database is locked, sql: INSERT INTO cookies (creation_utc, host_key, name, value, encrypted_value, path, expires_utc, is_secure, is_httponly, samesite, last_access_utc, has_expires, is_persistent, priority,source_scheme) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [51188:32692:0623/112309.338:ERROR:database.cc(1696)] Cookie sqlite error 5, errno 33: database is locked, sql: UPDATE cookies SET last_access_utc=? WHERE name=? AND host_key=? AND path=?
[51188:32692:0623/112309.338:ERROR:database.cc(1696)] Cookie sqlite error 5, errno 33: database is locked, sql: UPDATE cookies SET last_access_utc=? WHERE name=? AND host_key=? AND path=?
[51188:32692:0623/112309.338:ERROR:database.cc(1696)] Cookie sqlite error 5, errno 33: database is locked, sql: DELETE FROM cookies WHERE name=? AND host_key=? AND path=? [51188:32692:0623/112309.338:ERROR:database.cc(1696)] Cookie sqlite error 5, errno 33: database is locked, sql: INSERT INTO cookies (creation_utc, host_key, name, value, encrypted_value, path, expires_utc, is_secure, is_httponly, samesite, last_access_utc, has_expires, is_persistent, priority,source_scheme) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) [51188:32692:0623/112309.339:ERROR:database.cc(1696)] Cookie sqlite error 5, errno 33: cannot commit transaction - SQL statements in progress, sql: COMMIT [51188:32692:0623/112425.252:ERROR:database.cc(1696)] Cookie sqlite error 1, errno 33: cannot start a transaction within a transaction, sql: BEGIN TRANSACTION [51188:32144:0623/112529.769:ERROR:database.cc(1696)] Cookie sqlite error 1, errno 33: cannot start a transaction within a transaction, sql: BEGIN TRANSACTION [51188:21476:0623/112738.176:ERROR:database.cc(1696)] Cookie sqlite error 1, errno 33: cannot start a transaction within a transaction, sql: BEGIN TRANSACTION

geffrak commented 1 year ago

I believe this is a limitation from Qt WebEngine... It's possible to work around it by making the WebEngine Profile non-persistent, but then you lose your cookies when RV exits.

mpkepic commented 1 year ago

I think you are right; likely situations that mitigate this adopt a singleton app (which RV obviously has in rvpush, but this is specifically for times when you want two instances)

Yeah, one improvement would be to get a copy of the existing one and use that as a starting point; and log (as a WARNING) that the browser state will not persist.