Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Important
-
Resolution: Fixed
-
Version/s: Einstein release
Description
Two server-side regression occurred as part of the new ‘consent to Terms of use’ code merges.
- create_account RPC broke due to a bug introduced by me: authenticator not being returned for existing accounts.
- This has been fixed PR 2567.
- get_project_config.php not returning master_url.
I believe this regression was introduced when Oliver, at my request, updated the BOINC upstream HTML/ code as part of the merging. As part of PR 1731 (Bootstrap) , David A. added this commit, which made $master_url a global variable. In get_project_config.php, it uses require_once("../inc/util.inc") to load the global variable.
This construction does not work for us in Drupal. This is probably due to how we are loading get_project_config: include_boinc('user/get_project_config.php')
We use PHP include() to load the get_project_config.php file. This in turn runs require_once() on the html/inc/util.inc file, which loads the master_url variable. But somehow in how PHP loads things, the Drupal implementation does not run this ‘require_once’ on util.inc. Most likely because it has already been ‘required’ sometime earlier.
As a result the get_project_config RPC for einstein (and albert but see below) do not return the master_url which is needed by the Android client.
re Albert: albertathome.org/get_project_config.php uses drupal codebase, so there is no master_url. But albert.phys.uwm.edu/get_project_config.php uses the BOINC web code, thus there is a master_url.
re Android client: The 'real solution' is to fix the code in the client to use the correct variable, web_rpc_url_base. However, our code should still return the master_url.
Activity
Field | Original Value | New Value |
---|---|---|
Summary | RPC regression causing Andorid client to not attach to project | RPC regressions causing Android client to not attach to project |
Description |
Two server-side regression occurred as part of the new ‘consent to Terms of use’ code merges.
# create_account RPC broke due to a bug introduced by me: authenticator not being returned for existing accounts. This has been fixed [PR 2567|https://github.com/BOINC/boinc/pull/2567]. # get_project_config.php not returning master_url. I believe this regression was introduced when Oliver, at my request, updated the BOINC upstream HTML/ code as part of the merging. As part of [PR 1731 (Bootstrap) |https://github.com/BOINC/boinc/pull/1731] , David A. added [this commit|https://github.com/BOINC/boinc/commit/5ea948224ea15ea53bd8167c78e331951d9e1ece], which made $master_url a global variable. In get_project_config.php, it uses `require_once(“../inc/util.inc”)` to load the global variable. This construction does not work for us in Drupal. This is probably due to how we are loading get_project_config: `include_boinc('user/get_project_config.php')` We use PHP `include()` to load the get_project_config.php file. This in turn runs ‘require_once()’ on the html/inc/util.inc file, which loads the master_url variable. But somehow in how PHP loads things, the Drupal implementation does *not* run this ‘require_once’ on util.inc. Most likely because it has already been ‘required’ sometime earlier. As a result the get_project_config RPC for einstein (and albert but see below) do not return the master_url which is needed by the Android client. re Albert: albertathome.org/get_project_config.php uses drupal codebase, so there is no master_url. But albert.phys.uwm.edu/get_project_config.php uses the BOINC web code, thus there *is* a master_url. re Android client: The 'real solution' is to fix the code in the client to use the correct variable, web_rpc_url_base. However, our code should still return the master_url. |
Two server-side regression occurred as part of the new ‘consent to Terms of use’ code merges.
# create_account RPC broke due to a bug introduced by me: authenticator not being returned for existing accounts. This has been fixed [PR 2567|https://github.com/BOINC/boinc/pull/2567]. # get_project_config.php not returning master_url. I believe this regression was introduced when Oliver, at my request, updated the BOINC upstream HTML/ code as part of the merging. As part of [PR 1731 (Bootstrap) |https://github.com/BOINC/boinc/pull/1731] , David A. added [this commit|https://github.com/BOINC/boinc/commit/5ea948224ea15ea53bd8167c78e331951d9e1ece], which made $master_url a global variable. In get_project_config.php, it uses {{require_once("../inc/util.inc")}} to load the global variable. This construction does not work for us in Drupal. This is probably due to how we are loading get_project_config: {{include_boinc('user/get_project_config.php')}} We use PHP {{include()}} to load the get_project_config.php file. This in turn runs {{require_once()}} on the html/inc/util.inc file, which loads the master_url variable. But somehow in how PHP loads things, the Drupal implementation does *not* run this ‘require_once’ on util.inc. Most likely because it has already been ‘required’ sometime earlier. As a result the get_project_config RPC for einstein (and albert but see below) do not return the master_url which is needed by the Android client. re Albert: albertathome.org/get_project_config.php uses drupal codebase, so there is no master_url. But albert.phys.uwm.edu/get_project_config.php uses the BOINC web code, thus there *is* a master_url. re Android client: The 'real solution' is to fix the code in the client to use the correct variable, web_rpc_url_base. However, our code should still return the master_url. |
Description |
Two server-side regression occurred as part of the new ‘consent to Terms of use’ code merges.
# create_account RPC broke due to a bug introduced by me: authenticator not being returned for existing accounts. This has been fixed [PR 2567|https://github.com/BOINC/boinc/pull/2567]. # get_project_config.php not returning master_url. I believe this regression was introduced when Oliver, at my request, updated the BOINC upstream HTML/ code as part of the merging. As part of [PR 1731 (Bootstrap) |https://github.com/BOINC/boinc/pull/1731] , David A. added [this commit|https://github.com/BOINC/boinc/commit/5ea948224ea15ea53bd8167c78e331951d9e1ece], which made $master_url a global variable. In get_project_config.php, it uses {{require_once("../inc/util.inc")}} to load the global variable. This construction does not work for us in Drupal. This is probably due to how we are loading get_project_config: {{include_boinc('user/get_project_config.php')}} We use PHP {{include()}} to load the get_project_config.php file. This in turn runs {{require_once()}} on the html/inc/util.inc file, which loads the master_url variable. But somehow in how PHP loads things, the Drupal implementation does *not* run this ‘require_once’ on util.inc. Most likely because it has already been ‘required’ sometime earlier. As a result the get_project_config RPC for einstein (and albert but see below) do not return the master_url which is needed by the Android client. re Albert: albertathome.org/get_project_config.php uses drupal codebase, so there is no master_url. But albert.phys.uwm.edu/get_project_config.php uses the BOINC web code, thus there *is* a master_url. re Android client: The 'real solution' is to fix the code in the client to use the correct variable, web_rpc_url_base. However, our code should still return the master_url. |
Two server-side regression occurred as part of the new ‘consent to Terms of use’ code merges.
# create_account RPC broke due to a bug introduced by me: authenticator not being returned for existing accounts. ** This has been fixed [PR 2567|https://github.com/BOINC/boinc/pull/2567]. # get_project_config.php not returning master_url. I believe this regression was introduced when Oliver, at my request, updated the BOINC upstream HTML/ code as part of the merging. As part of [PR 1731 (Bootstrap) |https://github.com/BOINC/boinc/pull/1731] , David A. added [this commit|https://github.com/BOINC/boinc/commit/5ea948224ea15ea53bd8167c78e331951d9e1ece], which made $master_url a global variable. In get_project_config.php, it uses {{require_once("../inc/util.inc")}} to load the global variable. This construction does not work for us in Drupal. This is probably due to how we are loading get_project_config: {{include_boinc('user/get_project_config.php')}} We use PHP {{include()}} to load the get_project_config.php file. This in turn runs {{require_once()}} on the html/inc/util.inc file, which loads the master_url variable. But somehow in how PHP loads things, the Drupal implementation does *not* run this ‘require_once’ on util.inc. Most likely because it has already been ‘required’ sometime earlier. As a result the get_project_config RPC for einstein (and albert but see below) do not return the master_url which is needed by the Android client. re Albert: albertathome.org/get_project_config.php uses drupal codebase, so there is no master_url. But albert.phys.uwm.edu/get_project_config.php uses the BOINC web code, thus there *is* a master_url. re Android client: The 'real solution' is to fix the code in the client to use the correct variable, web_rpc_url_base. However, our code should still return the master_url. |
Comment Request | [tristano] |
Assignee | Shawn Kwang [ skwang ] | Oliver Bock [ oliverb ] |
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Tristan Olive, can I ask for your PHP help?
As a result there is no master_url variable in our get_project_config.php.
Do you have any insights as to a potential solution?
Links: