If it works for ODK 1.x, then if it is properly configured for what you are
trying to do with 2.0, it should also work.
The username/password settings in Survey are purely for the legacy pathway
and the user e-mail setting within Survey is currently not piped through to
Sync, so neither of these affect the 2.0 pipeline.
"Rest App Server" requires* Administer Tables* privileges.
"Sync Now" requires Synchronize Tables privileges
With respect to server configuration:
If you grant the Anonymous User the above privileges, when you connect to
the server, the server never actually challenges the client for their
identity, and they are simply granted access to the server (in this case,
the user you select on the Android device is irrelevant).
Only if the Anonymous User does not have the needed access does the server
authenticate the Android device using the user account you configured for
it.
Remember to "Save Changes" on the Permissions tab to get the changes to be
applied (and to take effect).
--------------why you always get the re-authorization error--------------
I hate the client library we are using to make the synchronization calls to
the server. It is very difficult to get error information out of it; and it
is Android-specific. We want to use a more generic library (Apache Wink
seems likely) so we can share the synchronization logic across platforms.
But we couldn't just drop Wink in (we tried). In an effort to get
everything assembled for the release, I decided to report every error as a
"Re-Authorization Required" error.
So that is why everything is a failing at 'Authorization'. It is the only
failure that is ever reported. This will be fixed as we switch to a better
client library with better error-reporting mechanisms.
------------what is likely going on------------
From your description, it sounds like you are trying to Sync from ODK
Survey?
This requires an ODK Aggregate settings change.
(1) Go to Site Admin / Preferences
(2) Click on "Change ODK 2.0 App Name"
(3) enter
survey
(4) Click on "Change ODK 2.0 App Name" button to complete the change.
This changes ODK Aggregate to work with the "survey" application --
allowing sync of all data under /sdcard/opendatakit/survey
By default, ODK Aggregate is configured to work with the "tables"
application.
Note that if you launch ODK Sync directly, it launches as the "tables"
application. It is only when you launch ODK Sync from the cloud icon within
ODK Survey that it launches as the "survey" application and syncs the data
in the /sdcard/opendatakit/survey directory.
Longer term, we will probably change the UI when directly launching ODK
Sync to require the user to explicitly choose an ODK 2.0 App Name (
sub-directory under /sdcard/opendatakit ) to launch into.
The aim here is to enable multiple independent 'applications' built upon
our tools to co-exist on a single Android device without interference.
So you could have
/sdcard/opendatakit/rebuildingSupplies
/sdcard/opendatakit/
sanitation
/sdcard/opendatakit/
medicalSupplies
as 3 different applications, that a data collector could launch into and
switch between as needed. Each application submits data into a different
ODK Aggregate server and that data is processed by a different support
staff.
Eventually there would be an APK that you create for your particular
application, and it then launches into Survey or Tables or Sync as needed.
By setting everything as anonymous
···
On Thu, Sep 11, 2014 at 11:34 AM, wrote:
Hi all,
I have a Aggregate 1.4.4 instance, running on a laptop (Tomcat 6, Windows
7 install) in a LAN network.
I have been able to:
- Use ODK 1.X mechanism with Survey
- Use the Legacy XML mechanism to upload forms (with the -media process)
to the server and download them on a phone via Survey again
- Send finalize forms from Survey to my Aggregate Instance.
Where I can't get things to work is when I try anything that has to do
with Sync / Reset App Server, so basically the 2.0 mechanism (unless Legacy
XML uses it as well).
Here's what I have done so far Server-side:
- Allows ODK Tables Synchronization
- Gave all access rights (possible) for Anonymous users (its a test LAN so
don't care)
- Gave all all rights to a Google Account
- Gave all all rights to a ODK Account
If I start Survey as a standalone (NOT in the context of Tables using the
"Changing App Name"), and try to either Sync/Reset App serer, I get:
Error
Account Re-Authorization required
Before getting this message thought, I do see in the notices:
Starting
Retrieving list of Tables from server
It stays in this state for a while. Perhaps it times out.
Some questions:
If I use Sync, does it matter what I write under Survey's settings
regarding Username & password? I tried both leaving blank & entering the
Google Account (with all rights) and an ODK account (again with all rights
granted).
If the URL entered for 1.X mechanisme worked (entered in the settings of
SURVEY), then that same URL should work as well for Sync right? Or is there
a chance that my problem would by that my phone doesn't actually connects
to the server and thus times out? But then shouldn't it mention a failure
to connect?
Another option is that my Aggregate server is the problem, though if it
works fine for any 1.X operation it seems to me it should work for 2.0
(provided the settings mentionned above).
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com