lbryio / lbryio/lbry-sdk

Windows issue with get_paths and FOLDERID

Open
#1,970 22 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
Python
Stars
7.2k
Forks
493
PR merge metrics
No merged PRs in 30d

Description

## The Issue
The app crashes on a fresh install APPCRASH

Please see https://github.com/lbryio/lbry/issues/1970#issuecomment-480417753 for one reason this would crash. We need to fall back to a sane alternative if get_paths fails.

### Steps to reproduce
1. Install the app through the site
2. Start the app

### Expected behavior

App to actually launch ;)

### Actual behavior

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\DVD>cd C:\Program Files\LBRY

C:\Program Files\LBRY>LBRY.exe

C:\Program Files\LBRY>
Starting SDK
Sandbox listening on port 5278.
Daemon: [5804] Failed to execute script cli

Daemon: Traceback (most recent call last):
File "lbrynet\extras\cli.py", line 312, in
File "lbrynet\extras\cli.py", line 231, in main
File "lbrynet\conf.py", line 404, in create_from_arguments
File "lbrynet\conf.py", line 549, in __init__
File "lbrynet\conf.py", line 561, in set_default_paths
File "lbrynet\conf.py", line 574, in get_windows_directories
File "lbrynet\winpaths.py", line 152, in get_path
lbrynet.winpaths.PathNotFoundException

## System Configuration
- LBRY Daemon version: N/A
- LBRY App version: N/A
- LBRY Installation ID: N/A
- Operating system: Windows 7 Ultimate x64

## Anything Else
![image](https://user-images.githubusercontent.com/9112662/53686286-d782b180-3d2d-11e9-81e3-0781e172b6c4.png)

### Definition of Done
- [x] Tested against acceptance criteria
- [x] Tested against the assumptions of user story
- [ ] The project builds without errors
- [ ] Unit tests are written and passing
- [ ] Tests on devices/browsers listed in the issue have passed
- [ ] QA performed & issues resolved
- [ ] Refactoring completed
- [ ] Any configuration or build changes documented
- [ ] Documentation updated
- [ ] Peer Code Review performed

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lbrynet/winpaths.py:get_path and the callers in lbrynet/conf.py, especially set_default_paths and get_windows_directories; review the linked comment for the FOLDERID failure. Reproduce the fresh-install launch on Windows 7 and verify that a failed get_path call falls back to a usable directory so the app launches.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.