Willy-JL / F95Checker

GNU General Public License v3.0
113 stars 17 forks source link

Login window issues #66

Closed zu2abv8h closed 1 year ago

zu2abv8h commented 1 year ago

Thank you for this project. I like the idea and would love to use it, unfortunately the "refresh" button doesn't seem to do anything for me: Screenshot from 2023-02-26 15-26-25 The refresh button keeps on showing "0%" after I click it, even after a restart of the application, and even if I try refreshing then cancelling several times in a row.

I see some logs in my terminal when clicking on the Refresh button, but it doesn't help me:

$ ./F95Checker-Debug 
Attribute Qt::AA_ShareOpenGLContexts must be set before QCoreApplication is created.
WARNING: QApplication was not created in the main() thread.

(F95Checker-Debug:263666): GLib-CRITICAL **: 15:29:08.636: g_main_context_push_thread_default: assertion 'acquired_context' failed

(both F95Checker and F95Checker-Debug show the same output)

Not sure if that helps, but here is the dump of the database in ~/.config/f95checker/db.sqlite3:

INSERT INTO games (id, name, version, developer, type, status, url, added_on, last_updated, last_full_check, last_check_version, last_played, score, rating, played, installed, updated, archived, executables, description, changelog, tags, labels, notes, image_url, downloads) VALUES (21005, 'lust-theory-v1-0-3-inceton', 'Unchecked', '', 23, 5, 'https://f95zone.to/threads/21005', 1677087208, 0, 0, '', 0, 0, 0, 0, '', 0, 0, '[]', '', '', '[]', '[]', '', '', '[]');
INSERT INTO settings (_, background_on_close, bg_notifs_interval, bg_refresh_interval, browser_custom_arguments, browser_custom_executable, browser_html, browser_private, browser, cell_image_ratio, check_notifs, confirm_on_remove, datestamp_format, default_exe_dir, display_mode, fit_images, grid_columns, ignore_semaphore_timeouts, interface_scaling, last_successful_refresh, manual_sort_list, mark_installed_after_add, max_retries, quick_filters, refresh_completed_games, refresh_workers, render_when_unfocused, request_timeout, rpc_enabled, rpdl_username, rpdl_password, rpdl_token, scroll_amount, scroll_smooth, scroll_smooth_speed, select_executable_after_add, show_remove_btn, start_in_background, start_refresh, style_accent, style_alt_bg, style_bg, style_border, style_corner_radius, style_text, style_text_dim, timestamp_format, use_parser_processes, vsync_ratio, zoom_area, zoom_times, zoom_enabled) VALUES (0, 0, 15, 30, '', '', 0, 0, 0, 3, 1, 1, '%d/%m/%Y', '', 1, 0, 3, 0, 1, 0, '[]', 0, 2, 1, 1, 20, 1, 30, 1, '', '', '', 1, 1, 8, 0, 0, 0, 0, '#d4202e', '#101010', '#0a0a0a', '#454545', 6, '#ffffff', '#808080', '%d/%m/%Y %H:%M', 1, 1, 50, 4, 1);
INSERT INTO sqlite_master (type, name, tbl_name, rootpage, sql) VALUES ('table', 'settings', 'settings', 2, 'CREATE TABLE settings (
            _ INTEGER PRIMARY KEY CHECK (_=0), background_on_close INTEGER DEFAULT 0, bg_notifs_interval INTEGER DEFAULT 15, bg_refresh_interval INTEGER DEFAULT 30, browser_custom_arguments TEXT    DEFAULT "", browser_custom_executable TEXT    DEFAULT "", browser_html INTEGER DEFAULT 0, browser_private INTEGER DEFAULT 0, browser INTEGER DEFAULT 0, cell_image_ratio REAL    DEFAULT 3.0, check_notifs INTEGER DEFAULT 1, confirm_on_remove INTEGER DEFAULT 1, datestamp_format TEXT    DEFAULT "%d/%m/%Y", default_exe_dir TEXT    DEFAULT "", display_mode INTEGER DEFAULT 1, fit_images INTEGER DEFAULT 0, grid_columns INTEGER DEFAULT 3, ignore_semaphore_timeouts INTEGER DEFAULT 0, interface_scaling REAL    DEFAULT 1.0, last_successful_refresh INTEGER DEFAULT 0, manual_sort_list TEXT    DEFAULT "[]", mark_installed_after_add INTEGER DEFAULT 0, max_retries INTEGER DEFAULT 2, quick_filters INTEGER DEFAULT 1, refresh_completed_games INTEGER DEFAULT 1, refresh_workers INTEGER DEFAULT 20, render_when_unfocused INTEGER DEFAULT 1, request_timeout INTEGER DEFAULT 30, rpc_enabled INTEGER DEFAULT 1, rpdl_username TEXT    DEFAULT "", rpdl_password TEXT    DEFAULT "", rpdl_token TEXT    DEFAULT "", scroll_amount REAL    DEFAULT 1.0, scroll_smooth INTEGER DEFAULT 1, scroll_smooth_speed REAL    DEFAULT 8.0, select_executable_after_add INTEGER DEFAULT 0, show_remove_btn INTEGER DEFAULT 0, start_in_background INTEGER DEFAULT 0, start_refresh INTEGER DEFAULT 0, style_accent TEXT    DEFAULT "#d4202e", style_alt_bg TEXT    DEFAULT "#101010", style_bg TEXT    DEFAULT "#0a0a0a", style_border TEXT    DEFAULT "#454545", style_corner_radius INTEGER DEFAULT 6, style_text TEXT    DEFAULT "#ffffff", style_text_dim TEXT    DEFAULT "#808080", timestamp_format TEXT    DEFAULT "%d/%m/%Y %H:%M", use_parser_processes INTEGER DEFAULT 1, vsync_ratio INTEGER DEFAULT 1, zoom_area INTEGER DEFAULT 50, zoom_times REAL    DEFAULT 4.0, zoom_enabled INTEGER DEFAULT 1
        )');
INSERT INTO sqlite_master (type, name, tbl_name, rootpage, sql) VALUES ('table', 'games', 'games', 3, 'CREATE TABLE games (
            id INTEGER PRIMARY KEY, name TEXT    DEFAULT "", version TEXT    DEFAULT "Unchecked", developer TEXT    DEFAULT "", type INTEGER DEFAULT 23, status INTEGER DEFAULT 5, url TEXT    DEFAULT "", added_on INTEGER DEFAULT 0, last_updated INTEGER DEFAULT 0, last_full_check INTEGER DEFAULT 0, last_check_version TEXT    DEFAULT "", last_played INTEGER DEFAULT 0, score REAL    DEFAULT 0, rating INTEGER DEFAULT 0, played INTEGER DEFAULT 0, installed TEXT    DEFAULT "", updated INTEGER DEFAULT NULL, archived INTEGER DEFAULT 0, executables TEXT    DEFAULT "[]", description TEXT    DEFAULT "", changelog TEXT    DEFAULT "", tags TEXT    DEFAULT "[]", labels TEXT    DEFAULT "[]", notes TEXT    DEFAULT "", image_url TEXT    DEFAULT "", downloads TEXT    DEFAULT "[]"
        )');
INSERT INTO sqlite_master (type, name, tbl_name, rootpage, sql) VALUES ('table', 'cookies', 'cookies', 4, 'CREATE TABLE cookies (
            key TEXT    PRIMARY KEY, value TEXT    DEFAULT ""
        )');
INSERT INTO sqlite_master (type, name, tbl_name, rootpage, sql) VALUES ('index', 'sqlite_autoindex_cookies_1', 'cookies', 5, null);
INSERT INTO sqlite_master (type, name, tbl_name, rootpage, sql) VALUES ('table', 'labels', 'labels', 6, 'CREATE TABLE labels (
            id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT    DEFAULT "", color TEXT    DEFAULT "#696969"
        )');
INSERT INTO sqlite_master (type, name, tbl_name, rootpage, sql) VALUES ('table', 'sqlite_sequence', 'sqlite_sequence', 7, 'CREATE TABLE sqlite_sequence(name,seq)');

and imgui.ini:

[Window][Debug##Default]
Pos=60,60
Size=400,400
Collapsed=0

[Window][F95Checker]
ScreenPos=2831,190
Pos=0,0
Size=1280,720
Collapsed=0

[Table][0xF661F773,20]
RefScale=18
Column 0  Width=-1
Column 1  Width=4
Column 2  Width=4
Column 3  Width=4
Column 4  Width=26
Column 5  Width=87
Column 6  Weight=1.0000 Sort=0v
Column 7  Width=-1
Column 8  Width=108
Column 9  Width=-1
Column 10 Width=-1
Column 11 Width=33
Column 12 Width=33
Column 13 Width=-1
Column 14 Width=-1
Column 15 Width=30
Column 16 Width=-1
Column 17 Width=-1
Column 18 Width=-1
Column 19 Width=-1

One thing that may be relevant is that the application never prompted me for my F95zone credentials, isn't it supposed to?

Is there something I can do to help troubleshooting this issue? System: Ubuntu 22.04.2 LTS 64 bits

Willy-JL commented 1 year ago

Yes something is broken with the login windows

ParaplegicRacehorse commented 1 year ago

This has been a thing since previous stable release. If it helps, I copied login_broken.bin to login_broken.html and opened it in Firefox. Find a screenshot below. It never stops stops loading, never moves on to anything else. Just keeps that weird spinny set of dots going. This also happens in Brave.

Argh. For some reason, I can't attach a screenshot.

It's a DDoS-Guard thing "Checking your browser accessing." Unknown what it's actually doing behind the scenes.

{ Manjaro GNOME Wayland session } -- Hmm. Could this be a Wayland thing?

zu2abv8h commented 1 year ago

@ParaplegicRacehorse I can't find any file called login_broken.bin in my local installation.

Can the DDoS-guard setting be disabled, if you think that's the source of the problem?

ParaplegicRacehorse commented 1 year ago

I can't find any file called login_broken.bin in my local installation.

I don't pretend to know where it came from. I just noticed it was there in my install.

Can the DDoS-guard setting be disabled, if you think that's the source of the problem?

I just opened up $HOME/.config/f95checker because it's been a while since I looked there. Files found: db.sqlite3, f95checker.json, imgui.ini and a folder named images which contains pre- update-failure images from the games I want to monitor.

f95checker.json appears to be many, but not all, of the settings in a conveniently editable text file.

At the very top are fields "username" and "password". Those fields were empty. On a lark, I filled my F95 credentials and launched the checker. No-go. It still won't refresh and load updates.

I then noticed it has a "debug" and "max_retries" fields. I set them to true and 15 (from 5), respectively, and restarted the checker. It again failed to fetch new updates. I didn't time exactly, but the time spent attempting the refresh was considerable less than 15 seconds. And my app-dir/log.txt file was not updated.

Also in f95checker.json is an "advanced" section which is just a browser user-agent and cookie stuff. I have, in the gui settings, selected the integral browser. I emptied the values of all the cookies and re-ran the checker. Not only did it fail to refresh, but the cookie values were not repopulated.

I am very much doubting the checker looks in this file for anything or if this is for a previous release. If it does not check here, I would like to know where it stores its data.

imgui.ini appears to contain only window drawing stuff.

db.sqlite3 is, as you might guess, a sqlite database. I don't have software for conveniently parsing sqlite but, when I opened it in vim, it looks like it's full of (unreferenced?) version changelogs for games.

As an additional note, I get no console output when launching from terminal vs. gui filebrowser.

ParaplegicRacehorse commented 1 year ago

I just tried a thing out.

I moved $HOME/.config/f95checker/ to a different place and launched the application. It did not load any games. It did not successfully "refresh" or offer to log me into f95zone. It did create a new $HOME/.config/f95checker/ with db.sqlite3, images folder (empty) and imgui.ini. It did not create a new settings json file, presumably because I didn't mess with any settings during this test.

Willy-JL commented 1 year ago

This has been a thing since previous stable release. If it helps, I copied login_broken.bin to login_broken.html and opened it in Firefox. Find a screenshot below. It never stops stops loading, never moves on to anything else. Just keeps that weird spinny set of dots going. This also happens in Brave.

Argh. For some reason, I can't attach a screenshot.

It's a DDoS-Guard thing "Checking your browser accessing." Unknown what it's actually doing behind the scenes.

{ Manjaro GNOME Wayland session } -- Hmm. Could this be a Wayland thing?

at some point you got an error logging in and it created that file. opening it wont change anything in the tool, it is used just to let me know what is happening. if its ddos guard, not much to do about it. looks like your ip got flagged...

it could be a wayland thing as for the login window not opening

I can't find any file called login_broken.bin in my local installation.

Can the DDoS-guard setting be disabled, if you think that's the source of the problem?

that file wont help you in any way, again just for me to know whats going wrong. and it it had created one, youd have seen it on screen, it tells you it did so and says to report that error to me. and ddos guard is not a setting, its a protection against ddos attacks that f95zone. cant just be disabled, and its not something i enabled.

... all the stuff you said ...

@ParaplegicRacehorse i put an FAQ for a reason. the json file is old, from previous installations (pre 9.0). 9.0+ only uses the sqlite database. you can view and edit it with sqlite browser. the imgui.ini file is just interface settings, like column order and so on.

zu2abv8h commented 1 year ago

@Willy-JL Is there a way to simulate that I have entered the F95Zone credentials by filling some fields in the SQLite database?

Willy-JL commented 1 year ago

authentication is done with cookies and stored in the "cookies" table of the database. you could log in on browser and dump all the cookies from the browser session into the database

Willy-JL commented 1 year ago

Managed to replicate, not sure on a solution tho. Issue seems to be that QT needs a fresh environment to start a browser instance, i do that with multiprocessing spawn method, but when compiled to executable, spawn is not supported, so it resorts to fork, and that is not a clean environment for QT.

Willy-JL commented 1 year ago

Should be fixed via ae01aad95adb946e859657cf20ab69d94ce539f9, can't replicate it now while I was able before. reelase is incoming

Willy-JL commented 1 year ago

Fixed in 10.1.2

sonikun commented 5 months ago

I am facing similar issue when starting checker from scratch. I added a game and clicked refresh.. A small login window opened but it said multiple .dll files are missing, but they are right there. Hence failing to login. image image image image image