google / loaner Goto Github PK
View Code? Open in Web Editor NEWAutomated Chromebook loaner management
License: Apache License 2.0
Automated Chromebook loaner management
License: Apache License 2.0
launch Chrome app and manage GnG devices
launch Chrome app and get error message "this device is not enrolled"
launch Chrome app
chicken and egg here - this is the first device, I haven't been able to enrol it because I can't run the app. How do I get the first device enrolled in GnG so that I can run the app?
Chrome application launches on-boarding process.
Chrome applications gives the following error message:
"This device is not enrolled in the Grab N Go program. Please contact your administrator."
I followed the installation steps as specified.
It is possible that I missed a step or setting somewhere during the deployment, thereby causing this issue. However, I have read over the steps again and cannot seem to find anything I might have missed. The two Chromebooks I am testing with are both Enterprise Enrolled and enrolled in the Grab N Go program through the web interface. However, when signing in to them, the GrabNGo application gives the above error message.
The app loads up on Chromebook and connects to the web app to allow loaning of devices.
Pop up at the bottom of the screen on the Chromebook saying "Please wait we are checking the devices current status" followed by "Oh no! We were unable to retrieve the devices..."
When looking on stack driver logging for the app the errors shown are as follows
/_ah/api/loaner/v1/chrome/heartbeat?device_id=94c9fb8f-ca99-4fd5-a3e7-9e22521efa37
194.168.230.101 - - [23/Nov/2018:13:43:36 +0000] "GET /_ah/api/loaner/v1/chrome/heartbeat?device_id=[Device_ID] HTTP/1.1" 404 334 - "Mozilla/5.0 (X11; CrOS aarch64 11021.56.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.76 Safari/537.36" "[PROJECT_ID].appspot.com" ms=4 cpu_ms=3 cpm_usd=3.7327e-8 loading_request=0 instance=00c61b117ca5b7256121fe03589ad5fb2e9440ba4d26f4eb3ad535d0680f9798c63bb0979d app_engine_release=1.9.65 trace_id=919d8026f62117e3112809108388cde4
Did not specify the ENDPOINTS_SERVICE_NAME environment variable so service control is disabled. Please specify the name of service in ENDPOINTS_SERVICE_NAME to enable it.
Enterprise security team will not allow the loaner-role proxy G Suite account to have G Suite admin role permissions it actually doesn't need. A custom GnG Admin G Suite role is needed.
The security team doesn't care that the account will not be logged into by a human, it must only use what it needs.
Documentation for GnG gives you the option to add pre-set G Suite admin roles OR create a custom G Suite Admin role for GnG to be more secure.
In step 3 of the setup document you are told to add the following roles to the [email protected] account.
Directory Admin ( Doesn't exist )
Services Admin
User Management Admin
Setup Grab In Go, get to Step 3
After raising the issue in the Google + forum, it's taken me a while but I've built a new development Linux box from scratch. I downloaded the latest Master branch but unfortunately I'm getting an error towards the end of the build web app.
I've tried to follow the errors through in the code, but I can't see what might be the cause.
Unfortunately the inability to build the application is causing a problem as I can't bootstrap and deploy a fresh instance. I would be grateful for any help.
run bash deployments/deploy.sh web prod
to build web app
errors at the end of build
run build again
[27] ./web_app/frontend/src/services/device.ts 9.26 kB {0} [built]
[33] ./web_app/frontend/src/services/shelf.ts 5.84 kB {0} [built]
[43] ./web_app/frontend/src/services/snackbar.ts 1.57 kB {0} [built]
[52] ./web_app/frontend/src/services/user.ts 4.27 kB {0} [built]
[59] ./web_app/frontend/src/services/dialog/dialog.ts 1.41 kB {0} [built]
[60] ./web_app/frontend/src/services/config.ts 5.88 kB {0} [built]
[61] ./web_app/frontend/src/services/search.ts 3.52 kB {0} [built]
[434] ./web_app/frontend/src/main.aot.ts 1.01 kB {0} [built]
[598] ./web_app/frontend/src/app.module.ngfactory.js 31.8 kB {0} [built]
[695] ./web_app/frontend/src/app.ngfactory.js 16.9 kB {0} [built]
[699] ./web_app/frontend/src/services/oauth_interceptor.ts 5.93 kB {0} [built]
[701] ./web_app/frontend/src/services/tag.ts 3.15 kB {0} [built]
[707] ./shared/directives/min_validator/index.ts 1 kB {0} [built]
[708] ./shared/directives/remove_whitespaces/index.ts 1.03 kB {0} [built]
[712] ./shared/directives/focus/index.ts 960 bytes {0} [built]
+ 721 hidden modules
Child html-webpack-plugin for "index.html":
1 asset
[0] ./node_modules/html-webpack-plugin/lib/loader.js!./web_app/frontend/src/index.html 781 bytes {0} [built]
ERROR: /home/hackney/Dev/loaner-master/loaner/web_app/BUILD:113:1: in py_appengine_binary_base rule //loaner/web_app:runfiles:
Traceback (most recent call last):
File "/home/hackney/Dev/loaner-master/loaner/web_app/BUILD", line 113
py_appengine_binary_base(name = 'runfiles')
File "/home/hackney/.cache/bazel/_bazel_hackney/b5b8b7c184f422d566e2bb6917c490a0/external/io_bazel_rules_appengine/appengine/py_appengine.bzl", line 165, in _py_appengine_binary_base_impl
struct(runfiles = runfiles, py = ctx.attr...)
File "/home/hackney/.cache/bazel/_bazel_hackney/b5b8b7c184f422d566e2bb6917c490a0/external/io_bazel_rules_appengine/appengine/py_appengine.bzl", line 165, in struct
ctx.attr.binary.py
<target //loaner/web_app:_py_appengine_runfiles> (rule 'py_binary') doesn't have provider 'py'
ERROR: Analysis of target '//loaner/web_app:runfiles' failed; build aborted: Analysis of target '//loaner/web_app:runfiles' failed; build aborted
INFO: Elapsed time: 0.300s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
hackney@hackney-gng-dev:~/Dev/loaner-master/loaner$ ^C
We're seeing intermittent 401 responses from the Chrome API endpoint, when the chrome devices send a heartbeat.
Traceback (most recent call last):
File "/base/data/home/apps/f~ncau-tech-grab-n-go-prod/chrome:mcshaneg-20181104.413743242539803060/external/endpoints_archive/endpoints/users_id_token.py", line 369, in _set_bearer_user_vars
authorized_scopes = oauth.get_authorized_scopes(sorted(all_scopes))
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/1/google/appengine/api/oauth/oauth_api.py", line 171, in get_authorized_scopes
_maybe_call_get_oauth_user(scope)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/1/google/appengine/api/oauth/oauth_api.py", line 220, in _maybe_call_get_oauth_user
_maybe_raise_exception()
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/1/google/appengine/api/oauth/oauth_api.py", line 239, in _maybe_raise_exception
raise InvalidOAuthTokenError(error_detail)
InvalidOAuthTokenError
Doesn't seem to be any specific trigger, and sometimes an initial heartbeat will be succesfull causing the device to be assigned to a user, but around 20 seconds later it'll 401 so the rest of the onboarding flow fails to appear.
I've tried using a different network, un-enrolling and re-enrolling chromebooks , using different chromebooks, using different users (both superadmin and non-superadmin), wiping the chromebooks, redeploying the web app, redeploying the chrome app, creating a new OAuth Client ID and redploying the system - nothing seems to stabilise it.
Any help with the right direction to start troubleshooting this would be ace.
Extpected to be able to Extract user responses from the sign in and return questions.
So far I haven't found a way to extract the question responses that users submit. I've tried with BigQuery and Datastore. Neither one will show how many time the response options have been selected.
Try to extract questions responses.
Smooth initial deployment of App Engine web_app.
What I am running:
bash loaner/deployments/deploy.sh web prod
da_allgeier@Dominiks-MacBook ~/D/loaner> bash loaner/deployments/deploy.sh web prod
INFO: Checking for gcloud on PATH and version...
SUCCESS: gcloud was found on PATH and is at or above the minimum version.
INFO: Checking for bazel on PATH and version...
Starting local Bazel server and connecting to it...
SUCCESS: bazel was found on PATH and is at or above the minimum version.
INFO: Checking for npm on PATH and version...
SUCCESS: npm was found on PATH and is at or above the minimum version.
INFO: Checking gcloud authentication...
INFO: Going to the loaner directory...
INFO: Initiating the build of the python deployment script...
ERROR: /private/var/tmp/_bazel_da_allgeier/b8fe2dfec5c3e6f1134b315cf0fed080/external/local_config_cc/BUILD:55:5: in apple_cc_toolchain rule @local_config_cc//:cc-compiler-armeabi-v7a: Xcode version must be specified to use an Apple CROSSTOOL. If your Xcode version has changed recently, try: "bazel clean --expunge" to re-run Xcode configuration
ERROR: Analysis of target '//loaner/deployments:deploy_impl' failed; build aborted: Analysis of target '@local_config_cc//:cc-compiler-armeabi-v7a' failed; build aborted
INFO: Elapsed time: 38.983s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (15 packages loaded, 101 targets configured)
running the latest versions of bazel, npm, gcloud follow the steps until Build and Deploy on the Web App Deployment Guide. Error occurs after while running the deploy.sh script.
MacOS 14.4
I accidentally pushed to the master branch in an attempt to fix the 0.6 release which broke our internal releaser process. Currently we are prevented from pushing to Github because of it.
nevermind,
I was missing a "," in a line of my json.
Hi all, this is more a question than an issue. We are trying to audit loan check-outs and returns with a ~5 min granularity (as in, we want to know who checked out what device within the last 5 minutes). We thought we could get this info from BigQuery, but it seems the data doesn't appear there for several minutes (we've seen up to a 20 min delay). I found the data in the BigQueryRow
datastore, however, I am unable to do any sort of complex queries on these rows (to sort by timestamp for example). We have tried adding the following to the index.yaml and re-deploying to see if the added fields will get indexed, but unfortunately had no extra luck.
- kind: BigQueryRow
properties:
- name: streamed
- name: timestamp
- name: actor
- name: method
- name: model_type
Is there a way to get this data into BigQuery faster, or perhaps a better way to know about these events happening? Ideally this could be something like a webhook, but I didn't see that functionality available. I also saw references to custom_actions
, but was confused on how to get started with those.
Thanks for any insight and assistance you can offer!
Next user, test user2 gets the same Pixelbook. They turn it on and go through the GnG client app intro steps. No problem. They do some work, etc .... seems fine. But upon reviewing the device's
wifi config settings we can see the login being used to connect to the corporate wifi network is using user1 credentials. This is a security flaw and could lead to misidentifying an incorrect users activity on our internal network.
From some brief research it seems like we may have a misconfiguration for the network settings on the OU which the devices are assigned ... just not sure. Any advice appreciated.
Thanks,
Bob
When we audit a shelf all serial numbers added to the audit page should remove the pending status.
Just one device is not removing this status (pending to return).
When you log into a GnG device, close the GnG wizard and don't define the return date. Important we have define the default loan duration as 2 days in the web app settings.
Thank you.
"bash deployments/deploy.sh web prod" is ran with no errors and warnings. Build completes successfully. Web App is visible from GAE.
"bash deployments/deploy.sh web prod" is ran with no errors and 1 warning. Build completes successfully. Web App is NOT visible from GAE (Like it never existed).
loaner_owner@si-gng-dev:/loaner/loaner$ bash deployments/deploy.sh web prod
INFO: Checking for gcloud on PATH and version...
SUCCESS: gcloud was found on PATH and is at or above the minimum version.
INFO: Checking for bazel on PATH and version...
Starting local Bazel server and connecting to it...
INFO: Invocation ID: ef1b48bd-cff4-4a88-9b38-f687912f9d6f
SUCCESS: bazel was found on PATH and is at or above the minimum version.
INFO: Checking for npm on PATH and version...
SUCCESS: npm was found on PATH and is at or above the minimum version.
INFO: Checking gcloud authentication...
INFO: Going to the loaner directory...
INFO: Initiating the build of the python deployment script...
INFO: Invocation ID: 77fad06c-dc2e-486d-97dc-0cfe2fd7a3c2
INFO: Analysed target //loaner/deployments:deploy_impl (18 packages loaded, 133 targets configured).
INFO: Found 1 target...
**WARNING: failed to create one or more convenience symlinks for prefix 'bazel-':
cannot create symbolic link bazel-bin -> /home/loaner_owner/.cache/bazel/_bazel_loaner_owner/08f4c04b2de7debc213d4682c3c5240e/execroot/gng/bazel-out/k8-fastbuild/bin: /loaner/bazel-bin (Permission denied)
cannot create symbolic link bazel-testlogs -> /home/loaner_owner/.cache/bazel/_bazel_loaner_owner/08f4c04b2de7debc213d4682c3c5240e/execroot/gng/bazel-out/k8-fastbuild/testlogs: /loaner/bazel-testlogs (Permission denied)
cannot create symbolic link bazel-genfiles -> /home/loaner_owner/.cache/bazel/_bazel_loaner_owner/08f4c04b2de7debc213d4682c3c5240e/execroot/gng/bazel-out/k8-fastbuild/genfiles: /loaner/bazel-genfiles (Permission denied)
cannot create symbolic link bazel-out -> /home/loaner_owner/.cache/bazel/_bazel_loaner_owner/08f4c04b2de7debc213d4682c3c5240e/execroot/gng/bazel-out: /loaner/bazel-out (Permission denied)
cannot create symbolic link bazel-loaner -> /home/loaner_owner/.cache/bazel/_bazel_loaner_owner/08f4c04b2de7debc213d4682c3c5240e/execroot/gng: /loaner/bazel-loaner (Permission denied)
Target //loaner/deployments:deploy_impl up-to-date:
/home/loaner_owner/.cache/bazel/_bazel_loaner_owner/08f4c04b2de7debc213d4682c3c5240e/execroot/gng/bazel-out/k8-py3-fastbuild/bin/loaner/deployments/deploy_impl**
INFO: Elapsed time: 14.133s, Critical Path: 0.03s
INFO: 0 processes.
INFO: Build completed successfully, 4 total actions
deployments/deploy.sh: line 248: ../bazel-out/k8-py3-fastbuild/bin/loaner/deployments/deploy_impl: No such file or directory
Dev VM is on GCP. 1vCPU, 4 GB memory. 32GB SPD. Ubuntu 18.04 LTS.
All other packages except for Bazel are at there most recent release.
I had to roll back to Bazel 0.22.0 because Bazel 0.27.0 was creating errors.
Attempt to build Web App with ""bash deployments/deploy.sh web prod".
Observe warning. Observe success message. Go to the Cloud Console and see that under GAE that the Web App is not listed.
$ bash deployments/deploy.sh web prod
INFO: Checking for gcloud on PATH and version...SUCCESS: gcloud was found on PATH and is at or above the minimum version.
INFO: Checking for bazel on PATH and version...
SUCCESS: bazel was found on PATH and is at or above the minimum version.
INFO: Checking for npm on PATH and version...
SUCCESS: npm was found on PATH and is at or above the minimum version.
INFO: Checking gcloud authentication...
INFO: Going to the loaner directory...
INFO: Initiating the build of the python deployment script...
INFO: Going to the loaner directory...
readlink: illegal option -- f
usage: readlink [-n] [file ...]
ERROR: The Bazel BUILD files appear to be missing.
Follow deployment instructions on OSX, and run 'bash deployments/deploy.sh web prod' per instructions.
I was able to fix this by:
Help please ...
Launch GnG Chrome app and start Grab n go
Shows "please wait we are checking this devices current status" and goes no further
happens every time the app is loaded
The app version, public key and client ID are correct.
The messages from debug screen are below:
I am unsure how to investigate the OAuth Token Status the OAuth 2 client ID was set at the beginning, and I have checked it's there.
Here's hoping ..
Deploying GNG from a GCP hosted Centos 7 Linux VM.
The deployment.sh script is failing due to an incorrect version number for bazel.
My current bazel version is:
-bash-4.2$ bazel version
Build label: 0.17.2- (@non-git)
The hyphen on the end is breaking the case on line 141 of deploy.sh, the BAZEL_VERSION variable is being set to '172-' instead of just 172.
The fix is change line 144 from:
| sed 's/\(^0*\|\.\)//g');;
to:
| sed 's/\(^0*\|\.\|\-\)//g');;
by adding in the |\-\
bit to remove the trailing hyphen.
Initial Bootstrap of Web app
I am having issues with the initial bootstrap and cant figure out what I did wrong. Can anyone please help? I think the issue has to do with my admin email permissions but I don't understand where in the set up I went wrong.
Here is the error I am getting:
Traceback (most recent call last):
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/7679791231c143f9/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in call
rv = self.handle_exception(request, response, e)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/7679791231c143f9/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in call
rv = self.router.dispatch(request, response)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/7679791231c143f9/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
return route.handler_adapter(request, response)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/7679791231c143f9/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in call
return handler.dispatch()
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/7679791231c143f9/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch
return self.handle_exception(e, self.app.debug)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/7679791231c143f9/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch
return method(*args, **kwargs)
File "/base/data/home/apps/sudemy-loaner/conniejimenez-20190408.417351157141929975/loaner/web_app/backend/handlers/frontend.py", line 73, in getudemy-loaner/conniejimenez-20190408.417351157141929975/loaner/web_app/backend/handlers/frontend.py", line 98, in _sync_roles_if_necessary
self._sync_roles_if_necessary()
File "/base/data/home/apps/s
sync_users.sync_user_roles()
File "/base/data/home/apps/sudemy-loaner/conniejimenez-20190408.417351157141929975/loaner/web_app/backend/lib/sync_users.py", line 34, in sync_user_rolesudemy-loaner/conniejimenez-20190408.417351157141929975/loaner/web_app/backend/clients/directory.py", line 73, in init
client = directory.DirectoryApiClient(constants.ADMIN_EMAIL)
File "/base/data/home/apps/s
self._client = self._create_directory_service(user_email)
File "/base/data/home/apps/s~udemy-loaner/conniejimenez-20190408.417351157141929975/loaner/web_app/backend/clients/directory.py", line 96, in _create_directory_service
raise UnauthorizedUserError('User Email not provided.')
UnauthorizedUserError: User Email not provided.
Add the admin role in GSuite Admin to the user of "Directory Admin"
There is no pre-built role in Gsuite for "Directory Admin". I think it is called "Groups Admin"
Work through step #3 "Set up a G Suite role account"
All of our devices have started to show 'This device is not enrolled' error, despite previously being enrolled.
We used to get the issue sporadically, with no clue as to what was causing it as it was very random, but now it's very much permanent, preventing us from using the system.
I'm wondering if it's caused by exceeded a maximum number of granted (live) refresh tokens as referenced here: https://developers.google.com/identity/protocols/OAuth2#expiration, and if there's any system built in to resolve that?
Checking the Logs for the Chrome Endpoint, I can see that the heartbeat is returning a 401 back with:
2018-11-02 14:09:19.857 AEDT
Unable to get authorized scopes. (/base/data/home/apps/f~<APPNAME>/chrome:mcshaneg-20181102.413691614035746910/external/endpoints_archive/endpoints/users_id_token.py:371)
Traceback (most recent call last):
File "/base/data/home/apps/f~<APPNAME>/chrome:mcshaneg-20181102.413691614035746910/external/endpoints_archive/endpoints/users_id_token.py", line 369, in _set_bearer_user_vars
authorized_scopes = oauth.get_authorized_scopes(sorted(all_scopes))
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/1/google/appengine/api/oauth/oauth_api.py", line 171, in get_authorized_scopes
_maybe_call_get_oauth_user(scope)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/1/google/appengine/api/oauth/oauth_api.py", line 220, in _maybe_call_get_oauth_user
_maybe_raise_exception()
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/1/google/appengine/api/oauth/oauth_api.py", line 239, in _maybe_raise_exception
raise InvalidOAuthTokenError(error_detail)
InvalidOAuthTokenError
I was previously seeing this intermittently - , I thought perhaps it was caused by returning a loan and starting a new loan too quickly but now it's constant.
I have tried:
Different Chromebooks, different users, factory reset of Chromebook(s), un-enroll and re-enroll in grab-n-go, hotspot to make sure it's not a network issue, leaving it alone for 24 hours, deploying a new version to app engine (albeit with no code changes made).
The only thing I'm yet to try is deploying a new version of the Chrome App, creating a new OAuth client, and sacrificing a goat.
Interestingly during one of my tests the heartbeat actually worked one time as it updated the Device to show that it was assigned to my user, even though the chrome app on the device kept saying 'Device not enrolled' but I haven't seen it since.
Hello
just have deploy for the first time the application
try connecting to do the boostrap and got :
The server has either erred or is incapable of performing the requested operation.
Traceback (most recent call last):
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in call
rv = self.handle_exception(request, response, e)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in call
rv = self.router.dispatch(request, response)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
return route.handler_adapter(request, response)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in call
return handler.dispatch()
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch
return self.handle_exception(e, self.app.debug)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/3b44e98ed7fbb86b/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch
return method(*args, **kwargs)
File "/base/data/home/apps/sgbl-ist-ve-grabngo/deploy-first.413797860836212450/loaner/web_app/backend/handlers/frontend.py", line 74, in getgbl-ist-ve-grabngo/deploy-first.413797860836212450/loaner/web_app/backend/handlers/frontend.py", line 99, in _sync_roles_if_necessary
self._sync_roles_if_necessary()
File "/base/data/home/apps/s
sync_users.sync_user_roles()
File "/base/data/home/apps/sgbl-ist-ve-grabngo/deploy-first.413797860836212450/loaner/web_app/backend/lib/sync_users.py", line 36, in sync_user_rolesgbl-ist-ve-grabngo/deploy-first.413797860836212450/loaner/web_app/backend/clients/directory.py", line 337, in get_all_users_in_group
constants.SUPERADMINS_GROUP)
File "/base/data/home/apps/s
response = self._users_in_group(group_email)
File "/base/data/home/apps/s~gbl-ist-ve-grabngo/deploy-first.413797860836212450/loaner/web_app/backend/clients/directory.py", line 379, in _users_in_group
raise DirectoryRPCError(err.resp.reason)
DirectoryRPCError: Forbidden
Latest Master version returning NameError: name 'CHROME_CLIENT_ID' is not defined
.
Line 154 of web_app/constants.py has:
ALLOWED_CLIENT_IDS = (
CHROME_CLIENT_ID, WEB_CLIENT_ID, endpoints.API_EXPLORER_CLIENT_ID,
)
Changing this to CHROME_APP_CLIENT_ID
and WEB_APP_CLIENT_ID
resolves the issue
It would be cool to get a preconfigured App Engine Project for Grab'n'go on the Marketplace. This would make it super easy to deploy the program on your own with minimal effort.
There are tons of steps with high error potential to be taken.
... see your installation guide ... :)
Update defaults set in config_defaults.yaml should update the web app
Still runs old configuration
I would like to update the configurations in the config_defaults.yaml file. Do I need to redo the bootstrap process and also redeploy the Chome app in the web store in order to do this?
I tried updating the file and running bootstrap again without deploying a new version of the chome app to the web store but the configuration did not update.
I would prefer not to have to redeploy the chrome app every time I want to reconfigure something in the config_default.yaml file is there a way to update the config in the GCP console after deployment?
hi, I'm trying to build this for the first time - just want to check if I'm heading in the right direction. I have some warn errors for peer dependencies, what are they, should they be installed, Where from? or, are they ok?
npm WARN @angular/[email protected] requires a peer of @angular/core@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of @angular/common@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/[email protected] requires a peer of rxjs@^5.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] license should be a valid SPDX license expression
up to date in 11.849s
Also, the bootstrapping section in the setup guide mentions:
so make sure you've added your account to the correct group technical-admins group you defined previously.
but there is no guidance on the permissions for the technical-admins group setup
I should be able to define the Technical_Admins_Group to allow access to certain web-app functions
Technical Admins Group is not defined
The code does not contain this group
Hi- I'd like to add the technical admins group (it's mentioned in setup_guide but it does not seem to be in the implementation)
Can someone please confirm whether or not we should set up this group - and where we define it in the setup?
I think I found it in loaner/web_app/config_defaults.yaml
there's:
# responsible_for_audit: list, A group that is responsible for performing an
# audit on a shelf.
'responsible_for_audit': ['[email protected]']
I'll get a group created, try it, and report back
I have edited all files, I have created the project and I executed this command:
$gcloud app deploy --version=gng20180924
And I think the application should be running normally:
$bash loaner/deployments/deploy.sh web local
$cd ../bazel-bin/loaner/web_app/runfiles.runfiles/gng/
$dev_appserver.py app.yaml
But I'm getting this error:
Traceback (most recent call last):
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/e416f9a06334486a/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/e416f9a06334486a/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/e416f9a06334486a/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 86, in LoadObject
is_parent_package = True
ImportError: No module named loaner
Could anybody help me please? Thanks in advance.
Apologies - it's not an issue - I don't know if the Google Plus community exists - so here goes. I can see logs in App Engine, but where is the data for the loans? Is it possible to create reports?
I noticed that the grab n go flyer mentions reporting on page 19.
Thank you
Using code version Alpha-(0.7.1)
Chrome app loads and Grab n go initiates
pop-up info box says "please wait we are checking this devices current status"
no error messages, as far as I can ascertain.
attempt to start Chrome app on enrolled Chromebook
Device would unlock to be used again, or unenroll to allow re enrollment
Fails with "ERROR Precondition Failed" Message
Go into console find device, click 3 dots, choose unlock, say yes to are you sure prompt, error appears and device remains locked.
Same for unenroll.
This is the same admin account that was used to setup the loaner in the 1st instance, so permissions are unchanged.
Create shelves and assign devices to them
View all the devices that are assigned to a shelf
Audit each shelf's devices
I can create shelves
** when I view a shelf, it shows all enrolled devices, including devices on other shelves **
I can audit the devices
enrol devices
Create two shelves
assign devices to shelves
view shelf details
we have over seventy Grab 'n Go devices now - shelf management is an issue. This is what I understand:
The logic above, in our case, doesn't quite fit. We'd prefer for the device -> shelf relationship to remain in place until the device has been returned. We have six shelves so far, the shelf belongs to a team, so the team has access to a pool of devices, which are returned to the same shelf when the person has finished with it.
Thinking about Google's use case, I can understand that perhaps Google doesn't really care which shelf goes back to - the user is known and once the user has the device it isn't on a shelf - then the device gets audited when it's on a shelf anywhere.
It makes sense, to me, that the device -> shelf relationship could be updated only when the device is audited on the shelf, rather than being removed when the user signs-in to the device
Navigate to web app via GCP console and encounter the following error immediately upon opening page:
ERROR: get_user_email failed: No user account detected.
Alpha-(0.7.1)
bazel v0.24.1
, because v0.25
will not deploy correctly (this is specified in .travis.yml)shoared/config.ts
and web_app/constants.py
in the appropriate places, assuming a prod
-only deployment (i.e. no changes to QA or dev variables).https://<project-id>.appspot.com
ERROR: get_user_email failed: No user account detected.
One thing to note is that we had to make the following change not mentioned in the setup guide in order to ensure deploys work, for what it's worth:
In loaner/deployments/deploy.sh
- ../bazel-out/k8-py3-fastbuild/bin/loaner/deployments/deploy_impl \
+ ../bazel-out/darwin-py3-fastbuild/bin/loaner/deployments/deploy_impl \
We've given the ADMIN_EMAIL
role account super admin access to avoid any permissions-related issues, but still receive the error.
Any guidance would be appreciated. One hypothesis I have yet to test is changing the bazel version to 0.11.1
as is is specified in the Alpha-(0.7.1)
branch's .travis.yml
file, though I'm not familiar enough with App engine to determine whether this would be the issue (since deploys go out just fine, I'm assuming that bazel
would not be the culprit here).
cc @cadiealys
Good day all!!
The question I have is regarding after a Chromebook is returned. When you use the GnG app on the device to return the Chromebook, the Console for GnG shows the device as 'Pending Return'. However, there isn't a way to confirm the return. Is this expected results? Is this the way the system labels a device that has been taken, used, and returned?
Thank you for your thoughts!
Josh Casper
Hello,
I would like to know what is the meaning of the six buttons on the "Search indexing" section in GnG Configuration menu.
I'm testing the app before to release it to all end users and I noticed that the devices that I had enrolled "disappeared" for a moment and after I saw more devices that I had initially...
At the end I have the same devices that I had when I started testing.
Thank you for your time and considerations.
Josh S.
Running bash loaner/deployments/deploy.sh web local would build and deploy the application.
Running bash loaner/deployments/deploy.sh web local produce multiple errors like below.
ERROR: error loading package '': Encountered error while reading extension file 'appengine/py_appengine.bzl': no such package '@io_bazel_rules_appengine//appengine': The native http_archive rule is deprecated. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") for a drop-in replacement.
Use --incompatible_remove_native_http_archive=false to temporarily continue using the native rule.
I was able to change line 224 in the deploy.sh file from "bazel build //loaner/deployments:deploy_impl" to "bazel bulid //loaner/deployments:deploy_impl --incompatible_remove_native_http_archive=false" to get pass the first error.
I received similar errors later in the build process which will be below.
ERROR: /home/emilan/code/loaner/loaner/web_app/BUILD:49:1: no such package '@endpoints_archive//': The native new_http_archive rule is deprecated. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") for a drop-in replacement.
Use --incompatible_remove_native_http_archive=false to temporarily continue using the native rule. and referenced by '//loaner/web_app:chrome_api'
ERROR: Analysis of target '//loaner/web_app:runfiles' failed; build aborted: no such package '@endpoints_archive//': The native new_http_archive rule is deprecated. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") for a drop-in replacement.
Use --incompatible_remove_native_http_archive=false to temporarily continue using the native rule.
The deployed application should allow me to see the web portal.
Blue loading circle that never goes away. Console error states
Uncaught wYmessage: "API discovery response missing required fields."stack: "gapi.client.Error: API discovery response missing required fields.↵ at new wY (https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en.3ztcf60wj34.O/m=client/rt=j/sv=1/d=1/ed=1/am=wQ/rs=AGLTcCO1iMQ1m2V7qF5KgDW5wzPda2t5Hw/cb=gapi.loaded_0:672:159)↵ at f (https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en.3ztcf60wj34.O/m=client/rt=j/sv=1/d=1/ed=1/am=wQ/rs=AGLTcCO1iMQ1m2V7qF5KgDW5wzPda2t5Hw/cb=gapi.loaded_0:723:83)↵ at h.r2 (https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en.3ztcf60wj34.O/m=client/rt=j/sv=1/d=1/ed=1/am=wQ/rs=AGLTcCO1iMQ1m2V7qF5KgDW5wzPda2t5Hw/cb=gapi.loaded_0:84:107)↵ at xs (https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en.3ztcf60wj34.O/m=client/rt=j/sv=1/d=1/ed=1/am=wQ/rs=AGLTcCO1iMQ1m2V7qF5KgDW5wzPda2t5Hw/cb=gapi.loaded_0:87:306)↵ at Wq (https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en.3ztcf60wj34.O/m=client/rt=j/sv=1/d=1/ed=1/am=wQ/rs=AGLTcCO1iMQ1m2V7qF5KgDW5wzPda2t5Hw/cb=gapi.loaded_0:87:186)↵ at .C.uea (https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en.3ztcf60wj34.O/m=client/rt=j/sv=1/d=1/ed=1/am=wQ/rs=AGLTcCO1iMQ1m2V7qF5KgDW5wzPda2t5Hw/cb=gapi.loaded_0:87:52)↵ at Ap (https://apis.google.com/_/scs/apps-static/_/js/k=oz.gapi.en.3ztcf60wj34.O/m=client/rt=j/sv=1/d=1/ed=1/am=wQ/rs=AGLTcCO1iMQ1m2V7qF5KgDW5wzPda2t5Hw/cb=gapi.loaded_0:80:284)↵ at t.invoke (https://onixgrabandgopoc.appspot.com/application.js:1:2143786)↵ at a.run (https://onixgrabandgopoc.appspot.com/application.js:1:2138956)↵ at https://onixgrabandgopoc.appspot.com/application.js:1:2148884"__proto_: _.se
I have created a Compute Engine resource that I am using to push to app engine. When I pull/clone my code to my MacBook I observe the same behavior.
Should this project be open to the world in order for the site to work properly?
Application bootstraps fine
<class 'loaner.web_app.backend.clients.directory.DirectoryRPCError'> Bad Request on the OU step, OU's have been set up by Gsuite admin in the recommended way and everything else seems to be working fine.
In settings I have enabled the toggle "Use asset tags", in order to use the asset id instead of the serial number of the device
It's not asking for he asset id when a new device is enrolled, also I cannot use the asset id in order to audit a shelf.
Enable the toggle option and add a new device or audit a shelf
Thank you very much in advance for your help.
App Engine's SDK provides an app named dev_appserver.py that you can use to test the app on your local development machine. To do so, build the app manually and then use dev_appserver.py from the output directory like so:
bash loaner/deployments/deploy.sh web local
cd ../bazel-bin/loaner/web_app/runfiles.runfiles/gng/
dev_appserver.py app.yaml
In the Cloud Console under App Engine > Versions the GnG code that you just built and pushed should appear.
I want to test locally on my computer:
Under section 2 of the Build and Deploy heading when I type cd ../bazel-bin/loaner/web_app/runfiles.runfiles/gng/dev_appserver.py app.yaml, the web_app directory is missing. The only directory created is deployments. So, GnG code doesn't appear and I do not see any of the 4 services.
~/loaner/bazel-bin/loaner$ ls
deployments
Hi,
Could you please help me? I'm trying to create a new survey, but I don't have any entity to use as example, could you share with me a print screen of your survey entity? remember I just need the properties...
Thank you in advance.
I have been testing and have done two installs.
I have run the bootstrap process successfully and changed the constants.py for Bootstrap = False
However, was still getting the bootstrap redirect in the web app.
I see in release notes "Known Issues."
If you are constantly redirected to the bootstrap screen you may need to go into Datastore and select "Config" in the dropdown menu and set bootstrap_completed to true.
However, in my config bootstrap_completed is true.
I note that bootstrap_started is false. If I manually set this to true the webapp performs as expected.
To open the GnG Web app in the default web browser in order to Bootstrap it (the first time).
I'm getting this message: "Forbidden" when I build and deploy the app. The URL is:
https://[project id].appspot.com/, even if I build and deploy it locally I get the same error.
I'm thinking that the problem is related with: my google account in Google Admin console is not a full admin so the app never is start the "Bootstrapping" process. But I need to confirm this.
Thanks in advance.
Build and Deploy, step #1, executing this command: "bash deployments/deploy.sh web prod".
ERROR: error loading package '': Encountered error while reading extension file 'requirements.bzl': no such package '@pip_deps//': pip_import failed: Collecting pycrypto==2.6.1 (from -r /home/user/Desktop/Grab-n-Go/loaner/third_party/requirements.txt (line 1))
Running bash deployments/deploy.sh web prod would build and deploy application. Running it from CloudShell after configuring based on the wiki.
ERROR: (gcloud.app.deploy) argument --version/-v: Bad value [admin_-20181002]: May only contain lowercase letters, digits, and hyphens. Must begin and end with a letter or digit. Must not exceed 63 characters.
Doesn't seem to like the following in deploy_impl.py
_else:
cmds = [
'gcloud', 'app', 'deploy', '--no-promote', '--project={}'.format(
self.project_id), '--version={}'.format(self.version)]_
If you change to '--version=1' it works fine.
Build from Cloudshell?
I did some changes in the bootstrap.yaml (emails templates and surveys), before the deploy I had this:
but now, I do not have them:
The chrome web app is not showing the survey:
Do you have any idea how to create them again? I have tried bootstrapping the app more than 10 times and it's not working, also I tried to create the 2 entities manually but I think I'm doing wrongly (type of data, names, etc).
Thank you in advance for your help and suggestions.
Use my username to deploy a GAE version
ERROR: (gcloud.app.deploy) argument --version/-v: Bad value [connie.jimenez-20190212]: May only contain lowercase letters, digits, and hyphens. Must begin and end with a letter or digit. Must not exceed 63 characters.
Switched out the variable, user=getpass.getuser() in deploy_imply.py, and set it to a constant 'cj' and that cleared up that issue.
Image for OU structure should have width of 450px
It's currently showing the image and has {width="450"}
next to it
Go here: https://github.com/google/loaner/blob/master/docs/gsuite_config.md#configure-the-organizational-unit
Might just need to switch it to an <img>
tag
Enroll a device in the GNG program via the Grab N Go Application
Getting a Bad Request error (pictured bellow) when attempting to add a chromebook in the grab n go application. The device is enterprise enrolled and it appears in the correct OU Grab N Go/Prod/Default in google admin console. If I log into the chromebook a popup appears that says the device has not been enrolled in the gng program.
Click on Devices > +Add New Devices > Copy and Paste the serial number of the chromebook > click add > get error listed above.
Hello,
We had a working deployment, but it seemed like our project was using qa instead of Prod.
To resolve this, we fixed the errors we had in the constants.py, and then re deployed with the latest code. However, now we are unable to sync user roles, and are not able to see the bootstrap page.
When i revert to our previous build in App Engine, Versions (cloud console) We are able to use the earlier deployment, which makes me think its not an issue with our credentials, but something that changed within code.
Here's some things i'm seeing in error logs that might provide clues as to what changed:
[Errno 2] No such file or directory: '' (/base/alloc/tmpfs/dynamic_runtimes/python27g/f612b68945952bd1/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py:1552)
Traceback (most recent call last):
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/f612b68945952bd1/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1535, in call
rv = self.handle_exception(request, response, e)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/f612b68945952bd1/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1529, in call
rv = self.router.dispatch(request, response)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/f612b68945952bd1/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1278, in default_dispatcher
return route.handler_adapter(request, response)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/f612b68945952bd1/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 1102, in call
return handler.dispatch()
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/f612b68945952bd1/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 572, in dispatch
return self.handle_exception(e, self.app.debug)
File "/base/alloc/tmpfs/dynamic_runtimes/python27g/f612b68945952bd1/python27/python27_lib/versions/third_party/webapp2-2.5.2/webapp2.py", line 570, in dispatch
return method(*args, **kwargs)
Please let me know what other information you need.
I also noticed a change in the deployment.sh script:
line 247:
../bazel-out/k8-py3-fastbuild/bin/loaner/deployments/deploy_impl
i had to change this to:
../bazel-out/darwin-py3-fastbuild/bin/loaner/deployments/deploy_impl \
Is there something else that I'm missing from Bazel or NPM?
Thanks,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.