Git Product home page Git Product logo

android-white-label-app's Issues

App crashes in "Where to Vote"

I have a Motorola Droid Razr M, Android version 4.4.2.

The app is updated with the latest commits and is able to surface ballot information for several different addresses. However, when I scroll to "Where to Vote," the app crashes.

Here are the logs:

08-27 10:57:15.361  15188-15188/com.votinginfoproject.VotingInformationProject I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:381>: EGL 1.4 QUALCOMM build:  (CL3869936)
    OpenGL ES Shader Compiler Version: 17.01.11.SPL
    Build Date: 02/28/14 Fri
    Local Branch:
    Remote Branch:
    Local Patches:
    Reconstruct Branch:
08-27 10:57:20.112  15188-15188/com.votinginfoproject.VotingInformationProject D/HomeFragment﹕ Address has not changed.
08-27 10:57:20.326  15188-15188/com.votinginfoproject.VotingInformationProject D/HomeFragment﹕ Got voter info result from shared preferences.
08-27 10:57:20.327  15188-15188/com.votinginfoproject.VotingInformationProject D/Election﹕ Current date is Wed Aug 27 00:00:00 EDT 2014
08-27 10:57:20.327  15188-15188/com.votinginfoproject.VotingInformationProject D/Election﹕ Election date is Sat Jun 06 00:00:00 EDT 2015
08-27 10:57:20.327  15188-15188/com.votinginfoproject.VotingInformationProject D/HomeFragment﹕ Election in shared preferences is still valid; using it.
08-27 10:57:20.327  15188-15188/com.votinginfoproject.VotingInformationProject D/VoterInfo﹕ Filtering contest list for party:
08-27 10:57:24.175  15188-15188/com.votinginfoproject.VotingInformationProject D/VIPTabBarActivity﹕ Google Play services are available!
08-27 10:57:24.215  15188-15188/com.votinginfoproject.VotingInformationProject D/BallotFragment﹕ Got election: VIP Test Election
08-27 10:57:24.344  15188-15188/com.votinginfoproject.VotingInformationProject D/VIPTabBarActivity﹕ Location services connected.
08-27 10:57:24.344  15188-15188/com.votinginfoproject.VotingInformationProject E/VIPTabBarActivity﹕ No longer using current location for directions!  Ignoring.
08-27 10:57:25.784  15188-16126/com.votinginfoproject.VotingInformationProject D/GeocodeQuery﹕ No result found for address Washington Building First Floor 1100 Bank Street Richmond, VA 23219
08-27 10:57:25.784  15188-15188/com.votinginfoproject.VotingInformationProject E/VIPTabBarActivity﹕ Failed to geocode administrative body physical address!
08-27 10:57:29.516  15188-15188/com.votinginfoproject.VotingInformationProject D/AndroidRuntime﹕ Shutting down VM
08-27 10:57:29.516  15188-15188/com.votinginfoproject.VotingInformationProject W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41ca1d40)

Here's the stacked trace:

08-27 10:57:29.524  15188-15188/com.votinginfoproject.VotingInformationProject E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.votinginfoproject.VotingInformationProject, PID: 15188
    java.lang.NullPointerException
            at com.votinginfoproject.VotingInformationProject.activities.VIPTabBarActivity$TabsAdapter.onTabUnselected(VIPTabBarActivity.java:810)
            at com.android.internal.app.ActionBarImpl.selectTab(ActionBarImpl.java:573)
            at com.android.internal.app.ActionBarImpl$TabImpl.select(ActionBarImpl.java:1105)
            at com.android.internal.widget.ScrollingTabContainerView$TabClickListener.onClick(ScrollingTabContainerView.java:547)
            at android.view.View.performClick(View.java:4466)
            at android.view.View$PerformClick.run(View.java:18537)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5102)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
            at dalvik.system.NativeStart.main(Native Method)

Not quite builable with instructions

This is an amazing job. It is usually much harder to build these kinds of apps, but most of it worked. And it even launched. Great job!

That being said, there were a few issues:

Error:Execution failed for task ':app:mergeDebugResources'.

Unsupported type 'screenName' in file /home/ray/Projects/Voting/android-white-label-app/app/src/main/res/values/app_tracker.xml

I went in to the app_tracker.xml and commented there out. Then the next thing gave an error and then the next and so on.

I ended up just commenting out the bit that registers the tracking and then the two calls that invoke that. And then it worked fine.

Any suggestions? If there is other info I can supply, please let me know.

I am on Ubuntu 14.04LTS. I am running Android 1.3.2 and have Lollipop SDKs installed.

By the way, the SDK Manager does not look as you describe it. For one thing, I do not see "Extras" anywhere.

App crashes when Get Directions selected from Map View

The app crashes when selecting Get Directions from the Map View of the app.

Here are the logs:

08-27 17:12:36.956  29477-29477/com.votinginfoproject.VotingInformationProject D/dalvikvm﹕ VFY: replacing opcode 0x62 at 0x0016
08-27 17:12:37.097  29477-29737/com.votinginfoproject.VotingInformationProject D/dalvikvm﹕ GC_FOR_ALLOC freed 4285K, 31% free 10084K/14496K, paused 49ms, total 53ms
08-27 17:12:37.182  29477-29737/com.votinginfoproject.VotingInformationProject D/dalvikvm﹕ GC_FOR_ALLOC freed 702K, 32% free 9948K/14496K, paused 22ms, total 24ms
08-27 17:12:37.182  29477-29737/com.votinginfoproject.VotingInformationProject I/dalvikvm-heap﹕ Grow heap (frag case) to 11.938MB for 196624-byte allocation
08-27 17:12:40.017  29477-29477/com.votinginfoproject.VotingInformationProject D/dalvikvm﹕ GC_FOR_ALLOC freed 1632K, 31% free 10195K/14692K, paused 47ms, total 47ms
08-27 17:12:40.021  29477-29477/com.votinginfoproject.VotingInformationProject I/dalvikvm-heap﹕ Grow heap (frag case) to 12.492MB for 524304-byte allocation
08-27 17:12:41.912  29477-29477/com.votinginfoproject.VotingInformationProject D/LocationsFragment﹕ Clicked marker for 101 East Franklin Street Richmond, VA 232192107
08-27 17:12:41.912  29477-29477/com.votinginfoproject.VotingInformationProject D/VIPTabBarActivity﹕ Going to show directions to 101 East Franklin Street Richmond, VA 232192107...
08-27 17:12:43.724  29477-29477/com.votinginfoproject.VotingInformationProject D/VIPTabBarActivity﹕ Final selection: 0
08-27 17:12:43.816  29477-29477/com.votinginfoproject.VotingInformationProject D/DirectionsFragment﹕ Got location 101 East Franklin Street Richmond, VA 232192107
08-27 17:12:43.816  29477-29477/com.votinginfoproject.VotingInformationProject D/DirectionsFragment﹕ Showing directions from entered address
08-27 17:12:43.817  29477-29477/com.votinginfoproject.VotingInformationProject D/DirectionsFragment:onCreateView﹕ Hiding location list container's view
08-27 17:12:43.858  29477-29477/com.votinginfoproject.VotingInformationProject D/AndroidRuntime﹕ Shutting down VM

Here is the stack trace:

08-27 17:12:43.861  29477-29477/com.votinginfoproject.VotingInformationProject E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.votinginfoproject.VotingInformationProject, PID: 29477
    java.lang.NullPointerException
            at com.votinginfoproject.VotingInformationProject.fragments.DirectionsFragment.onCreateView(DirectionsFragment.java:126)
            at android.support.v4.app.Fragment.performCreateView(Fragment.java:1500)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:938)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1115)
            at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
            at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1478)
            at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:446)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5102)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
            at dalvik.system.NativeStart.main(Native Method)

Setting the app in test mode causes app to crash

I've changed line 81 of HomeFragment from isTest = false to isTest = true. I also added out white-listed API key and set official only to false -- the app is still crashing. Below are the logs and just before the crash.

08-21 10:37:10.488  25307-25307/com.votinginfoproject.VotingInformationProject D/HomeFragment﹕ queryWithNewAddress
08-21 10:37:10.488  25307-25307/com.votinginfoproject.VotingInformationProject D/HomeFragment﹕ Storing a new address into shared preferences.
08-21 10:37:10.489  25307-25307/com.votinginfoproject.VotingInformationProject D/VIPApp﹕ VoterInfo object is null
08-21 10:37:10.489  25307-25307/com.votinginfoproject.VotingInformationProject D/VIPApp﹕ Cannot set party on VoterInfo because voterInfo is null
08-21 10:37:10.497  25307-25307/com.votinginfoproject.VotingInformationProject D/HomeActivity﹕ searchedAddress: https://www.googleapis.com/civicinfo/v2/voterinfo?officialOnly=false&electionId=2000&address=1801%20mccollum%20st%20los%20angeles%20ca%2090026&key=AIzaSyASBaFsdOQaMrefu1PooHNVgr8Xum5G_zo
08-21 10:37:10.522  25307-25569/com.votinginfoproject.VotingInformationProject D/CivicInfoApiQuery﹕ Url: https://www.googleapis.com/civicinfo/v2/voterinfo?officialOnly=false&electionId=2000&address=1801%20mccollum%20st%20los%20angeles%20ca%2090026&key=AIzaSyASBaFsdOQaMrefu1PooHNVgr8Xum5G_zo
08-21 10:37:13.022  25307-25307/com.votinginfoproject.VotingInformationProject D/AndroidRuntime﹕ Shutting down VM

and here are the error logs

08-21 10:37:13.030  25307-25307/com.votinginfoproject.VotingInformationProject E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.votinginfoproject.VotingInformationProject, PID: 25307
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.votinginfoproject.VotingInformationProject/com.votinginfoproject.VotingInformationProject.activities.VIPTabBarActivity}: java.lang.NullPointerException
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2269)
            at android.app.ActivityThread.access$800(ActivityThread.java:139)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5102)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
            at dalvik.system.NativeStart.main(Native Method)
     Caused by: java.lang.NullPointerException
            at com.votinginfoproject.VotingInformationProject.activities.VIPTabBarActivity.setAllLocations(VIPTabBarActivity.java:388)
            at com.votinginfoproject.VotingInformationProject.activities.VIPTabBarActivity.setUpGeocodings(VIPTabBarActivity.java:313)
            at com.votinginfoproject.VotingInformationProject.activities.VIPTabBarActivity.onCreate(VIPTabBarActivity.java:300)
            at android.app.Activity.performCreate(Activity.java:5248)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2173)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2269)
            at android.app.ActivityThread.access$800(ActivityThread.java:139)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5102)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
            at dalvik.system.NativeStart.main(Native Method)

No directions found

The Where to Vote tab is working, but I can't get directions in the app. However, they do display when I selection to Open in Google Maps.

Here are the logs:

08-27 17:06:20.034  27702-27702/com.votinginfoproject.VotingInformationProject D/ElectionDetailsFragment﹕ In onActivityCreated
08-27 17:06:20.036  27702-27702/com.votinginfoproject.VotingInformationProject D/ElectionDetailsFragment﹕ Got local election admin body OFFICE OF THE GENERAL REGISTRAR
08-27 17:06:21.955  27702-27702/com.votinginfoproject.VotingInformationProject D/LocationsFragment﹕ Clicked list item 3212:82390
08-27 17:06:21.955  27702-27702/com.votinginfoproject.VotingInformationProject D/VIPTabBarActivity﹕ Going to show directions to 3212:82390...
08-27 17:06:25.127  27702-27702/com.votinginfoproject.VotingInformationProject D/VIPTabBarActivity﹕ Final selection: 0
08-27 17:06:25.146  27702-27702/com.votinginfoproject.VotingInformationProject D/DirectionsFragment﹕ Got location 3212:82390
08-27 17:06:25.146  27702-27702/com.votinginfoproject.VotingInformationProject D/DirectionsFragment﹕ Showing directions from entered address
08-27 17:06:25.146  27702-27702/com.votinginfoproject.VotingInformationProject D/DirectionsFragment:onCreateView﹕ Hiding location list container's view
08-27 17:06:25.171  27702-27702/com.votinginfoproject.VotingInformationProject D/DirectionsFragment﹕ Got origin location; setting up directions list
08-27 17:06:25.174  27702-28296/com.votinginfoproject.VotingInformationProject D/DirectionsQuery﹕ https://maps.googleapis.com/maps/api/directions/json?origin=37.5419089,-77.442931&destination=37.5427544,-77.4424763&mode=walking&key=AIzaSyASBaFsdOQaMrefu1PooHNVgr8Xum5G_zo
08-27 17:06:25.678  27702-28296/com.votinginfoproject.VotingInformationProject D/DirectionsQuery﹕ GOT RESPONSE STATUS: 200

Here is the stack trace:

08-27 17:06:25.710  27702-27702/com.votinginfoproject.VotingInformationProject E/DirectionsQuery﹕ Directions query response status is: REQUEST_DENIED

Include error reporting

We'll update the code after the November election to avoid potential bugs or update issues.

Info from VIP:
Third-parties can use https://voter-info-tool.appspot.com/feedback as an endpoint to submit errors. The POST request must include two keys to kick off the feedback flow:

· electionId
· address

For example, if the error was against the test dataset (2000) and the registered address was "25 Massachusetts Ave NW, Washington, DC," the POST request would contain:

electionId=2000&address=25+massachusetts+ave+nw+washington+dc

Remove Contest Details section

The Contest Detail section doesn't include any relevant information that isn't displayed elsewhere on the page, so I think it makes sense to remove it.

Also, Ballot Placement is not something a user needs to know and shouldn't surface in the app at all. It may cause confusion.

Thanks!

screenshot_2014-09-09-11-14-15 2

App crashes when an entered address is not in test election

This is probably related to what I saw in issue #44. When I enter an address that does not surface information from the test election, the app crashes.

Here are the logs:

08-22 11:26:22.807  22566-22566/com.votinginfoproject.VotingInformationProject D/HomeFragment﹕ queryWithNewAddress
08-22 11:26:22.807  22566-22566/com.votinginfoproject.VotingInformationProject D/HomeFragment﹕ Storing a new address into shared preferences.
08-22 11:26:22.808  22566-22566/com.votinginfoproject.VotingInformationProject D/VIPApp﹕ VoterInfo object is null
08-22 11:26:22.808  22566-22566/com.votinginfoproject.VotingInformationProject D/VIPApp﹕ Cannot set party on VoterInfo because voterInfo is null
08-22 11:26:22.813  22566-22566/com.votinginfoproject.VotingInformationProject D/HomeActivity﹕ searchedAddress: https://www.googleapis.com/civicinfo/v2/voterinfo?officialOnly=true&electionId=2000&address=10727%20Lawler%20Street%2C%20Apt%206%20Los%20Angeles%2C%2090034&key=AIzaSyASBaFsdOQaMrefu1PooHNVgr8Xum5G_zo
08-22 11:26:22.823  22566-23525/com.votinginfoproject.VotingInformationProject D/CivicInfoApiQuery﹕ Url: https://www.googleapis.com/civicinfo/v2/voterinfo?officialOnly=true&electionId=2000&address=10727%20Lawler%20Street%2C%20Apt%206%20Los%20Angeles%2C%2090034&key=AIzaSyASBaFsdOQaMrefu1PooHNVgr8Xum5G_zo
08-22 11:26:23.572  22566-23525/com.votinginfoproject.VotingInformationProject D/CivicInfoApiQuery﹕ GOT RESPONSE STATUS: 200
08-22 11:26:23.642  22566-22566/com.votinginfoproject.VotingInformationProject D/VoterInfo﹕ Filtering contest list for party:
08-22 11:26:23.642  22566-22566/com.votinginfoproject.VotingInformationProject D/AndroidRuntime﹕ Shutting down VM

And here's the stacked trace:

22 11:26:23.645  22566-22566/com.votinginfoproject.VotingInformationProject E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.votinginfoproject.VotingInformationProject, PID: 22566
    java.lang.NullPointerException
            at com.votinginfoproject.VotingInformationProject.models.VoterInfo.setSelectedParty(VoterInfo.java:55)
            at com.votinginfoproject.VotingInformationProject.models.VIPApp.setVoterInfo(VIPApp.java:38)
            at com.votinginfoproject.VotingInformationProject.activities.HomeActivity.searchedAddress(HomeActivity.java:107)
            at com.votinginfoproject.VotingInformationProject.fragments.HomeFragment.presentVoterInfoResult(HomeFragment.java:332)
            at com.votinginfoproject.VotingInformationProject.fragments.HomeFragment.access$100(HomeFragment.java:40)
            at com.votinginfoproject.VotingInformationProject.fragments.HomeFragment$6.callback(HomeFragment.java:352)
            at com.votinginfoproject.VotingInformationProject.asynctasks.CivicInfoApiQuery.onPostExecute(CivicInfoApiQuery.java:150)
            at android.os.AsyncTask.finish(AsyncTask.java:632)
            at android.os.AsyncTask.access$600(AsyncTask.java:177)
            at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5102)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
            at dalvik.system.NativeStart.main(Native Method)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.