Git Product home page Git Product logo

haloinfinitegetter's Introduction

About Me

I am a self-taught developer with an educational background in Information Technology. Interested in Networking and related subjects.

Currently: Reverse Engineering Web APIs

Favorite Languages:

Python C# Rust


Github Stats

haloinfinitegetter's People

Contributors

cubicpath avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

haloinfinitegetter's Issues

[Feature]: Exception Logger and Status Bar

Contact Details

[email protected]

Feature Request

As of v0.9.2, there is no way to view any raised exceptions when launched without a console.

A status bar should be added at the bottom of the AppWindow, displaying the current application status and the most recent
exception, as well as the total number of exceptions.

Warnings should also be distinct from normal exceptions.

[Bug]: `shiboken6` incompatibility with `pywin32`

Contact Details

[email protected]

What happened?

I've noticed a very obscure and problematic bug that can cause crashes on startup. Unfortunately I can no longer replicate this, so it may be slightly inaccurate, but here is the rundown of what is causing the crash:

The has_package util calls WorkingSet() from pkg_resources, which loads all modules installed in the current environment. Somewhere along here, a shibokensupport module is dynamically created (supposedly from shiboken6) and hooks on to the Python import. When pkg_resources then tries to load the pywin32_system32 module, a SyntaxError is raised. It is my assumption that shibokensupport is trying to read the pywintypes310.dll file as a python module.

Uninstalling pywin32, or just removing the pywin32_system32 module solves the crashing. In some cases, installing all optional dependencies of HaloInfiniteGetter also solved the crashing. Additionally, running the program with the PyCharm debugger attached also causing zero crashes. I'll attempt to investigate this further but wanted to document it while I had the chance.

Version

v0.13a1

What operating system are you using?

Windows

Relevant log output

Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\tokenize.py", line 332, in find_cookie
    line_string = line.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x90 in position 2: invalid start byte

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "%:\Users\User\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Projects\Programs\Python\HaloInfiniteGetter\src\hi_getter\__main__.py", line 16, in <module>
    exit_code: int = main(*sys.argv)
  File "C:\Projects\Programs\Python\HaloInfiniteGetter\src\hi_getter\run.py", line 28, in main
    GetterApp.create(*args)
  File "C:\Projects\Programs\Python\HaloInfiniteGetter\src\hi_getter\models.py", line 459, in create
    cls.__init__(cls.__instance, *args, **kwargs)
  File "C:\Projects\Programs\Python\HaloInfiniteGetter\src\hi_getter\gui\app.py", line 132, in __init__
    self._register_archive_formats()
  File "C:\Projects\Programs\Python\HaloInfiniteGetter\src\hi_getter\gui\app.py", line 227, in _register_archive_formats
    if not has_package('py7zr'):
  File "C:\Projects\Programs\Python\HaloInfiniteGetter\src\hi_getter\utils\package.py", line 142, in has_package
    from pkg_resources import WorkingSet
  File "C:\Projects\Programs\Python\HaloInfiniteGetter\venv\lib\site-packages\pkg_resources\__init__.py", line 74, in <module>
    from pkg_resources.extern import appdirs
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 674, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 571, in module_from_spec
  File "C:\Projects\Programs\Python\HaloInfiniteGetter\venv\lib\site-packages\pkg_resources\extern\__init__.py", line 52, in create_module
    return self.load_module(spec.name)
  File "C:\Projects\Programs\Python\HaloInfiniteGetter\venv\lib\site-packages\pkg_resources\extern\__init__.py", line 37, in load_module
    __import__(extant)
  File "C:\Projects\Programs\Python\HaloInfiniteGetter\venv\lib\site-packages\pkg_resources\_vendor\appdirs.py", line 560, in <module>
    import win32com.shell
  File "C:\Projects\Programs\Python\HaloInfiniteGetter\venv\lib\site-packages\win32com\__init__.py", line 6, in <module>
    import pythoncom
  File "C:\Projects\Programs\Python\HaloInfiniteGetter\venv\lib\site-packages\pythoncom.py", line 2, in <module>
    import pywintypes
  File "shibokensupport/signature/loader.py", line 61, in feature_imported
  File "shibokensupport/feature.py", line 137, in feature_imported
  File "shibokensupport/feature.py", line 148, in _mod_uses_pyside
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\inspect.py", line 1147, in getsource
    lines, lnum = getsourcelines(object)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\inspect.py", line 1129, in getsourcelines
    lines, lnum = findsource(object)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\inspect.py", line 954, in findsource
    lines = linecache.getlines(file, module.__dict__)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\linecache.py", line 46, in getlines
    return updatecache(filename, module_globals)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\linecache.py", line 136, in updatecache
    with tokenize.open(fullname) as fp:
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\tokenize.py", line 396, in open
    encoding, lines = detect_encoding(buffer.readline)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\tokenize.py", line 373, in detect_encoding
    encoding = find_cookie(first)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\tokenize.py", line 337, in find_cookie
    raise SyntaxError(msg)
SyntaxError: invalid or missing encoding declaration for 'C:\\Projects\\Programs\\Python\\HaloInfiniteGetter\\venv\\lib\\site-packages\\pywin32_system32\\pywintypes310.dll'

Process finished with exit code 1

[Bug]: QMenu memory leak

Contact Details

[email protected]

What happened?

Pressing any of the toolbar menus allocates ~150KB of memory to create a QMenu, which is never de-allocated until the application is exited. This can pool up to over 100MB is pressed repeatably.

Version

v0.8.2

What operating system are you using?

Windows

Relevant log output

No response

[Feature]: Add ability to ignore/manage missing soft-dependencies

Contact Details

[email protected]

Feature Request

Currently, missing a soft-dependency (such as py7zr and python-dotenv) displays an error popup, which asks the user if they want to install it.

This is fine, but if they don't want to install it (for whatever reason) they have no option to hide the popups later on. This could be slightly annoying, so a tool/window which allows you to easily view/manage dependencies and hide popups would be a good addition.

[Bug]: Automatic re-authentication failing

Contact Details

[email protected]

What happened?

After pressing the "Clear API Token" button, automatic re-authentication fails after the first (successful) authentication.
Relaunching HaloInfiniteGetter can be used as a temporary workaround.

In all cases tested, you can only authenticate once before it fails, where relaunching the app fixes it. This is likely an issue with the Client's session management.

Version

v0.8.1

What operating system are you using?

Windows

Relevant log output

401: Unauthorized
No permission -- Your API token is most likely invalid.

[Feature]: Ability to use pre-existing JSONs to scan.

Contact Details

[email protected]

Feature Request

I've been fetching different endpoints from Infinite's API for a few months now, and different items have been removed/changed on those endpoints, yet they still exist on the API. Having the ability to import custom JSONs to scan would help build a broader cache library.

[Feature]: Change run:run to run:main

Contact Details

[email protected]

Feature Request

'main' is a more consistent entry-point function name as opposed to 'run'.

This would also remove any confusion between the run module and the run function that you import from said module.

[Bug]: QFileDialog randomly crashing application

Contact Details

[email protected]

What happened?

QFileDialog randomly crashing application when closed on Windows with exit code 0xC0000005.

This seems only to happen when calling its static methods (ex: QFileDialog.getOpenFileName) through a context menu action, and only with the native file dialog.

This is most likely due to the context menu being deleted (through Qt.WA_DeleteOnClose) before the native file dialog is closed, causing an Access Violation exception. If the application eventloop was slower in deleting the internal QMenu object, this would likely not cause any crashes.

One possible solution would be removing the Qt.WA_DeleteOnClose attribute from context menus, and garbage collecting the menus through a QTimer hooked onto QMenu.close.

Another is to ditch the native file dialog entirely and use the builtin qt dialog through using the options=QFileDialog.Option.DontUseNativeDialog kwarg.

Version

v0.12a1

What operating system are you using?

Windows

Relevant log output

Process finished with exit code -1073741819 (0xC0000005)

[Bug]: Cannot reauthenticate (Permission Denied)

Contact Details

[email protected]

What happened?

When attempting to reauthenticate, the client overwrites the user's .wpauth config file (for persistant authentication). This worked before, but no longer works as of v0.9.

Attempting to delete the file proves successful, even with no permission to overwrite.
This is likely related to the file being hidden in Windows.

Version

v0.9

What operating system are you using?

Windows

Relevant log output

Traceback (most recent call last):
  File "C:\Projects\Programs\Python\HaloInfiniteGetter\src\hi_getter\gui\windows.py", line 586, in use_input
    data = self.client.get_hi_data(search_path)
  File "C:\Projects\Programs\Python\HaloInfiniteGetter\src\hi_getter\client.py", line 135, in get_hi_data
    response: Response = self.get(path)
  File "C:\Projects\Programs\Python\HaloInfiniteGetter\src\hi_getter\client.py", line 122, in get
    self.refresh_auth()
  File "C:\Projects\Programs\Python\HaloInfiniteGetter\src\hi_getter\client.py", line 197, in refresh_auth
    self.wpauth = wpauth
  File "C:\Projects\Programs\Python\HaloInfiniteGetter\src\hi_getter\client.py", line 252, in wpauth
    WPAUTH_PATH.write_text(self._wpauth)
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\pathlib.py", line 1152, in write_text
    with self.open(mode='w', encoding=encoding, errors=errors, newline=newline) as f:
  File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\pathlib.py", line 1117, in open
    return self._accessor.open(self, mode, buffering, encoding, errors,
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\User\\.config\\hi_getter\\.wpauth'

[Bug]: Freezing when loading a large JSON file

Contact Details

[email protected]

What happened?

After downloading a large JSON file (ex: waypoint/file/models/olympus-body.json) the app significantly slows down when loading the data, then freezes.

The only workaround is to forcefully kill its process after the download.

Version

v0.9.1

What operating system are you using?

Windows

Relevant log output

No response

[Bug]: Application not closing gracefully

Contact Details

[email protected]

What happened?

Application does not close gracefully after an output widget has been detached.

Version

v0.4.1

What operating system are you using?

Windows

Relevant log output

Process finished with exit code -1073741819 (0xC0000005)

[Feature]: Track ETag changes to find updated files.

Contact Details

[email protected]

Feature Request

With the way that the caching system for Infinite is built, each CMS response has a "ETag" response header which is a hash that updates whenever a file is modified. Using this, a cache could be built to track changes and update existing files accordingly.

[Bug]: Program doesn't launch after installing and running hi_getter

Contact Details

No response

What happened?

I am on python 3.10.11 and i installed via pip. I have tried to run hi_getter, but nothing happens. no error is thrown, and no program window pops up. Is there anything I can try to get the program launching? I also tried running python -m hi_getter and it gave the output below

Version

v0.13

What operating system are you using?

Windows

Relevant log output

PS C:\Users\user> python -m hi_getter
Sub class of QObject not inheriting QObject!? Crash will happen when using Client.
Sub class of QObject not inheriting QObject!? Crash will happen when using VersionChecker.
Sub class of QObject not inheriting QObject!? Crash will happen when using _SignalHolder.
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\micro\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\hi_getter\__main__.py", line 16, in <module>
    exit_code: int = main(*sys.argv)
  File "C:\Users\micro\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\hi_getter\run.py", line 28, in main
    GetterApp.create(*args)
  File "C:\Users\micro\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\hi_getter\models.py", line 430, in create
    cls.__init__(cls.__instance, *args, **kwargs)
  File "C:\Users\micro\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\hi_getter\gui\app.py", line 103, in __init__
    self.session: NetworkSession = NetworkSession(self)
  File "C:\Users\micro\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\hi_getter\network\manager.py", line 167, in __init__
    self.manager: QNetworkAccessManager = QNetworkAccessManager(manager_parent)
TypeError: 'PySide6.QtNetwork.QNetworkAccessManager.__init__' called with wrong argument types:
  PySide6.QtNetwork.QNetworkAccessManager.__init__(GetterApp)
Supported signatures:
  PySide6.QtNetwork.QNetworkAccessManager.__init__(Optional[PySide6.QtCore.QObject] = None)```

[Bug]: Files outside of progression do not fetch.

Contact Details

[email protected]

What happened?

When trying to scan endpoints such as https://gamecms-hacs.svc.halowaypoint.com/hi/Progression/guide/xo?flight=[flightID], a 403 error is returned, as that directory does not exist (404s are for files in waypoint API). The cause of this is that InfiniteGetter tries to fetch https://gamecms-hacs.svc.halowaypoint.com/hi/progression/file/guide/xo?flight=0ca7dc01-0016-427f-b765-13bf56f3722e, adding an additional /file/ in front of the path.

Version

v0.12.2

What operating system are you using?

Windows

Relevant log output

Could not get resource at:
https://gamecms-hacs.svc.halowaypoint.com/hi/progression/file/guide/xo?flight=0ca7dc01-0016-427f-b765-13bf56f3722e

Reason:
-----------------------------------
403: Forbidden
Request forbidden -- You cannot get this resource with or without an API token.

[Feature]: Cache Explorer

Contact Details

[email protected]

Feature Request

Currently you have to self-navigate through the file explorer to view cached files. This feature request suggests the ability to natively view cached files in a tree-like file view.

[Feature]: Implement QNetworkManager for HTTP requests

Contact Details

[email protected]

Feature Request

Currently, all network requests are made in succession of each other on 1 thread, which indirectly slows the speed of the GUI.

Moving HTTP requests to the builtin PySide6 QNetworkManager API should allow for easy asynchronous requests, along with an easy way to hook responses to functions.

This may also remove the requests dependency, if 100% converted.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.