Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Hanging at "please wait we are checking this devices current status" #28

Closed
templesnr opened this issue Jan 16, 2019 · 21 comments
Closed
Labels
help wanted Extra attention is needed

Comments

@templesnr
Copy link

Using code version Alpha-(0.7.1)

Expected Behaviour

Chrome app loads and Grab n go initiates

Actual Behaviour

pop-up info box says "please wait we are checking this devices current status"
no error messages, as far as I can ascertain.

Steps to Reproduce

attempt to start Chrome app on enrolled Chromebook

@helfrichmichael
Copy link
Member

That message means it has been unable to make a successful heartbeat. Can you please do the following:

On Google Admin:

  1. Go to Chrome Management
  2. Manage User Settings
  3. Find the OU which is pushing the Grab n Go application.
  4. Search for the "Developer Tools" drop-down menu.
  5. Switch it to "Always allow use of built-in developer tools".

(The settings above you can enable temporarily or leave permanently. We enable developer tools access for all apps/extensions on the Google domain FWIW.)

On the Chromebook with GnG installed:

  1. Go to chrome:extensions in a new Chrome tab.
  2. Enable developer mode on the top right.
  3. Scroll to the Grab n Go app and click the "background page" hyperlink.
  4. Confirm if there are any errors or warnings in the console.

The console output will provide an immense amount of information in regards to what the app is hitting for the heartbeat. Additionally, on our latest push (master or 0.7.1a) we implemented a new debugger for the Chrome App. We'll be doing a push likely this week to complete the implementation of this debug view if you want to hold on until then for debugging.

@helfrichmichael helfrichmichael added the help wanted Extra attention is needed label Jan 16, 2019
@templesnr
Copy link
Author

Super, thank you Michael. I will mark future help wanted posts correctly!
I have made the change, there is a message in the console. I will check the config.ts and see what's there.
image

Can I just ask a supplementary question? The visibility options in the Chrome developer console do not provide "everyone at yourdomain.com" option - but the configuration instructions do include that. Do you know why that option isn't appearing?
image

@templesnr
Copy link
Author

sorry, I shouldn't have closed this thread.

@templesnr templesnr reopened this Jan 16, 2019
@helfrichmichael
Copy link
Member

All good! We just apply labels to better understand whether it's a bug or if there is further assistance needed :). So based on that message, we know that the public key isn't correct in the config.ts file. The public key for the release track (dev, qa, prod) should match the one that is provided on the Chrome Webstore. Documentation for this can be found here. Let me know if you need further assistance with that.

As for the visibility options, I believe that option is enabled if you've paid the $5 fee to the Chrome Webstore (I think that's the price) and if your account is associated with a GSuite domain (app can't be hosted under an @gmail.com account).

@templesnr
Copy link
Author

Thank you Michael - I will check now. I'll pay the $5 ... and let you know how I get on

@githerbert
Copy link

githerbert commented Jan 16, 2019 via email

@templesnr
Copy link
Author

@githerbert - yes, that solved the problem with the Chrome webstore. Thank you.
I'm still looking at the public key thing.

@helfrichmichael
Copy link
Member

For the visibility settings there's an admin console checkbox in the chrome management section that needs to be toggled. I believe it's called Chrome web store permissions. I don't believe the fee is necessary but I may be mistaken.

On Wed, Jan 16, 2019, 9:47 AM templesnr @.*** wrote: Thank you Michael - I will check now. I'll pay the $5 ... and let you know how I get on — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#28 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/ArFf52yFbdMGxyWlASop8-Y3IinSqZidks5vDzt_gaJpZM4aClKa .

Good catch and thanks for sharing!

@templesnr
Copy link
Author

working my way through the code, maybe I have some variables not set correctly?
Do I have to change this in constants.py or should it be left unchanged?
CONFIG_DEFAULTS_PATH = ( os.path.join(os.path.dirname(__file__), 'config_defaults.yaml'))
Also, we have the OU structure ourdomain/Grabngo/Dev and ourdomain/Grabngo/Prod - does the code have to be changed to
PARENT_ORG_UNIT = 'ourdomain/Grabngo/Dev'
and
PARENT_ORG_UNIT = 'ourdomain/Grabngo/Prod'

@helfrichmichael
Copy link
Member

For the CONFIG_DEFAULTS_PATH, there should be no need to change it if you didn't rename or move the config_defaults.yaml file.

For the OU structure, it should just be Grabngo/Dev and Grabngo/Prod.

Just as a heads up, we just pushed our latest commit to GitHub, there's some nice new features like the Chrome App debugger I mentioned earlier (this will help with troubleshooting if you're still having issues).

@templesnr
Copy link
Author

thank you for that - is that in the Master or 0.7.1? Is the Master stable enough to work with?

@templesnr
Copy link
Author

templesnr commented Jan 17, 2019

I realise that you're five hours behind us .... I downloaded the Master branch and started from scratch. Just built it and I have an error:
File "/base/data/home/apps/g~hackney-loaner-dev/hackneylive-20190117.415466292459787568/external/gcloud_auth_archive/google/auth/_service_account_info.py", line 71, in from_filename with io.open(filename, 'r', encoding='utf-8') as json_file: IOError: [Errno 2] No such file or directory: ''
I thought its's something to do with the name of the superadmins_group in constants.py but that didn't rectify the issue.
update:- I found one or two issues but they didn't fix anything. The chrome web store page for the app is also showing a grey "Add to Chrome" button
update:- I've worked through deploy_chrome_app again .... I think my key wasn't right. The app is published but not loading properly. The background page of the Chrome app looks like it'll be helpful .... it's saying that the key defined in the manifest.json of the chrome app is not recognized.

I wonder if the fact that I'm building this in Dev has anything to do with it?

@templesnr
Copy link
Author

templesnr commented Jan 18, 2019

@helfrichmichael
Well, I'm really stuck! In the app engine console for the web app, there's an IOerror "No such file or directory" on line 78, I'm not really sure why. The client-secret.json file for the service account is in the web_app folder.

gae_app_module_id_default_version_id_live-20190118__logs__2019-01-18T11-11.zip

I'm going over and over the code now .... constants.py defines SUPERADMINS_GROUP, I have tried both the group name i.e. just loaner-superadmins and also the group email address i.e. loaner-superadmins@domain.gov.uk ... neither seems to fix it:
* superadmins_group: str, The name of the Google Group that governs who is a superadmin. Superadmins have all permissions by default.
SUPERADMINS_GROUP = 'loaner-superadmins@domains.gov.uk'

@githerbert
Copy link

It definitely wouldn't be caused by the superadminsgroup variable. The correct format for that is the full email address.

For the issue, can you clarify exactly which step you are on? I see that you rebuilt from the master branch so I am uncertain where you are seeing the error.

@templesnr
Copy link
Author

templesnr commented Jan 18, 2019

@githerbert thank you very much - your reply's like music to my ears as I've tried for two days to get to the bottom of this error 🥇
I have just let a change run, which I thought would fix it - but no.

In answer to your question, I am at build and deploy step 1 using the master branch. I thought it was caused by the fact that I named a user as an admin (ADMIN_EMAIL), who wasn't in the superadmins group so I changed it to someone who is and re-ran bash deployments/deploy.sh web dev . I've waited just over 30 minutes and sadly the error has re-appeared.

@githerbert
Copy link

githerbert commented Jan 18, 2019

Thanks. Have you confirmed that your BUILD file is pointing to the Client Secret file:
//
loaner/web_app/BUILD named "loaner" must have a data dependency that references the client-secret.json file.

loaner_appengine_library(
    name = "loaner",
    data = ["client-secret.json"],  # Add this line.
    deps = [
        ":chrome_api",
        ":endpoints_api",
        ":main",
        "//loaner/web_app/backend",
    ],
)

--
and confirm the following in constants.py

SECRETS_FILE is the location of the Directory APIs service account secret json file relative to the Bazel WORKSPACE. If using the example above for the BUILD rule the constant would look like this:

SECRETS_FILE = 'loaner/web_app/client-secret.json'
//

(Assuming you named it 'client-secret.json')

@templesnr
Copy link
Author

loaner/web_app/BUILD is very slightly different but I think it's ok - unless I missed a comma?:

loaner_appengine_library(
    name = "loaner",
    data = [
        "client-secret.json"
    ],
    deps = [
        ":chrome_api",
        ":endpoints_api",
        ":main",
        "//loaner/web_app/backend",
    ],
)

constants.py
SECRETS_FILE = 'loaner/web_app/client-secret.json'
It's definitely there and it's correct as far as I can tell.

@templesnr
Copy link
Author

templesnr commented Jan 18, 2019

there are two service accounts:
the App Engine default service account: loaner-dev@appspot.gserviceaccount.com
and
the GrabnGo_Service_Account: grabngo-service-account@loaner-dev.iam.gserviceaccount.com

I'm using the earliest private key for the second, which has got two private keys

@githerbert
Copy link

githerbert commented Jan 18, 2019 via email

@templesnr
Copy link
Author

OK, I will check the sources ... it's late ... thank you very much for your advice

@templesnr
Copy link
Author

@githerbert I downloaded the zip from Github again and amended the files from scratch and it's not throwing up the errors now.- thank you very much for the advice.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants