Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Installs Inside of New Folder In Installation Directory #55

Closed
nicholas-ewing opened this issue Nov 15, 2022 · 18 comments
Closed
Assignees
Labels
question This is a request for clarification

Comments

@nicholas-ewing
Copy link

nicholas-ewing commented Nov 15, 2022

I am doing some tests with tufup on an application and when tufup installs the update from the local server, it works just fine. Only, it installs in a subfolder within the installation directory. So the application can never start because it never actually get overwritten by the new one.

AppData
|---Local
    |---Scheduling        (Installation Folder)
        |---Scheduling    (Where tufup installs the updates)

Steps to reproduce the behavior:
Following exact steps from tufup-example, but with my own application.

  1. Create app with version 0.1
  2. Bundle with tufup
  3. Change version to 0.2 & recreate
  4. Bundle with tufup
  5. Copy extracted files from Scheduling-0.1.tar.gz to C;/Users/newing/AppData/Local/Scheduling/
  6. Use http.server host from repository folder
  7. Run application, it stops, cmd opens for a few seconds (installing)
  8. All files from the update are in C:/Users/newing/AppData/Local/Scheduling/Scheduling/

Log file from after update:
install.log

Code from settings.py file in application:
(Almost an exact match to the example)

import toml, pathlib, os, sys
from file import getFilePath

FROZEN = getattr(sys, "frozen", False)

APP_NAME = "Scheduling"
APP_VERSION = "0.2"

# ?:/Program Files
# ?:/ProgramData
WIN_PER_MACHINE_PROGRAMS_DIR = pathlib.Path(os.getenv("ProgramFiles"))
WIN_PER_MACHINE_DATA_DIR = pathlib.Path(os.getenv("PROGRAMDATA"))

# ?:/Users/user/AppData/Local
# ?:/Users/user/AppData/Local/Programs
WIN_PER_USER_PROGRAMS_DIR = pathlib.Path(os.getenv("LOCALAPPDATA"))
WIN_PER_USER_DATA_DIR = WIN_PER_USER_PROGRAMS_DIR / "Programs"

# sys._MEIPASS if FROZEN, else 'updater' folder 
MODULE_DIR = pathlib.Path(__file__).resolve().parent

DEV_DIR = MODULE_DIR.parent.parent / "releases"

PROGRAMS_DIR = WIN_PER_USER_PROGRAMS_DIR if FROZEN else DEV_DIR
DATA_DIR = WIN_PER_USER_DATA_DIR if FROZEN else DEV_DIR
INSTALL_DIR = PROGRAMS_DIR / APP_NAME
UPDATE_CACHE_DIR = DATA_DIR / APP_NAME / "update_cache"
METADATA_DIR = UPDATE_CACHE_DIR / "metadata"
TARGET_DIR = UPDATE_CACHE_DIR / "targets"

toml_file = toml.load(getFilePath("config/appconfig.toml", False))
METADATA_BASE_URL = toml_file["updates"]["metadata_url"]
TARGET_BASE_URL = toml_file["updates"]["target_url"]

if FROZEN:
    TRUSTED_ROOT_SRC = MODULE_DIR.parent / "root.json"
else:
    TRUSTED_ROOT_SRC = MODULE_DIR.parent.parent / "repo/deploy/metadata/root.json"
TRUSTED_ROOT_DST = METADATA_DIR / "root.json"

Subfolder with the updated app file:
subfolder_in_install_dir

System Info:

  • OS: Windows 10
  • Python version: 3.8.6
  • Pip Version: 22.3
  • Tufup Version: 0.4.4

If I missed something important just let me know.

@dennisvang
Copy link
Owner

dennisvang commented Nov 16, 2022

@nicholas-ewing Thanks for trying out tufup. :-)

Although I don't think this is the cause of the issue, one thing does stand out in your code:

The WIN_PER_USER_DATA_DIR and the WIN_PER_USER_PROGRAMS_DIR seem to have been mixed up.

In tufup-example these are defined as (also see e.g. microsoft docs):

WIN_PER_USER_DATA_DIR = pathlib.Path(os.getenv('LOCALAPPDATA'))
WIN_PER_USER_PROGRAMS_DIR = WIN_PER_USER_DATA_DIR / 'Programs'

Also note that the per-machine path definitions can be removed if you only do per-user installs.

@dennisvang
Copy link
Owner

dennisvang commented Nov 16, 2022

@nicholas-ewing Some questions to help us figure out the cause of the issue:

  1. How do you "create" the new app version? Do you use PyInstaller? If so what does you *.spec look like, and what is the directory structure of your PyInstaller dist directory?
  2. How do you bundle the app with tufup: do you use the repo_add_bundle.py script from tufup-example, or do you use the command line interface (CLI)? If the latter, what is the exact command?

@dennisvang
Copy link
Owner

@nicholas-ewing Another question: Did you also try to run the tufup-example without modification? Did that work?

@dennisvang
Copy link
Owner

dennisvang commented Nov 16, 2022

@nicholas-ewing And one more:

How is the tufup Client instantiated in your app?

Specifically, what value do you specify for the app_install_dir argument?

This ultimately determines where your files end up.

For example:

client = Client(..., app_install_dir=settings.INSTALL_DIR, ...)

@dennisvang dennisvang added the needs more info More information is needed to figure this out label Nov 16, 2022
@dennisvang
Copy link
Owner

@nicholas-ewing And yet another question:

How exactly do you "run" your app when doing the update? (your step 7.)

@nicholas-ewing
Copy link
Author

nicholas-ewing commented Nov 16, 2022

@dennisvang

Thanks for pointing out that I mixed up the per-user data and program directories. However, after fixing that problem (and I even tried reverting back to see if I could fix it) now I'm facing a new problem, this one is with python-tuf itself not tufup but I can't see any reason why it's happening and maybe you could be of some assistance with this problem as well.
When I open the application, it closes a few seconds later and leaves this error popup:

Traceback (most recent call last):
  File "main.py", line 27, in <module>
  File "updater\__init__.py", line 41, in main
  File "updater\__init__.py", line 24, in update
  File "tufup\client.py", line 132, in download_and_apply_update
  File "tufup\client.py", line 229, in _download_updates
  File "tuf\ngclient\updater.py", line 248, in download_target
  File "contextlib.py", line 113, in __enter__
  File "tuf\ngclient\fetcher.py", line 107, in download_file
tuf.api.exceptions.DownloadLengthMismatchError: Downloaded 42860829 bytes exceeding the maximum allowed length of 42859985

The file it is attempting to download (Scheduling-0.2.tar.gz) is listed as a size of 42,860,829 bytes and a size on disk of 42,864,640 bytes. It didn't do this before, and I have changed nothing but the flipped data & program directories in regards to the update files for the application. Also, going to localhost:8000/targets and manually downloading the 0.2 tgz file, it downloads as the correct size.

I would like to also add that I chose to name the "temp" directory in your example as "releases" in my use.
Now to answer your questions:

  1. I create a new app using a .bat and a .spec similar to your example.
    create_exe.bat:
pyinstaller -y --clean --distpath "../releases/dist" --workpath "../releases/build" Scheduling.spec
if not exist "../releases/dist/Scheduling/config" mkdir "../releases/dist/Scheduling/config"
if not exist "../releases/dist/Scheduling/config/appconfig.toml" copy "config\appconfig.toml" "../releases/dist/Scheduling/config/appconfig.toml"

Scheduling.spec: (command and file)

pyi-makespec -D -w --noupx --splash "../application_files/intrasect.png" -i "../application_files/calendar.ico" --add-data "assets;assets" --add-data "../releases/repository/metadata/root.json;." -n Scheduling main.py
# -*- mode: python ; coding: utf-8 -*-


block_cipher = None


a = Analysis(
    ['main.py'],
    pathex=[],
    binaries=[],
    datas=[('assets', 'assets'), ('../releases/repository/metadata/root.json', '.')],
    hiddenimports=[],
    hookspath=[],
    hooksconfig={},
    runtime_hooks=[],
    excludes=[],
    win_no_prefer_redirects=False,
    win_private_assemblies=False,
    cipher=block_cipher,
    noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
splash = Splash(
    '../application_files/intrasect.png',
    binaries=a.binaries,
    datas=a.datas,
    text_pos=None,
    text_size=12,
    minify_script=True,
    always_on_top=True,
)

exe = EXE(
    pyz,
    a.scripts,
    splash,
    [],
    exclude_binaries=True,
    name='Scheduling',
    debug=False,
    bootloader_ignore_signals=False,
    strip=False,
    upx=False,
    console=False,
    disable_windowed_traceback=False,
    argv_emulation=False,
    target_arch=None,
    codesign_identity=None,
    entitlements_file=None,
    icon=['..\\application_files\\calendar.ico'],
)
coll = COLLECT(
    exe,
    a.binaries,
    a.zipfiles,
    a.datas,
    splash.binaries,
    strip=False,
    upx=False,
    upx_exclude=[],
    name='Scheduling',
)
  1. I use the CLI command from the parent directory of "releases" (where .tufup-repo-config is)
    tufup targets add 0.1 releases/dist releases/keystore
    tufup targets add 0.2 releases/dist releases/keystore
    I did also try:
    tufup targets add 0.1 releases/dist/Scheduling releases/keystore
    to see if this would only package the application files and not the directory which they are created in -- it didn't work.

  2. I only really looked around the tufup-example, I never actually ran it, but I will work on that to see if it works once I post this reply.

  3. Here is the update function from my updater.__init__.py file:
    I used * to import the values defined in updater.settings.py, so they aren't prefixed with 'settings'

def update() -> None:
    # Create update client
    client = Client(
        app_name = APP_NAME,
        app_install_dir = INSTALL_DIR,
        current_version = APP_VERSION,
        metadata_dir = METADATA_DIR,
        metadata_base_url = METADATA_BASE_URL,
        target_dir = TARGET_DIR,
        target_base_url = TARGET_BASE_URL,
        refresh_required = False
    )

    if client.check_for_updates():
        client.download_and_apply_update(
            skip_confirmation=True,
            progress_hook = progressHook,
            purge_dst_dir = False,
            exclude_from_purge = None,
            log_file_name = "install.log"
        )
  1. I run my application my double-clicking the exe file in the installation directory.

Once again, if I forgot something just let me know. I'll let you know if the example works.

@nicholas-ewing
Copy link
Author

I just used your example application in tufup-example and I had the exact same problem. The extracted files are put in a "main" folder within the install directory. I also tried using temp/dist/main instead of temp/dist when using the tufup CLI command and it resulted in the same thing.

tufup-example

Since that didn't work I'll look through the past few commits on my project and see if I missed some change that is causing the error I described in my previous reply.

@nicholas-ewing
Copy link
Author

Looking through the past few commits of my project, nothing had changed with the updater module from the time I made this issue to when I fixed the program and data directory switch. I also considered the possibility that when I copy the config folder into the application folder after it was compiled could be causing the download mismatch error. However, the error still occurred when I didn't bundle the config folder and instead manually copied the config folder to the installation directory.

@dennisvang
Copy link
Owner

dennisvang commented Nov 16, 2022

@nicholas-ewing Thanks for the highly detailed response.

I've just gone through the tufup-example cycle twice: once using repo_add_bundle.py, and once using the CLI to add a bundle.

It turns out that the instructions for step 3 (repo-side) in the tufup-example readme are inconsistent:

repo_add_bundle.py points to temp/dist/main, which is inconsistent with the suggested tufup targets add 1.0 temp/dist temp/keystore

Nevertheless, both executabes appear to work as expected.

I did notice some empty folders appearing in one case, and a main folder appearing in the other case (similar to your description?), which I'll need to look into. EDIT: this is a separate issue (#56)

Did you inspect the content of the main folder that appeared after the tufup-example update?

Could you try running the tufup-example executable from the same location before and after the update, this time not by double clicking, but by running it from a command window? That way you'll be able to inspect the version number in the output.

@nicholas-ewing
Copy link
Author

I will try the tufup-example again, but can you confirm if the tufup CLI command is meant to use temp/dist or temp/dist/main?

@nicholas-ewing
Copy link
Author

Here is the output from tufup-example (these were bundled using temp/dist, since it looks like you were saying that is the correct path, if I'm wrong with that let me know) when I run the exe twice:

C:\Users\newing\AppData\Local\Programs\my_app>main
INFO:__main__:my_app 1.0
DEBUG:tuf.ngclient._internal.trusted_metadata_set:Updating initial trusted root
INFO:tuf.ngclient._internal.trusted_metadata_set:Loaded trusted root v1
DEBUG:tuf.ngclient.fetcher:Downloading: http://localhost:8000/metadata/2.root.json
DEBUG:tuf.ngclient._internal.requests_fetcher:Made new session http+localhost
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8000
DEBUG:urllib3.connectionpool:http://localhost:8000 "GET /metadata/2.root.json HTTP/1.1" 404 469
DEBUG:tuf.ngclient.updater:Local timestamp not valid as final: [Errno 2] No such file or directory: 'C:\\Users\\newing\\AppData\\Local\\my_app\\update_cache\\metadata\\timestamp.json'
DEBUG:tuf.ngclient.fetcher:Downloading: http://localhost:8000/metadata/timestamp.json
DEBUG:tuf.ngclient._internal.requests_fetcher:Reusing session http+localhost
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:8000 "GET /metadata/timestamp.json HTTP/1.1" 200 434
DEBUG:tuf.ngclient.fetcher:Downloaded 434 out of 16384 bytes
INFO:tuf.ngclient._internal.trusted_metadata_set:Updated timestamp v3
DEBUG:tuf.ngclient.updater:Local snapshot not valid as final: [Errno 2] No such file or directory: 'C:\\Users\\newing\\AppData\\Local\\my_app\\update_cache\\metadata\\snapshot.json'
DEBUG:tuf.ngclient.fetcher:Downloading: http://localhost:8000/metadata/snapshot.json
DEBUG:tuf.ngclient._internal.requests_fetcher:Reusing session http+localhost
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:8000 "GET /metadata/snapshot.json HTTP/1.1" 200 432
DEBUG:tuf.ngclient.fetcher:Downloaded 432 out of 2000000 bytes
DEBUG:tuf.ngclient._internal.trusted_metadata_set:Updating snapshot
INFO:tuf.ngclient._internal.trusted_metadata_set:Updated snapshot v3
DEBUG:tuf.ngclient.updater:Failed to load local targets: [Errno 2] No such file or directory: 'C:\\Users\\newing\\AppData\\Local\\my_app\\update_cache\\metadata\\targets.json'
DEBUG:tuf.ngclient.fetcher:Downloading: http://localhost:8000/metadata/targets.json
DEBUG:tuf.ngclient._internal.requests_fetcher:Reusing session http+localhost
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:8000 "GET /metadata/targets.json HTTP/1.1" 200 868
DEBUG:tuf.ngclient.fetcher:Downloaded 868 out of 5000000 bytes
DEBUG:tuf.ngclient._internal.trusted_metadata_set:Updating targets delegated by root
INFO:tuf.ngclient._internal.trusted_metadata_set:Updated targets v3
DEBUG:tufup.client:current archive: my_app-1.0.tar.gz
DEBUG:tufup.client:3 TargetMeta objects created
DEBUG:tuf.ngclient.updater:Found target in current role targets
DEBUG:tuf.ngclient.updater:Found target in current role targets
DEBUG:tufup.client:2 new *targets* found
DEBUG:tufup.client:1 new *archives* found
DEBUG:tufup.client:full update available
DEBUG:tuf.ngclient.fetcher:Downloading: http://localhost:8000/targets/my_app-2.0.tar.gz
DEBUG:tuf.ngclient._internal.requests_fetcher:Reusing session http+localhost
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:8000 "GET /targets/my_app-2.0.tar.gz HTTP/1.1" 200 11848663
100.0%
DEBUG:tuf.ngclient.fetcher:Downloaded 11848663 out of 11848663 bytes
INFO:tuf.ngclient.updater:Downloaded target my_app-2.0.tar.gz
DEBUG:tufup.client:default extract dir created: C:\Users\newing\AppData\Local\Temp\tufup
DEBUG:tufup.client:files extracted to C:\Users\newing\AppData\Local\Temp\tufup
Install update in C:\Users\newing\AppData\Local\Programs\my_app? [y]/ny
INFO:tufup.utils.platform_specific:logging install script output to C:\Users\newing\AppData\Local\Programs\my_app\install.log
DEBUG:tufup.utils.platform_specific:writing windows batch script:
@echo off

call :log > "C:\Users\newing\AppData\Local\Programs\my_app\install.log" 2>&1
:log

echo Moving app files...
robocopy "C:\Users\newing\AppData\Local\Temp\tufup" "C:\Users\newing\AppData\Local\Programs\my_app" /e /move /v /w:2
echo Done.
(goto) 2>nul & del "%~f0"

DEBUG:tufup.utils.platform_specific:temporary batch script created: C:\Users\newing\AppData\Local\Temp\tufup2t1bi4j5.bat
DEBUG:tufup.utils.platform_specific:starting script in new console: C:\Users\newing\AppData\Local\Temp\tufup2t1bi4j5.bat
DEBUG:tufup.utils.platform_specific:exiting

C:\Users\newing\AppData\Local\Programs\my_app>main
INFO:__main__:my_app 1.0
DEBUG:tuf.ngclient._internal.trusted_metadata_set:Updating initial trusted root
INFO:tuf.ngclient._internal.trusted_metadata_set:Loaded trusted root v1
DEBUG:tuf.ngclient.fetcher:Downloading: http://localhost:8000/metadata/2.root.json
DEBUG:tuf.ngclient._internal.requests_fetcher:Made new session http+localhost
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8000
DEBUG:urllib3.connectionpool:http://localhost:8000 "GET /metadata/2.root.json HTTP/1.1" 404 469
INFO:tuf.ngclient._internal.trusted_metadata_set:Updated timestamp v3
DEBUG:tuf.ngclient.fetcher:Downloading: http://localhost:8000/metadata/timestamp.json
DEBUG:tuf.ngclient._internal.requests_fetcher:Reusing session http+localhost
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:8000 "GET /metadata/timestamp.json HTTP/1.1" 200 434
DEBUG:tuf.ngclient.fetcher:Downloaded 434 out of 16384 bytes
DEBUG:tuf.ngclient._internal.trusted_metadata_set:Updating snapshot
INFO:tuf.ngclient._internal.trusted_metadata_set:Updated snapshot v3
DEBUG:tuf.ngclient.updater:Local snapshot is valid: not downloading new one
DEBUG:tuf.ngclient._internal.trusted_metadata_set:Updating targets delegated by root
INFO:tuf.ngclient._internal.trusted_metadata_set:Updated targets v3
DEBUG:tuf.ngclient.updater:Local targets is valid: not downloading new one
DEBUG:tufup.client:current archive: my_app-1.0.tar.gz
DEBUG:tufup.client:3 TargetMeta objects created
DEBUG:tuf.ngclient.updater:Found target in current role targets
DEBUG:tuf.ngclient.updater:Found target in current role targets
DEBUG:tufup.client:2 new *targets* found
DEBUG:tufup.client:1 new *archives* found
DEBUG:tufup.client:full update available
DEBUG:tufup.client:default extract dir created: C:\Users\newing\AppData\Local\Temp\tufup
DEBUG:tufup.client:files extracted to C:\Users\newing\AppData\Local\Temp\tufup
Install update in C:\Users\newing\AppData\Local\Programs\my_app? [y]/nn
WARNING:tufup.client:Installation aborted.
Starting my_app 1.0...
Doing what the app is supposed to do...
Done.

After the install the "main" folder appears in the "my_app" folder, and if I manually overwrite the files in my_app with those in main, it works, but tufup isn't doing this automatically:

INFO:__main__:my_app 2.0
DEBUG:tuf.ngclient._internal.trusted_metadata_set:Updating initial trusted root
INFO:tuf.ngclient._internal.trusted_metadata_set:Loaded trusted root v1
DEBUG:tuf.ngclient.fetcher:Downloading: http://localhost:8000/metadata/2.root.json
DEBUG:tuf.ngclient._internal.requests_fetcher:Made new session http+localhost
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8000
DEBUG:urllib3.connectionpool:http://localhost:8000 "GET /metadata/2.root.json HTTP/1.1" 404 469
INFO:tuf.ngclient._internal.trusted_metadata_set:Updated timestamp v3
DEBUG:tuf.ngclient.fetcher:Downloading: http://localhost:8000/metadata/timestamp.json
DEBUG:tuf.ngclient._internal.requests_fetcher:Reusing session http+localhost
DEBUG:urllib3.connectionpool:Resetting dropped connection: localhost
DEBUG:urllib3.connectionpool:http://localhost:8000 "GET /metadata/timestamp.json HTTP/1.1" 200 434
DEBUG:tuf.ngclient.fetcher:Downloaded 434 out of 16384 bytes
DEBUG:tuf.ngclient._internal.trusted_metadata_set:Updating snapshot
INFO:tuf.ngclient._internal.trusted_metadata_set:Updated snapshot v3
DEBUG:tuf.ngclient.updater:Local snapshot is valid: not downloading new one
DEBUG:tuf.ngclient._internal.trusted_metadata_set:Updating targets delegated by root
INFO:tuf.ngclient._internal.trusted_metadata_set:Updated targets v3
DEBUG:tuf.ngclient.updater:Local targets is valid: not downloading new one
DEBUG:tufup.client:current archive: my_app-2.0.tar.gz
DEBUG:tufup.client:3 TargetMeta objects created
DEBUG:tufup.client:0 new *targets* found
DEBUG:tufup.client:no new archives found
Starting my_app 2.0...
Doing what the app is supposed to do...
Done.

@dennisvang
Copy link
Owner

dennisvang commented Nov 18, 2022

I will try the tufup-example again, but can you confirm if the tufup CLI command is meant to use temp/dist or temp/dist/main?

@nicholas-ewing Both can work, as the command just "zips" the content of the specified directory. Upon installation of the update, the content of this archive is then extracted into the INSTALL_DIR.

So, if you use tufup targets add ... temp/dist ..., your install dir should contain a main subdir with the files inside. If you use temp/dist/main, the install dir would contain the content of the main dir.

On my system, both approaches work without issue.

@dennisvang
Copy link
Owner

dennisvang commented Nov 18, 2022

@nicholas-ewing After reading back over your initial description of the issue, I noticed your "step 5":

  1. Copy extracted files from Scheduling-0.1.tar.gz to C;/Users/newing/AppData/Local/Scheduling/

On second thought, this may be what's going wrong.

Please refer to step 1 from the client-side instructions in the tufup-example readme:

  1. To simulate the initial installation on a client device, we do a manual extraction of the archive version 1.0 from the repository/targets dir into the INSTALL_DIR, specified in myapp/settings.py. In the default example the INSTALL_DIR would be the C:\users\<username>\AppData\Local\Programs\my_app directory. On Windows you can use tar -xf my_app-1.0.tar.gz in PowerShell to extract the bundle.

Here's how I do it, step-by-step:

  1. Copy the file tufup-example\temp\repository\targets\my_app-1.0.tar.gz into a newly created AppData\Local\Programs\my_app directory (i.e. the install dir).
  2. Open Powershell in AppData\Local\Programs\my_app
  3. Type tar -xf .\my_app-1.0.tar.gz to extract the files in that location.
  4. (make sure your test server is running)
  5. Type .\main.exe to run the application version 1.0 (or .\main\main.exe, depending on which dir you specified when creating the archive). This starts the update to app version 2.0.
  6. Type .\main.exe again. The app should now show version 2.0, and no more updates are available.

If that still does not work I would suggest trying to run the tufup-example from a completely clean slate.

That means:

  • remove the AppData\Local\Programs\my_app directory
  • remove the AppData\Local\my_app directory
  • remove the DEV_DIR directory (i.e. temp, or in your case releases)
  • remove the .tufup_repo_config file
  • also remove the AppData\Local\Temp\tufup directory, if it exists

Make sure you haven't skipped any of the above steps.

Then follow the exact steps from the readme, using the repo_*.py scripts instead of the CLI.
Also make sure you keep all the default settings.

@nicholas-ewing
Copy link
Author

I just finished trying both the tufup-example and my application using copies of the repo_.py files. It works! I'm still not certain on why using the CLI commands didn't work while the repo_.py files did work. The main reason I even chose to use the CLI commands in the first place was that when I tried using the repo_.py files initially, it couldn't find the module containing the update code. I thought it would be easier to not worry about that problem and use the CLI commands as they would achieve the exact same effect, turns out I was mistaken. Anyways, thanks for all your help @dennisvang.

@dennisvang
Copy link
Owner

dennisvang commented Nov 21, 2022

@nicholas-ewing Good to hear it works now. :-)

Just out of curiosity: Both the script approach and the CLI approach should work. This time round, did you extract the .tar.gz file into the install directory as described in my previous post?

@dennisvang dennisvang added question This is a request for clarification and removed needs more info More information is needed to figure this out labels Nov 21, 2022
@nicholas-ewing
Copy link
Author

A quick test on my home PC with the CLI commands and it looks like it worked fine there, I'll be able to test with my laptop (my main device when I've been working on my project) tomorrow and see if the CLI problem only exists there. I'm still somewhat confused though because I initially (before I created this issue) did testing on my PC (even using releases/dist/Scheduling rather than releases/dist) and it didn't work then.

@nicholas-ewing
Copy link
Author

@dennisvang It worked perfectly... I have no idea why it wasn't working and all the sudden it does work after trying the tufup_.py files. I kept the exact same settings that I'd used the entire time.

@dennisvang
Copy link
Owner

@nicholas-ewing Thanks again for the update. :-)

I'll close the issue now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question This is a request for clarification
Projects
None yet
Development

No branches or pull requests

2 participants