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

CPID Stuck on INVESTOR Due to invalid BOINC Data Path Detection #242

Closed
ghost opened this issue Mar 21, 2017 · 10 comments
Closed

CPID Stuck on INVESTOR Due to invalid BOINC Data Path Detection #242

ghost opened this issue Mar 21, 2017 · 10 comments
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Mar 21, 2017

It looks like the BOINC data directory is not being detected for some Windows users. This is preventing the wallet from locating the CPID.

Steps to reproduce:

  1. Fresh install of BOINC to default location.
  2. Fresh install of Gridcoin to default location.

Work around:

Edit the gridcoin.conf file and add the following lines:

boincdatadir=C:\\ProgramData\\BOINC\\
boincappdir=C:\\Program Files\\BOINC\\
@denravonska
Copy link
Member

denravonska commented Mar 21, 2017

Ok, there seems to be a bug when the wallet tries to detect where the data dir is located. The source code reveals that this is decided on compile time (see https://github.com/gridcoin/Gridcoin-Research/blob/master/src/main.cpp#L8960), so if the target Windows is different than the build Windows this will always fail and the use has to enter it in the config even if it's installed in a standard path.

Mercosity suggested we could extract the path from the registry instead. I agree and we should probably do it in the following order:

  • Check the -boincdatadir argument
  • Check the config
  • Check the registry
  • Check the two standard Windows paths in some order

The former two are already done today (I think) so we only have to replace the ifdefs for the latter ones.

@philipswift
Copy link

philipswift commented Mar 22, 2017

When you create a fresh Windows install, there is a pop up that informs you if your BOINC directory is not in its traditional path however, it states only one \ not two. Users should make a manual entry in .conf of boincdatadir=C:\ \ProgramData\ \BOINC\ \ using the two backslashes (please see NB: below). If you uninstall and then reinstall the pop up informer does not show. If one has already created a 'known good state' set up the .conf file can simply be copied to overwrite the existing one, keys an all. I presume there are no unique identifiers, apart from the Cross Project I Dentifier, so this should be acceptable?
NB: Above, I typed two backslashes but the system here updates/saves it as just one. Bit weird.

@denravonska
Copy link
Member

@philipswift Sounds like a second issue, right?

@philipswift
Copy link

Possibly, yes, there is a statement of instruction on gridcoin.us (see here http://pasteboard.co/Mrqt8uI2C.png)
so maybe the application directory (appdata) should be stated as well.
Previously online, there have been some errors so things to look out for are

a) It's backslash for Windows not forward slash (as in GNU/Linux)
b) State both app and data locations
c) There should be two backslashes for windows not one
d) Trailing ends for both Windows and GNU/Linux; \ and / respectively.

Apologies of you think I am just stating the obvious however, it should really be to be a 'fool's guide' level with everything explicitly stated.

@ghost
Copy link
Author

ghost commented Mar 22, 2017

Do you think it would be better if we can get this to work without any user interaction?

If the BOINC registry key is always in the same place on all versions of Windows then picking it up from there will prevent the user from ever needing to set it. On Windows 10 this is at:

HKEY_LOCAL_MACHINE\SOFTWARE\Space Sciences Laboratory, U.C. Berkeley\BOINC Setup

Not sure about Linux and OSX though.

@denravonska
Copy link
Member

@tonemackay Indeed, that's what I suggested :) We should use the registry to try to find the folder, and if that fails we start checking the fallback folders.

@tomasbrod
Copy link
Member

Why does gridcoin even need the boinc folder? The only thing that seems relevant is user CPID.

  1. try to Get CPID from config file
  2. try to read CPID from boinc folder from registry
  3. try to read CPID from boinc in standard location

@denravonska
Copy link
Member

@tomasbrod It also needs to check which projects the user is crunching.

@philipswift
Copy link

Back in the day I think Rob intended it to be automated. We were on testnet for a long time so manual entry systems seemed acceptable. If you can code to make Windoze install idiot proof then great. Time invested early on will pay dividends later down the line. I try other wallets to see what the 'user experience' is and we are not really up there yet. There no rush to get this right and streamlined. Maybe take the time to get it right first time with endless testing before it goes Beta. Damn good work though, keep it up :)

@denravonska
Copy link
Member

Fixed with #275.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants