Repository: rotki/rotki

Issue:
Windows client process fails to terminate on exit
## Problem Definition
[rotkehlchen.log](https://github.com/rotki/rotki/files/4175091/rotkehlchen.log)

![Rotki Error](https://user-images.githubusercontent.com/43120949/74091352-6b074b00-4a84-11ea-9088-644f25b0ad96.png)

Upon exiting the app either via File > Exit or closing out the window, the rotkehlchen-1.1.1-windows.exe process located @ \AppData\Local\Temp\1XQmRojWPPWrpMdb5u2XbYRpZNj\resources\rotkehlchen_py_dist remains running.

On next startup, the app pops up the attached error after ~5 seconds. Terminating the rotkehlchen-1.1.1-windows.exe process resolves the issue.

Tested on Windows 10 Pro x64 Build 1909

Provide a description of what is the current problem and why you are raising this issue.
If it's a bug please describe what was the unexpected thing that occured and what was the
expected behaviour.

Rotkehlchen also logs debug information to the `rotkehlchen.log` file. Please attach it to the
issue as it may help us find the source of the issue faster.

### System Description

Here add a detailed description of your system, e.g. output of the following script:

```
uname -a
command -v geth && geth version
command -v parity && parity --version
command -v rotkehlchen && rotkehlchen version
[ -d .git ] && git rev-parse HEAD
```

OSX and Windows packaged version missing the version display in frontend
## Problem Definition

In Linux the version is displayed in the frontend. But in both OSX and in Windows the version is not displayed at all. It seems that the Rest API call to the backend does not happen at all there.

## Task

Figure out why and fix it.


Discussion:
Hey @dsupport! Thank you for the issue report.

So if you kill the executable `rotkehlchen-1.1.1-windows.exe` all is good, right?

This sounds very familiar and thought we had already fixed it. We certainly have code for this here:
https://github.com/rotki/rotki/blob/c5ad204124e026e480050cb26174fdf1fb011f65/electron-app/src/py-handler.ts#L210-L261

The rotkehlchen.log you attached is not very helpful since it's the backend's log and this is an electron problem. We also have an electron log in `%APPDATA%/rotki/`. Can you also attach that? It may help.

In any case I will try to see if I can reproduce this.
@kelsos Have you also seen this when testing in Windows?
Yes, that resolves it.
Here is the electron log.

[rotki_electron.log](https://github.com/rotki/rotki/files/4175137/rotki_electron.log)


I did test before the rpc api replacement and it seemed to work back then. I will have to check why it did not work now. 
Something that would help a lot @dsupport is to also download [version 1.0.7](https://github.com/rotki/rotki/releases/tag/v1.0.7) and see if you see the same problem by performing the same steps with that version. Make a new account for that since v1.0.7 expects an older DB.

If it does not happen there, then it's something wrong with the code changes when we switched to vue.js.

If it does happen there, then the problem may be harder to pinpoint and we would anyway have to reproduce ourselves.
1.0.7 works properly

I like the first time walk-thru
Also putting in a vote for Cointracker.io support
> 1.0.7 works properly

That's great. And helps a lot to pinpoint the problem already.

Thank you for the encouraging words! And also for the participation in Gitcoin grants round 4. It helps us a lot!

We will handle this issue :+1: 
@dsupport 
> Also putting in a vote for Cointracker.io support

What do you mean? Is this a feature request? If so can you open a new issue to track it properly?

> I like the first time walk-thru

@kelsos  ^ It seems the first time walkthrough was not bad after all.
Cointracker.io is indeed a feature request and I will open an issue.
Excited to see this project develop and happy to contribute to grant funds and bug testing.
This logic was in v1.0.7 but I believe is missing from the rewrite in v1.1.0:

https://github.com/rotki/rotki/blob/7991d254f60ee6db2764db7b12296a5b5a732e18/main.js#L304-L308


Resolving patch:
diff --git a/rotkehlchen/externalapis/github.py b/rotkehlchen/externalapis/github.py
--- a/rotkehlchen/externalapis/github.py
+++ b/rotkehlchen/externalapis/github.py
@@ -13,7 +13,14 @@ def __init__(self) -> None:
         self.prefix = 'https://api.github.com/'
 
     def _query(self, path: str) -> Dict:
-        response = requests.get(f'{self.prefix}{path}')
+        """
+        May raise:
+        - RemoteError if there is a problem querying Github
+        """
+        try:
+            response = requests.get(f'{self.prefix}{path}')
+        except requests.exceptions.ConnectionError as e:
+            raise RemoteError(f'Failed to query Github: {str(e)}')
 
         if response.status_code != 200:
             raise RemoteError(


Test patch: