I found the same issue when upgrading to pgAdmin 4 (v1.6). On Windows I found that clearing out the content inside C:\Users\%USERNAME%\AppData\Roaming\pgAdmin\sessions
folder fixed the issue for me. I believe it was attempting to use the sessions from the prior version and was failing. I know the question was marked as answered, but downgrading may not always be an option.
Note: AppData\Roaming\pgAdmin is a hidden folder.