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

New custom client, error in pulling previous data streams. #324

Closed
deepalics0044 opened this issue Feb 28, 2019 · 47 comments
Closed

New custom client, error in pulling previous data streams. #324

deepalics0044 opened this issue Feb 28, 2019 · 47 comments

Comments

@deepalics0044
Copy link

deepalics0044 commented Feb 28, 2019

I am working on the android bulid e-mission project in android-studio. After assigning different name, logo and version I can see the changes in the emulator. The only problem is I am not able to retrieve previous trip data. Whenever I try to process data, this is what I see in server log.

START 2019-02-28 13:00:07.119068 POST /timeline/getTrips/2018-10-30
END 2019-02-28 13:00:07.141879 POST /timeline/getTrips/2018-10-30  0.02269577980041504 
START 2019-02-28 13:00:07.151954 POST /pipeline/get_complete_ts
END 2019-02-28 13:00:07.152497 POST /pipeline/get_complete_ts  0.0004508495330810547 
Traceback (most recent call last):
  File "/home/deepali/e-mission-server/emission/net/api/bottle.py", line 997, in _handle
    out = route.call(**args)
  File "/home/deepali/e-mission-server/emission/net/api/bottle.py", line 1998, in wrapper
    rv = callback(*a, **ka)
  File "emission/net/api/cfc_webapp.py", line 246, in getTrips
    user_uuid=getUUID(request)
  File "emission/net/api/cfc_webapp.py", line 433, in getUUID
    retUUID = enaa.getUUID(request, auth_method, inHeader)
  File "/home/deepali/e-mission-server/emission/net/auth/auth.py", line 62, in getUUID
    userToken = __getToken__(request, inHeader)
  File "/home/deepali/e-mission-server/emission/net/auth/auth.py", line 56, in __getToken__
    userToken = request.json['user']
KeyError: 'user'
Traceback (most recent call last):
  File "/home/deepali/e-mission-server/emission/net/api/bottle.py", line 997, in _handle
    out = route.call(**args)
  File "/home/deepali/e-mission-server/emission/net/api/bottle.py", line 1998, in wrapper
    rv = callback(*a, **ka)
  File "emission/net/api/cfc_webapp.py", line 196, in getPipelineState
    user_uuid = getUUID(request)
  File "emission/net/api/cfc_webapp.py", line 433, in getUUID
    retUUID = enaa.getUUID(request, auth_method, inHeader)
  File "/home/deepali/e-mission-server/emission/net/auth/auth.py", line 62, in getUUID
    userToken = __getToken__(request, inHeader)
  File "/home/deepali/e-mission-server/emission/net/auth/auth.py", line 56, in __getToken__
    userToken = request.json['user']
KeyError: 'user'
START 2019-02-28 13:00:07.601544 POST /datastreams/find_entries/timestamp
END 2019-02-28 13:00:07.602144 POST /datastreams/find_entries/timestamp  0.0005080699920654297 

I just want to make sure I get all data before launching it on play store.

@shankari
Copy link
Contributor

Good job using markdown! I just reformatted it to make it easier to read. Since we are using GitHub, you can use GitHub-flavored markdown, which allows you to use ``` for multi-line text

@shankari
Copy link
Contributor

wrt the actual error, I am pretty sure that I know what it is, but I checked and I believe it is already covered in the documents. Just so I can confirm this, can you please confirm that you have done the steps from https://github.com/e-mission/e-mission-docs/blob/master/docs/e-mission-phone/create_a_new_custom_client.md

You can do this directly in markdown

[x] copy over config.xml
...
[ ] optional: iff you are supporting iOS/want push notifications
...

@shankari
Copy link
Contributor

Note also that at this moment, you cannot push the built app directly to the play store because of
#325

Since there are multiple of you who want to deploy to the stores directly, I will fix that. However, before I do, I have pending changes to fix the "location tracking toggle" issue that I would like help testing. And of course, I would like help testing the dynamic permissions as well.

So, in addition to resolving your build issues, can you also:

  • install the target apk from Dealing gracefully with location services toggle e-mission-data-collection#127 (comment) and experiment with turning location services on/off arbitrarily during the day. It would be ideal if you could get this done by Monday or so, so that I can merge these changes and then start the dynamic permission changes. You don't need to be at your desk for this testing, so the weekend is actually a really good time for testing :)
  • once I am done with the dynamic permission changes, test those as well
  • once I am done with both sets of changes and have merged them, update everything, build your apk and then push to the store.

@shankari
Copy link
Contributor

Please keep me updated on the status of the testing

@deepalics0044
Copy link
Author

I have installed. I am experimenting will let you know tomorrow.

@deepalics0044
Copy link
Author

deepalics0044 commented Mar 5, 2019

1.copy over config.xml

2.change the package in the id

3.reset the android-versionCode, ios-CFBundleVersion and version

<?xml version='1.0' encoding='utf-8'?> <widget android-versionCode="36" id="in.ac.iisc.cistup.emission" ios-CFBundleVersion="36" version="2.6.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>Logtrip</name>

4 create a new appid in apple (https://developer.apple.com) with the new id specified in step 2

Not supporting iOS

  1. optional: iff you are supporting iOS/want push notifications

Not supporting iOS

  1. optional: iff you want to support UI channels create a new entry for the app in the ionic console

Don't want right now

7.copy over package.json and make the same changes as config.xml

One thing I have noticed is that package.json takes preference. When I try to prepare cordova making changes in both files (config.xml & package.json) package.json tends to overwrites config.xml and the changes are not reflected in apk.

the package.json will always be created to mirror the config.xml whenever you run cordova prepare, if it does not exist. If a package.json does exist, it will take preference (but only for the things defined in it, like plugins and platforms, for other config options config.xml will still be used).

@shankari
Copy link
Contributor

shankari commented Mar 5, 2019

One thing I have noticed is that package.json takes preference. When I try to prepare cordova making changes in both files (config.xml & package.json) package.json tends to overwrites config.xml and the changes are not reflected in apk.

ok... but you are making the same changes to package.json and config.xml, so it doesn't really matter which takes precedence.

What about the other steps? There are more than 7...

@deepalics0044
Copy link
Author

  1. Changes made in package.json
    { "name": "in.ac.iisc.cistup.emission", "version": "2.6.1", "displayName": "Logtrip", "scripts": { "setup-serve": "./bin/download_settings_controls.js", "serve": "phonegap --verbose serve" }, "devDependencies": { "phonegap": "^8.2.2" }, "dependencies": { "fs-extra": "^5.0.0", "klaw-sync": "^3.0.2" } }

@shankari
Copy link
Contributor

shankari commented Mar 5, 2019

@deepalics0044 are you waiting for a response from me? If so, can you specify what your question is?

@shankari
Copy link
Contributor

shankari commented Mar 5, 2019

Do the instructions say anything about package-lock.json?
Let us first establish whether you have actually executed all the steps in the instructions before speculating about steps that are not in the instructions.

I am not going to respond to any other comments until I see a complete listing of all the steps in the instructions and whether you have executed them.

@deepalics0044
Copy link
Author

deepalics0044 commented Mar 5, 2019

  1. Follow the full installation steps:-
  • No problem in installing ionic and cordova

  • enabled platform hooks


deepali@deepali-HP-Pro-3090-Microtower-PC:~/e-mission-ui-worktesting$ git clone https://github.com/driftyco/ionic-package-hooks.git ./package-hooks
Cloning into './package-hooks'...
remote: Enumerating objects: 250, done.
remote: Total 250 (delta 0), reused 0 (delta 0), pack-reused 250
Receiving objects: 100% (250/250), 50.47 KiB | 0 bytes/s, done.
Resolving deltas: 100% (125/125), done.
Checking connectivity... done.

  • setup the config
deepali@deepali-HP-Pro-3090-Microtower-PC:~/e-mission-ui-worktesting$ ./bin/configure_xml_and_json.js cordovabuild
Copied config.cordovabuild.xml -> config.xml and package.cordovabuild.json -> package.json

The above step changed the config.xml with new version and versionCode and package.json with previous . I made the changes in package.json again which matches config The steps involves

copy over config.xml,change the package in the id,give app a new name i.e Logtrip

  • bower update
    Successful

  • npm install

npm WARN deprecated [email protected]: connect 2.x series is deprecated
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN deprecated [email protected]: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN [email protected] requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

added 512 packages from 678 contributors, removed 467 packages, updated 100 packages, moved 206 packages and audited 5165 packages in 147.821s

  • set cocoapods (i don't know what exactly it does)
    Installed
    CocoaPods is a dependency manager for Swift which is used in iOS so not doing the next step i.e pod setup

  • cordova prepare

deepali@deepali-HP-Pro-3090-Microtower-PC:~/e-mission-ui-worktesting$ cordova prepare
Discovered platform "ios@^4.5.4" in config.xml or package.json. Adding it to the project
Using cordova-fetch for cordova-ios@^4.5.4
Adding ios project...
Creating Cordova project for the iOS platform:
	Path: platforms/ios
	Package: in.ac.iisc.cistup.emission
	Name: Logtrip
iOS project created with [email protected]
Discovered platform "android@^6.4.0" in config.xml or package.json. Adding it to the project
Using cordova-fetch for cordova-android@^6.4.0
Adding android project...
Creating Cordova project for the Android platform:
	Path: platforms/android
	Package: in.ac.iisc.cistup.emission
	Name: Logtrip
	Activity: MainActivity
	Android target: android-26
Subproject Path: CordovaLib
Android project created with [email protected]
Discovered plugin "phonegap-plugin-push" in config.xml. Adding it to the project
Installing "phonegap-plugin-push" for android
Subproject Path: CordovaLib
Installing "phonegap-plugin-push" for browser
Installing "phonegap-plugin-push" for ios
Discovered plugin "ionic-plugin-keyboard" in config.xml. Adding it to the project
Installing "ionic-plugin-keyboard" for android
Installing "ionic-plugin-keyboard" for browser
Installing "ionic-plugin-keyboard" for ios
Discovered plugin "cordova-plugin-app-version" in config.xml. Adding it to the project
Installing "cordova-plugin-app-version" for android
Installing "cordova-plugin-app-version" for browser
Installing "cordova-plugin-app-version" for ios
Discovered plugin "cordova-plugin-file" in config.xml. Adding it to the project
Installing "cordova-plugin-file" for android

The Android Persistent storage location now defaults to "Internal". Please check this plugin's README to see if your application needs any changes in its config.xml.

If this is a new application no changes are required.

If this is an update to an existing application that did not specify an "AndroidPersistentFileLocation" you may need to add:

      "<preference name="AndroidPersistentFileLocation" value="Compatibility" />"

to config.xml in order for the application to find previously stored files.
        
Installing "cordova-plugin-file" for browser
Installing "cordova-plugin-file" for ios
Discovered plugin "cordova-plugin-device" in config.xml. Adding it to the project
Installing "cordova-plugin-device" for android
Installing "cordova-plugin-device" for browser
Installing "cordova-plugin-device" for ios
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Installing "cordova-plugin-whitelist" for android

               This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
          
Installing "cordova-plugin-whitelist" for browser
Installing "cordova-plugin-whitelist" for ios
Discovered plugin "cordova-plugin-customurlscheme" in config.xml. Adding it to the project
Installing "cordova-plugin-customurlscheme" for android
Installing "cordova-plugin-customurlscheme" for browser
Installing "cordova-plugin-customurlscheme" for ios
Discovered plugin "cordova-plugin-email-composer" in config.xml. Adding it to the project
Installing "cordova-plugin-email-composer" for android
Subproject Path: CordovaLib
Installing "cordova-plugin-email-composer" for browser
Installing "cordova-plugin-email-composer" for ios
Discovered plugin "cordova-plugin-x-socialsharing" in config.xml. Adding it to the project
Installing "cordova-plugin-x-socialsharing" for android
Installing "es6-promise-plugin" for android
Subproject Path: CordovaLib
Installing "cordova-plugin-x-socialsharing" for browser
Plugin dependency "[email protected]" already fetched, using that version.
Installing "es6-promise-plugin" for browser
Installing "cordova-plugin-x-socialsharing" for ios
Plugin dependency "[email protected]" already fetched, using that version.
Installing "es6-promise-plugin" for ios
Discovered plugin "cordova-plugin-inappbrowser" in config.xml. Adding it to the project
Installing "cordova-plugin-inappbrowser" for android
Installing "cordova-plugin-inappbrowser" for browser
Installing "cordova-plugin-inappbrowser" for ios
Discovered plugin "de.appplant.cordova.plugin.local-notification-ios9-fix" in config.xml. Adding it to the project
Installing "de.appplant.cordova.plugin.local-notification-ios9-fix" for android
Plugin dependency "[email protected]" already fetched, using that version.
Dependent plugin "cordova-plugin-device" already installed on android.
Subproject Path: CordovaLib

        Your support is needed. If you use the local-notification plugin please support us in order to ensure further development.
        https://github.com/katzer/cordova-plugin-local-notifications#supporting

        Thank you!
    
Installing "de.appplant.cordova.plugin.local-notification-ios9-fix" for browser
Plugin dependency "[email protected]" already fetched, using that version.
Dependent plugin "cordova-plugin-device" already installed on browser.

        Your support is needed. If you use the local-notification plugin please support us in order to ensure further development.
        https://github.com/katzer/cordova-plugin-local-notifications#supporting

        Thank you!
    
Installing "de.appplant.cordova.plugin.local-notification-ios9-fix" for ios
Plugin dependency "[email protected]" already fetched, using that version.
Dependent plugin "cordova-plugin-device" already installed on ios.
Installing "cordova-plugin-registerusernotificationsettings" for ios

        Your support is needed. If you use the local-notification plugin please support us in order to ensure further development.
        https://github.com/katzer/cordova-plugin-local-notifications#supporting

        Thank you!
    
Discovered plugin "cordova-plugin-ionic" in config.xml. Adding it to the project
Installing "cordova-plugin-ionic" for android
Installing "cordova-plugin-add-swift-support" for android
Installing "cordova-plugin-splashscreen" for android
Installing "cordova-plugin-ionic" for browser
Plugin dependency "[email protected]" already fetched, using that version.
Installing "cordova-plugin-add-swift-support" for browser
Plugin dependency "[email protected]" already fetched, using that version.
Installing "cordova-plugin-splashscreen" for browser
Installing "cordova-plugin-ionic" for ios
Plugin dependency "[email protected]" already fetched, using that version.
Installing "cordova-plugin-add-swift-support" for ios
Plugin dependency "[email protected]" already fetched, using that version.
Installing "cordova-plugin-splashscreen" for ios
Discovered plugin "edu.berkeley.eecs.emission.cordova.auth" in config.xml. Adding it to the project
Installing "edu.berkeley.eecs.emission.cordova.auth" for android
Subproject Path: CordovaLib
Installing "edu.berkeley.eecs.emission.cordova.auth" for browser
walk callback with files = /home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.auth/src/android/AuthPendingResult.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.auth/src/android/AuthResult.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.auth/src/android/AuthTokenCreationFactory.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.auth/src/android/AuthTokenCreator.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.auth/src/android/GoogleAccountManagerAuth.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.auth/src/android/JWTAuthPlugin.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.auth/src/android/OpenIDAuth.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.auth/src/android/OpenIDAuthStateManager.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.auth/src/android/PromptedAuth.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.auth/src/android/UserProfile.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.auth/src/android/openid-config.gradle
Trying to get packages from file: AuthPendingResult.java
Handling package: edu.berkeley.eecs.emission.cordova.jwtauth
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/jwtauth/AuthPendingResult.java
Trying to get packages from file: GoogleAccountManagerAuth.java
Handling package: edu.berkeley.eecs.emission.cordova.jwtauth
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/jwtauth/GoogleAccountManagerAuth.java
Installing "edu.berkeley.eecs.emission.cordova.auth" for ios
Discovered plugin "edu.berkeley.eecs.emission.cordova.comm" in config.xml. Adding it to the project
Installing "edu.berkeley.eecs.emission.cordova.comm" for android
Subproject Path: CordovaLib
Installing "edu.berkeley.eecs.emission.cordova.comm" for browser
walk callback with files = /home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.comm/src/android/CommunicationHelper.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.comm/src/android/CommunicationHelperPlugin.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.comm/src/android/httplib.gradle
Trying to get packages from file: CommunicationHelper.java
Handling package: edu.berkeley.eecs.emission.cordova.comm
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/comm/CommunicationHelper.java
Installing "edu.berkeley.eecs.emission.cordova.comm" for ios
Discovered plugin "edu.berkeley.eecs.emission.cordova.datacollection" in config.xml. Adding it to the project
Installing "edu.berkeley.eecs.emission.cordova.datacollection" for android
Subproject Path: CordovaLib
Installing "edu.berkeley.eecs.emission.cordova.datacollection" for browser
walk callback with files = /home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/BootReceiver.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/ConfigManager.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/Constants.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/DataCollectionPlugin.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/GooglePlayChecker.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/sensors/BatteryPollSensor.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/sensors/BatteryUtils.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/sensors/PollSensor.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/sensors/PollSensorManager.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/wrapper/Battery.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/wrapper/ConsentConfig.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/wrapper/LocationTrackingConfig.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/wrapper/Metadata.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/wrapper/SimpleLocation.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/wrapper/StatsEvent.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/wrapper/Timer.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/wrapper/Transition.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/location/ActivityRecognitionChangeIntentService.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/location/GeofenceExitIntentService.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/location/LocationChangeIntentService.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/location/TripDiaryStateMachineForegroundService.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/location/TripDiaryStateMachineReceiver.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/location/TripDiaryStateMachineService.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/location/TripDiaryStateMachineServiceOngoing.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/location/actions/ActivityRecognitionActions.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/location/actions/GeofenceActions.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/location/actions/GeofenceLocationIntentService.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.datacollection/src/android/location/actions/LocationTrackingActions.java
Trying to get packages from file: BootReceiver.java
Handling package: edu.berkeley.eecs.emission.cordova.tracker
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/tracker/BootReceiver.java
Trying to get packages from file: ConfigManager.java
Handling package: edu.berkeley.eecs.emission.cordova.tracker
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/tracker/ConfigManager.java
Trying to get packages from file: DataCollectionPlugin.java
Handling package: edu.berkeley.eecs.emission.cordova.tracker
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/tracker/DataCollectionPlugin.java
Trying to get packages from file: BatteryPollSensor.java
Handling package: edu.berkeley.eecs.emission.cordova.tracker.sensors
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/tracker/sensors/BatteryPollSensor.java
Trying to get packages from file: PollSensorManager.java
Handling package: edu.berkeley.eecs.emission.cordova.tracker.sensors
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/tracker/sensors/PollSensorManager.java
Trying to get packages from file: ActivityRecognitionChangeIntentService.java
Handling package: edu.berkeley.eecs.emission.cordova.tracker.location
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/tracker/location/ActivityRecognitionChangeIntentService.java
Trying to get packages from file: GeofenceExitIntentService.java
Handling package: edu.berkeley.eecs.emission.cordova.tracker.location
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/tracker/location/GeofenceExitIntentService.java
Trying to get packages from file: TripDiaryStateMachineForegroundService.java
Handling package: edu.berkeley.eecs.emission.cordova.tracker.location
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/tracker/location/TripDiaryStateMachineForegroundService.java
Trying to get packages from file: LocationChangeIntentService.java
Handling package: edu.berkeley.eecs.emission.cordova.tracker.location
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/tracker/location/LocationChangeIntentService.java
Trying to get packages from file: TripDiaryStateMachineReceiver.java
Handling package: edu.berkeley.eecs.emission.cordova.tracker.location
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/tracker/location/TripDiaryStateMachineReceiver.java
Trying to get packages from file: TripDiaryStateMachineServiceOngoing.java
Handling package: edu.berkeley.eecs.emission.cordova.tracker.location
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/tracker/location/TripDiaryStateMachineServiceOngoing.java
Trying to get packages from file: TripDiaryStateMachineService.java
Handling package: edu.berkeley.eecs.emission.cordova.tracker.location
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/tracker/location/TripDiaryStateMachineService.java
Installing "edu.berkeley.eecs.emission.cordova.datacollection" for ios
Discovered plugin "edu.berkeley.eecs.emission.cordova.serversync" in config.xml. Adding it to the project
Installing "edu.berkeley.eecs.emission.cordova.serversync" for android
Installing "edu.berkeley.eecs.emission.cordova.serversync" for browser
walk callback with files = /home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.serversync/src/android/Authenticator.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.serversync/src/android/AuthenticatorService.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.serversync/src/android/CommunicationHelper.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.serversync/src/android/ConfigManager.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.serversync/src/android/ServerSyncAdapter.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.serversync/src/android/ServerSyncConfig.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.serversync/src/android/ServerSyncPlugin.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.serversync/src/android/StubContentProvider.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.serversync/src/android/SyncService.java
Trying to get packages from file: ConfigManager.java
Handling package: edu.berkeley.eecs.emission.cordova.serversync
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/serversync/ConfigManager.java
Trying to get packages from file: ServerSyncAdapter.java
Handling package: edu.berkeley.eecs.emission.cordova.serversync
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/serversync/ServerSyncAdapter.java
Installing "edu.berkeley.eecs.emission.cordova.serversync" for ios
Discovered plugin "edu.berkeley.eecs.emission.cordova.settings" in config.xml. Adding it to the project
Installing "edu.berkeley.eecs.emission.cordova.settings" for android
Installing "edu.berkeley.eecs.emission.cordova.settings" for browser
walk callback with files = /home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.settings/src/android/ConnectionSettings.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.settings/src/android/ConnectionSettingsPlugin.java
Installing "edu.berkeley.eecs.emission.cordova.settings" for ios
Discovered plugin "edu.berkeley.eecs.emission.cordova.transitionnotify" in config.xml. Adding it to the project
Installing "edu.berkeley.eecs.emission.cordova.transitionnotify" for android
Installing "edu.berkeley.eecs.emission.cordova.transitionnotify" for browser
walk callback with files = /home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.transitionnotify/src/android/TransitionNotificationReceiver.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.transitionnotify/src/android/TransitionNotifier.java
Trying to get packages from file: TransitionNotifier.java
Handling package: edu.berkeley.eecs.emission.cordova.transitionnotify
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/transitionnotify/TransitionNotifier.java
Trying to get packages from file: TransitionNotificationReceiver.java
Handling package: edu.berkeley.eecs.emission.cordova.transitionnotify
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/transitionnotify/TransitionNotificationReceiver.java
Installing "edu.berkeley.eecs.emission.cordova.transitionnotify" for ios
Discovered plugin "edu.berkeley.eecs.emission.cordova.unifiedlogger" in config.xml. Adding it to the project
Installing "edu.berkeley.eecs.emission.cordova.unifiedlogger" for android
Subproject Path: CordovaLib
Installing "edu.berkeley.eecs.emission.cordova.unifiedlogger" for browser
walk callback with files = /home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.unifiedlogger/src/android/DatabaseLogHandler.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.unifiedlogger/src/android/Log.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.unifiedlogger/src/android/NotificationHelper.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.unifiedlogger/src/android/UnifiedLogger.java
Trying to get packages from file: NotificationHelper.java
Handling package: edu.berkeley.eecs.emission.cordova.unifiedlogger
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/unifiedlogger/NotificationHelper.java
Installing "edu.berkeley.eecs.emission.cordova.unifiedlogger" for ios
Discovered plugin "edu.berkeley.eecs.emission.cordova.usercache" in config.xml. Adding it to the project
Installing "edu.berkeley.eecs.emission.cordova.usercache" for android
Installing "edu.berkeley.eecs.emission.cordova.usercache" for browser
walk callback with files = /home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.usercache/src/android/BuiltinUserCache.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.usercache/src/android/UserCache.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.usercache/src/android/UserCacheFactory.java,/home/deepali/e-mission-ui-worktesting/plugins/edu.berkeley.eecs.emission.cordova.usercache/src/android/UserCachePlugin.java
Trying to get packages from file: UserCachePlugin.java
Handling package: edu.berkeley.eecs.emission.cordova.usercache
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/usercache/UserCachePlugin.java
Trying to get packages from file: BuiltinUserCache.java
Handling package: edu.berkeley.eecs.emission.cordova.usercache
sourceFile: /home/deepali/e-mission-ui-worktesting/platforms/android/src/edu/berkeley/eecs/emission/cordova/usercache/BuiltinUserCache.java
Installing "edu.berkeley.eecs.emission.cordova.usercache" for ios
Running command: /home/deepali/e-mission-ui-worktesting/hooks/after_prepare/010_add_platform_class.js /home/deepali/e-mission-ui-worktesting
add to body class: platform-android
add to body class: platform-browser
add to body class: platform-ios
Running command: /home/deepali/e-mission-ui-worktesting/hooks/after_prepare/015_copy_icon_to_drawable.js /home/deepali/e-mission-ui-worktesting
About to copy file /home/deepali/e-mission-ui-worktesting/platforms/android/res/mipmap-hdpi/icon.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-hdpi/icon.png
About to copy file /home/deepali/e-mission-ui-worktesting/platforms/android/res/mipmap-ldpi/icon.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-ldpi/icon.png
About to copy file /home/deepali/e-mission-ui-worktesting/platforms/android/res/mipmap-mdpi/icon.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-mdpi/icon.png
About to copy file /home/deepali/e-mission-ui-worktesting/platforms/android/res/mipmap-xhdpi/icon.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xhdpi/icon.png
About to copy file /home/deepali/e-mission-ui-worktesting/platforms/android/res/mipmap-xxhdpi/icon.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xxhdpi/icon.png
About to copy file /home/deepali/e-mission-ui-worktesting/platforms/android/res/mipmap-xxxhdpi/icon.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xxxhdpi/icon.png
Running command: /home/deepali/e-mission-ui-worktesting/hooks/after_prepare/020_copy_notification_icons.js /home/deepali/e-mission-ui-worktesting
About to copy icons from /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-hdpi/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-hdpi/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-hdpi-v11/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-hdpi-v11/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-hdpi-v9/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-hdpi-v9/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-mdpi/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-mdpi/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-mdpi-v11/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-mdpi-v11/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-mdpi-v9/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-mdpi-v9/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-xhdpi/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xhdpi/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-xhdpi-v11/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xhdpi-v11/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-xhdpi-v9/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xhdpi-v9/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-xxhdpi/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xxhdpi/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-xxhdpi-v11/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xxhdpi-v11/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-xxhdpi-v9/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xxhdpi-v9/ic_mood_question.png
About to copy icons from /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-hdpi/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-hdpi/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-hdpi-v11/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-hdpi-v11/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-hdpi-v9/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-hdpi-v9/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-mdpi/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-mdpi/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-mdpi-v11/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-mdpi-v11/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-mdpi-v9/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-mdpi-v9/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-xhdpi/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xhdpi/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-xhdpi-v11/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xhdpi-v11/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-xhdpi-v9/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xhdpi-v9/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-xxhdpi/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xxhdpi/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-xxhdpi-v11/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xxhdpi-v11/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-xxhdpi-v9/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xxhdpi-v9/ic_question_answer.png
Running command: /home/deepali/e-mission-ui-worktesting/package-hooks/ios9_allow_http.sh /home/deepali/e-mission-ui-worktesting
Update IOS build setting SWIFT_OBJC_BRIDGING_HEADER to: "$(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h" for build configuration Debug
Update IOS build setting SWIFT_OBJC_BRIDGING_HEADER to: "$(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h" for build configuration Release
Update IOS build setting ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to: YES for build configuration Debug
Update SWIFT version to 3.0 Debug
Update IOS build setting SWIFT_OPTIMIZATION_LEVEL to: -Onone for build configuration Debug
Update IOS build setting ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to: YES for build configuration Release
Update SWIFT version to 3.0 Release

  • cordova emulate android
deepali@deepali-HP-Pro-3090-Microtower-PC:~/e-mission-ui-worktesting$ cordova emulate android
Running command: /home/deepali/e-mission-ui-worktesting/hooks/after_prepare/010_add_platform_class.js /home/deepali/e-mission-ui-worktesting
add to body class: platform-android
Running command: /home/deepali/e-mission-ui-worktesting/hooks/after_prepare/015_copy_icon_to_drawable.js /home/deepali/e-mission-ui-worktesting
About to copy file /home/deepali/e-mission-ui-worktesting/platforms/android/res/mipmap-hdpi/icon.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-hdpi/icon.png
About to copy file /home/deepali/e-mission-ui-worktesting/platforms/android/res/mipmap-ldpi/icon.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-ldpi/icon.png
About to copy file /home/deepali/e-mission-ui-worktesting/platforms/android/res/mipmap-mdpi/icon.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-mdpi/icon.png
About to copy file /home/deepali/e-mission-ui-worktesting/platforms/android/res/mipmap-xhdpi/icon.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xhdpi/icon.png
About to copy file /home/deepali/e-mission-ui-worktesting/platforms/android/res/mipmap-xxhdpi/icon.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xxhdpi/icon.png
About to copy file /home/deepali/e-mission-ui-worktesting/platforms/android/res/mipmap-xxxhdpi/icon.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xxxhdpi/icon.png
Running command: /home/deepali/e-mission-ui-worktesting/hooks/after_prepare/020_copy_notification_icons.js /home/deepali/e-mission-ui-worktesting
About to copy icons from /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-hdpi/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-hdpi/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-hdpi-v11/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-hdpi-v11/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-hdpi-v9/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-hdpi-v9/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-mdpi/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-mdpi/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-mdpi-v11/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-mdpi-v11/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-mdpi-v9/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-mdpi-v9/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-xhdpi/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xhdpi/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-xhdpi-v11/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xhdpi-v11/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-xhdpi-v9/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xhdpi-v9/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-xxhdpi/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xxhdpi/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-xxhdpi-v11/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xxhdpi-v11/ic_mood_question.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_mood_question/drawable-xxhdpi-v9/ic_mood_question.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xxhdpi-v9/ic_mood_question.png
About to copy icons from /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-hdpi/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-hdpi/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-hdpi-v11/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-hdpi-v11/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-hdpi-v9/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-hdpi-v9/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-mdpi/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-mdpi/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-mdpi-v11/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-mdpi-v11/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-mdpi-v9/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-mdpi-v9/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-xhdpi/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xhdpi/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-xhdpi-v11/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xhdpi-v11/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-xhdpi-v9/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xhdpi-v9/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-xxhdpi/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xxhdpi/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-xxhdpi-v11/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xxhdpi-v11/ic_question_answer.png
About to copy file /home/deepali/e-mission-ui-worktesting/resources/android/ic_question_answer/drawable-xxhdpi-v9/ic_question_answer.png -> /home/deepali/e-mission-ui-worktesting/platforms/android/res/drawable-xxhdpi-v9/ic_question_answer.png
Running command: /home/deepali/e-mission-ui-worktesting/package-hooks/ios9_allow_http.sh /home/deepali/e-mission-ui-worktesting
ANDROID_HOME=/home/deepali/Android/Sdk
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
Subproject Path: CordovaLib
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
	at build_4jr62fkgopc07lp2kp73j2rgr.run(/home/deepali/e-mission-ui-worktesting/platforms/android/build.gradle:144)
Configuration 'compile' in project ':' is deprecated. Use 'implementation' instead.
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
:preBuild UP-TO-DATE
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:processDebugManifest
:preDebugBuild
:CordovaLib:compileDebugAidl
:compileDebugAidl
:CordovaLib:packageDebugRenderscript NO-SOURCE
:compileDebugRenderscript
:checkDebugManifest
:generateDebugBuildConfig
:prepareLintJar
:generateDebugResValues
:generateDebugResources
:CordovaLib:compileDebugRenderscript
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:mergeDebugResources
:createDebugCompatibleScreenManifests
:processDebugManifest
:splitsDiscoveryTaskDebug
:CordovaLib:platformAttrExtractor
:CordovaLib:generateDebugBuildConfig
:CordovaLib:prepareLintJar
:CordovaLib:javaPreCompileDebug
:CordovaLib:processDebugJavaRes NO-SOURCE
:compileDebugNdk NO-SOURCE
:mergeDebugShaders
:compileDebugShaders
:generateDebugAssets
:CordovaLib:mergeDebugShaders
:CordovaLib:compileDebugShaders
:CordovaLib:processDebugResources
:processDebugResources
:generateDebugSources
:CordovaLib:generateDebugSources
:CordovaLib:compileDebugJavaWithJavacNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:javaPreCompileDebug
:compileDebugJavaWithJavacNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

:compileDebugSources
:CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets
:mergeDebugAssets
:transformClassesWithDexBuilderForDebug
:transformDexArchiveWithExternalLibsDexMergerForDebug
:transformDexArchiveWithDexMergerForDebug
:mergeDebugJniLibFolders
:CordovaLib:compileDebugNdk NO-SOURCE
:CordovaLib:mergeDebugJniLibFolders
:CordovaLib:transformNativeLibsWithMergeJniLibsForDebug
:CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug
:transformNativeLibsWithMergeJniLibsForDebug
:processDebugJavaRes NO-SOURCE
:transformResourcesWithMergeJavaResForDebug
:validateSigningDebug
:packageDebug
:assembleDebug
:cdvBuildDebug

BUILD SUCCESSFUL in 2m 2s
44 actionable tasks: 44 executed
Built the following apk(s): 
	/home/deepali/e-mission-ui-worktesting/platforms/android/build/outputs/apk/debug/android-debug.apk
ANDROID_HOME=/home/deepali/Android/Sdk
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
Skipping build...
Built the following apk(s): 
	/home/deepali/e-mission-ui-worktesting/platforms/android/build/outputs/apk/debug/android-debug.apk
Using apk: /home/deepali/e-mission-ui-worktesting/platforms/android/build/outputs/apk/debug/android-debug.apk
Package name: in.ac.iisc.cistup.emission
INSTALL SUCCESS
LAUNCH SUCCESS











@deepalics0044
Copy link
Author

What I get in server terminal while processing data

START 2019-03-05 15:15:58.187111 POST /pipeline/get_complete_ts
END 2019-03-05 15:15:58.187853 POST /pipeline/get_complete_ts  0.0006492137908935547 
Traceback (most recent call last):
  File "/home/deepali/e-mission-server/emission/net/api/bottle.py", line 997, in _handle
    out = route.call(**args)
  File "/home/deepali/e-mission-server/emission/net/api/bottle.py", line 1998, in wrapper
    rv = callback(*a, **ka)
  File "emission/net/api/cfc_webapp.py", line 196, in getPipelineState
    user_uuid = getUUID(request)
  File "emission/net/api/cfc_webapp.py", line 433, in getUUID
    retUUID = enaa.getUUID(request, auth_method, inHeader)
  File "/home/deepali/e-mission-server/emission/net/auth/auth.py", line 62, in getUUID
    userToken = __getToken__(request, inHeader)
  File "/home/deepali/e-mission-server/emission/net/auth/auth.py", line 56, in __getToken__
    userToken = request.json['user']
KeyError: 'user'



@deepalics0044
Copy link
Author

  • create or copy over relevant HTML + javascript into www
    Note:- that i did'nt clone the repo instead worked on the copy of the local folder
  • create an icon under resources/icon.png
    Done
  • copy over the hooks (./hooks) and any notification icons needed (resources/android/*)
    Done
  • If you want to use google auth, create google auth credentials correctly for the new package name and include them into www/json/connectionConfig.json
    Note:- that i did'nt clone the repo instead worked on the copy of the local folder

@shankari
Copy link
Contributor

shankari commented Mar 5, 2019

If you want to use google auth, create google auth credentials correctly for the new package name and include them into www/json/connectionConfig.json
Note:- that i did'nt clone the repo instead worked on the copy of the local folder

Not sure what you mean by this. Any local folder you have is a clone of the repo, isn't it?

@deepalics0044
Copy link
Author

deepalics0044 commented Mar 5, 2019 via email

@shankari
Copy link
Contributor

shankari commented Mar 5, 2019

So what does that statement mean "I didn't clone the repo instead worked on the copy of the local folder"

@deepalics0044
Copy link
Author

deepalics0044 commented Mar 5, 2019 via email

@shankari
Copy link
Contributor

shankari commented Mar 5, 2019

so that I don't have to make changes in configuration files.

That is almost certainly the problem. Note the last instruction

If you want to use google auth, create google auth credentials correctly for the new package name and include them into www/json/connectionConfig.json

You can't just use the old configuration if you are making a new app with a new package name

@deepalics0044
Copy link
Author

deepalics0044 commented Mar 5, 2019 via email

@shankari
Copy link
Contributor

shankari commented Mar 5, 2019

The KeyError just means that there is no user key in the JSON sent from the phone.
https://duckduckgo.com/?q=python+keyerror&t=ffsb&ia=web

This means that the user authentication is not working on the phone. You need to ensure that you followed all the phone instructions. Maybe check the phone logs for more clues?

What are the steps that you took to replace the connectionConfig.json?
For example, did you rebuild the phone app after making the change? all changes to www require a cordova rebuild.

In general, just telling me that something "doesn't work" does not help because I don't know what steps you did or did not do. If you made changes, please list out the exact steps that you did.

Other groups (@jf87, @PatGendre) have successfully built their own apk recently, so there is nothing fundamentally broken in the build process.

@shankari
Copy link
Contributor

shankari commented Mar 6, 2019

@deepalics0044 any updates on this?

@deepalics0044
Copy link
Author

I got the sha1 and package name from android build project and created a new client ID then replaced the old with new in connectionConfig.json and rebuild the cordova . But again the same error

@shankari
Copy link
Contributor

shankari commented Mar 6, 2019

Look at the phone logs and see what error you get during token generation.
If you are debugging from Android Studio, you can also put breakpoints in getServerToken to see what is going on.
https://github.com/e-mission/cordova-jwt-auth/blob/master/src/android/GoogleAccountManagerAuth.java#L111

Finally, your steps are still not clear - which clientID did you use? There are different kinds of client IDs that can be created. Details matter a lot for google auth which is super picky.

@deepalics0044
Copy link
Author

Finally, your steps are still not clear - which clientID did you use? There are different kinds of client IDs that can be created.

The one for Android app.

@shankari
Copy link
Contributor

shankari commented Mar 6, 2019

Aha! Check the documentation for google auth :)
https://github.com/e-mission/e-mission-docs/search?q=google+auth&unscoped_q=google+auth

For android, do we use webapp or android as application type?

shankari added a commit that referenced this issue Mar 7, 2019
shankari added a commit that referenced this issue Mar 7, 2019
* Clarify documentation around google auth

This clarifies #324

* Add the screenshot to the correct folder

* Fixed link to image file
@shankari
Copy link
Contributor

shankari commented Mar 7, 2019

On re-reading the authentication documentation, I realized that the google auth section could use clarification. So I have now added a screenshot that hopefully makes it clearer.
#331

@deepalics0044
Copy link
Author

Not wanted to upload pictures but since we are running short of time. There is a domain name verification for getting a client ID for webserver. I don't know where exactly I need to put the html verification file. I tried putting it www folder where the home.html file is but that does'nt work. Do I need to opt other method.
img_20190307_123437
img_20190307_123548

@shankari
Copy link
Contributor

shankari commented Mar 7, 2019

Not wanted to upload pictures

Totally fine to upload pictures here. not much else you can do with GUI. the markdown was really for CLI

So I don't ever get questions on verification, so let me upload the screenshots of how to enable this.

@shankari
Copy link
Contributor

shankari commented Mar 7, 2019

Uploaded screenshots as part of #335
@deepalics0044 I think you are almost there

@deepalics0044
Copy link
Author

Even after fixing the client ID I get the same error
screenshot from 2019-03-08 11-57-05

@deepalics0044
Copy link
Author

nevertheless I am going to repeat the whole process again.

@shankari
Copy link
Contributor

shankari commented Mar 8, 2019

Since you are testing this with the emulator anyway, did you try running in the debugger and putting breakpoints as suggested in #324 (comment)

@shankari
Copy link
Contributor

shankari commented Mar 8, 2019

nevertheless I am going to repeat the whole process again.

Shouldn't need to repeat the whole process, rebuilding cordova should be good enough.

@shankari
Copy link
Contributor

shankari commented Mar 8, 2019

@deepalics0044 any updates on running in the debugger with breakpoints?

@deepalics0044
Copy link
Author

deepalics0044 commented Mar 8, 2019 via email

@shankari
Copy link
Contributor

shankari commented Mar 8, 2019

@deepalics0044 can you please do so and update the results here before our meeting?

@deepalics0044
Copy link
Author

deepalics0044 commented Mar 8, 2019

W/art: Attempt to remove non-JNI local reference, dumping thread
D/CordovaActivity: Paused the activity.
W/art: Attempt to remove non-JNI local reference, dumping thread
D/CordovaActivity: Incoming Result. Request code = 1000
D/CordovaInterfaceImpl: Sending activity result to plugin
D/JWTAuthPlugin: requestCode = 1000 resultCode = -1
I/System.out: Setting userEmail from [email protected] -> [email protected]
D/CordovaActivity: Resumed the activity.
D/ConnectionSettings: in getConnectURL, connectionSettings = {"connectUrl":"http:\/\/emission.cistup.iisc.ac.in:8080","isSkipAuth":false,"android":{"auth":{"method":"google-authutil","clientID":"-"}},"ios":{"auth":{"method":"google-signin-lib","clientID":"-"}}}
D/ConnectionSettings: in getConnectURL, returning http://emission.cistup.iisc.ac.in:8080
I/System.out: Posting data to http://emission.cistup.iisc.ac.in:8080/profile/create
W/System.err: com.google.android.gms.auth.GoogleAuthException: INVALID_AUDIENCE
                  at com.google.android.gms.auth.zze$1.zzat(Unknown Source)
                  at com.google.android.gms.auth.zze$1.zzau(Unknown Source)
                  at com.google.android.gms.auth.zze.zza(Unknown Source)
                  at com.google.android.gms.auth.zze.zzc(Unknown Source)
                  at com.google.android.gms.auth.zze.getToken(Unknown Source)
                  at com.google.android.gms.auth.zze.getToken(Unknown Source)
                  at com.google.android.gms.auth.zze.getToken(Unknown Source)
                  at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source)
                  at edu.berkeley.eecs.emission.cordova.jwtauth.GoogleAccountManagerAuth.getServerToken(GoogleAccountManagerAuth.java:119)
                  at edu.berkeley.eecs.emission.cordova.comm.CommunicationHelper.getTokenSync(CommunicationHelper.java:185)
W/System.err:     at edu.berkeley.eecs.emission.cordova.comm.CommunicationHelper.pushGetJSON(CommunicationHelper.java:89)
                  at edu.berkeley.eecs.emission.cordova.comm.CommunicationHelperPlugin$1.run(CommunicationHelperPlugin.java:27)
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
                  at java.lang.Thread.run(Thread.java:761)
I/RequestAddCookies: Cookie store not available in HTTP context
D/EGL_emulation: eglMakeCurrent: 0x9a993e20: ver 2 0 (tinfo 0x9a990aa0)
I/ResponseProcessCookies: Cookie store not available in HTTP context
I/CommunicationHelper: Got response org.apache.http.message.BasicHttpResponse@eee299d with status HTTP/1.1 500 Internal Server Error
E/class in.ac.iisc.cistup.emission.R: Failed to get JSON object
D
```

@shankari
Copy link
Contributor

shankari commented Mar 8, 2019

Right, so clearly the error is com.google.android.gms.auth.GoogleAuthException: INVALID_AUDIENCE

and if you search for that error you find playgameservices/play-games-plugin-for-unity#1328 (comment)

@shankari
Copy link
Contributor

shankari commented Mar 8, 2019

and also https://tinyapps.blogspot.com/2016/07/googleauthexception-invalidaudience.html

It is definitely a configuration issue on your end.

@deepalics0044
Copy link
Author

deepalics0044 commented Mar 8, 2019 via email

@shankari
Copy link
Contributor

shankari commented Mar 8, 2019

just join the call and let's see if I can help you figure it out. you also have to finish iOS and you don't have much time.

@deepalics0044
Copy link
Author

deepalics0044 commented Mar 8, 2019 via email

@deepalics0044
Copy link
Author

Error on server terminal

START 2019-03-09 23:00:46.708217 POST /profile/update
Traceback (most recent call last):
  File "emission/net/api/cfc_webapp.py", line 433, in getUUID
    retUUID = enaa.getUUID(request, auth_method, inHeader)
  File "/home/deepali/e-mission-server/emission/net/auth/auth.py", line 63, in getUUID
    retUUID = getUUIDFromToken(authMethod, userToken)
  File "/home/deepali/e-mission-server/emission/net/auth/auth.py", line 37, in getUUIDFromToken
    userEmail = AuthMethodFactory.getAuthMethod(authMethod).verifyUserToken(token)
  File "/home/deepali/e-mission-server/emission/net/auth/auth.py", line 26, in getAuthMethod
    return enag.GoogleAuthMethod()
  File "/home/deepali/e-mission-server/emission/net/auth/google_auth.py", line 21, in __init__
    key_data = json.load(key_file)
  File "/home/deepali/anaconda3/envs/emission/lib/python3.6/json/__init__.py", line 299, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/home/deepali/anaconda3/envs/emission/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/home/deepali/anaconda3/envs/emission/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/deepali/anaconda3/envs/emission/lib/python3.6/json/decoder.py", line 355, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 5 column 95 (char 465)
END 2019-03-09 23:00:46.709748 POST /profile/update  0.001432657241821289 
Traceback (most recent call last):
  File "emission/net/api/cfc_webapp.py", line 433, in getUUID
    retUUID = enaa.getUUID(request, auth_method, inHeader)
  File "/home/deepali/e-mission-server/emission/net/auth/auth.py", line 63, in getUUID
    retUUID = getUUIDFromToken(authMethod, userToken)
  File "/home/deepali/e-mission-server/emission/net/auth/auth.py", line 37, in getUUIDFromToken
    userEmail = AuthMethodFactory.getAuthMethod(authMethod).verifyUserToken(token)
  File "/home/deepali/e-mission-server/emission/net/auth/auth.py", line 26, in getAuthMethod
    return enag.GoogleAuthMethod()
  File "/home/deepali/e-mission-server/emission/net/auth/google_auth.py", line 21, in __init__
    key_data = json.load(key_file)
  File "/home/deepali/anaconda3/envs/emission/lib/python3.6/json/__init__.py", line 299, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/home/deepali/anaconda3/envs/emission/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/home/deepali/anaconda3/envs/emission/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/deepali/anaconda3/envs/emission/lib/python3.6/json/decoder.py", line 355, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 5 column 95 (char 465)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/deepali/e-mission-server/emission/net/api/bottle.py", line 997, in _handle
    out = route.call(**args)
  File "/home/deepali/e-mission-server/emission/net/api/bottle.py", line 1998, in wrapper
    rv = callback(*a, **ka)
  File "emission/net/api/cfc_webapp.py", line 272, in updateUserProfile
    user_uuid = getUUID(request)
  File "emission/net/api/cfc_webapp.py", line 440, in getUUID
    abort(401, e.message)
AttributeError: 'JSONDecodeError' object has no attribute 'message'

@shankari
Copy link
Contributor

shankari commented Mar 9, 2019

The error is here

  File "/home/deepali/e-mission-server/emission/net/auth/google_auth.py", line 21, in __init__
    key_data = json.load(key_file)
json.decoder.JSONDecodeError: Invalid control character at: line 5 column 95 (char 465)

We are trying to load the key file and we are getting a decode error. The key file is not valid json. Please check the format.

As documented https://github.com/e-mission/e-mission-docs/blob/master/docs/e-mission-both/configuring_authentication.md#google_authgoogle-authutil
, the key file is at conf/net/auth/google_auth.json

@deepalics0044
Copy link
Author

START 2019-03-09 23:11:06.279212 POST /profile/update
Traceback (most recent call last):
  File "emission/net/api/cfc_webapp.py", line 433, in getUUID
    retUUID = enaa.getUUID(request, auth_method, inHeader)
  File "/home/deepali/e-mission-server/emission/net/auth/auth.py", line 63, in getUUID
    retUUID = getUUIDFromToken(authMethod, userToken)
  File "/home/deepali/e-mission-server/emission/net/auth/auth.py", line 37, in getUUIDFromToken
    userEmail = AuthMethodFactory.getAuthMethod(authMethod).verifyUserToken(token)
  File "/home/deepali/e-mission-server/emission/net/auth/auth.py", line 26, in getAuthMethod
    return enag.GoogleAuthMethod()
  File "/home/deepali/e-mission-server/emission/net/auth/google_auth.py", line 21, in __init__
    key_data = json.load(key_file)
  File "/home/deepali/anaconda3/envs/emission/lib/python3.6/json/__init__.py", line 299, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/home/deepali/anaconda3/envs/emission/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/home/deepali/anaconda3/envs/emission/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/deepali/anaconda3/envs/emission/lib/python3.6/json/decoder.py", line 355, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 7 column 1 (char 569)
END 2019-03-09 23:11:06.280627 POST /profile/update  0.0013027191162109375 
Traceback (most recent call last):
  File "emission/net/api/cfc_webapp.py", line 433, in getUUID
    retUUID = enaa.getUUID(request, auth_method, inHeader)
  File "/home/deepali/e-mission-server/emission/net/auth/auth.py", line 63, in getUUID
    retUUID = getUUIDFromToken(authMethod, userToken)
  File "/home/deepali/e-mission-server/emission/net/auth/auth.py", line 37, in getUUIDFromToken
    userEmail = AuthMethodFactory.getAuthMethod(authMethod).verifyUserToken(token)
  File "/home/deepali/e-mission-server/emission/net/auth/auth.py", line 26, in getAuthMethod
    return enag.GoogleAuthMethod()
  File "/home/deepali/e-mission-server/emission/net/auth/google_auth.py", line 21, in __init__
    key_data = json.load(key_file)
  File "/home/deepali/anaconda3/envs/emission/lib/python3.6/json/__init__.py", line 299, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/home/deepali/anaconda3/envs/emission/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/home/deepali/anaconda3/envs/emission/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/home/deepali/anaconda3/envs/emission/lib/python3.6/json/decoder.py", line 355, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 7 column 1 (char 569)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/deepali/e-mission-server/emission/net/api/bottle.py", line 997, in _handle
    out = route.call(**args)
  File "/home/deepali/e-mission-server/emission/net/api/bottle.py", line 1998, in wrapper
    rv = callback(*a, **ka)
  File "emission/net/api/cfc_webapp.py", line 272, in updateUserProfile
    user_uuid = getUUID(request)
  File "emission/net/api/cfc_webapp.py", line 440, in getUUID
    abort(401, e.message)
AttributeError: 'JSONDecodeError' object has no attribute 'message'


@shankari
Copy link
Contributor

shankari commented Mar 9, 2019

For the record, the issue was that @deepalics0044 had only the ios key and the webserver key in the project, not an android key.

For anybody else who finds this issue and is trying to debug their own environment, the Configuration section on google authentication
https://github.com/e-mission/e-mission-docs/blob/master/docs/e-mission-both/configuring_authentication.md#configuration-1
clearly says:

the android key is not used directly, but is required to be in the project to allow the android authentication to proceed

and that is also indicated in the associated screenshot.
Google Auth Screenshot

Those instructions are real. Please make sure that you have all three of the keys.

@shankari
Copy link
Contributor

shankari commented Mar 9, 2019

@deepalics0044 if this has resolved the issue, please close it

shankari added a commit that referenced this issue Mar 15, 2019
* Clarify documentation around google auth

This clarifies #324

* Add the screenshot to the correct folder

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

No branches or pull requests

2 participants