Authentication error while pushing submissions to Central with Briefcase

I am trying to switch to ODK Central from ODK Aggregate and using ODK Briefcase(1.18) to migrate all the ongoing submissions.

Since both my ODK Aggregrate and ODK Central are in ubuntu Server , am using ODK Briefcase CLI commands to push the following submissions.

-- Briefcase CLI command (to push submissions to Central from storage directory created through Aggregate)

java -jar /opt/briefcase/ODK-Briefcase-v1.18.0.jar --push_central --form_id DCTK-736_DC-157_Limited_Audit_STATE_V5 --storage_directory /opt/briefcase/storage/storage_directory --odk_url https://odkcentralqa.cag.gov.in/#/login?next=/  --project_id 184 -p secret --odk_email saurabh.6.singh@coforge.com

Even though my username/password is correct (as used the same to login in to ODK Central ) am getting following "authentication error"

--Briefcase.log

 ERROR org.opendatakit.briefcase.Launcher - Error
org.opendatakit.briefcase.reused.BriefcaseException: Can't authenticate with ODK Central
        at org.opendatakit.briefcase.operations.PushFormToCentral.lambda$pushToCentral$2(PushFormToCentral.java:79)
        at org.opendatakit.briefcase.reused.http.response.ClientError.orElseThrow(ClientError.java:86)
        at org.opendatakit.briefcase.operations.PushFormToCentral.pushToCentral(PushFormToCentral.java:79)
        at org.opendatakit.common.cli.Cli.lambda$run$4(Cli.java:130)
        at java.base/java.lang.Iterable.forEach(Iterable.java:75)
        at org.opendatakit.common.cli.Cli.run(Cli.java:127)
        at org.opendatakit.briefcase.Launcher.main(Launcher.java:90)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)

---It seems to me am getting error from following briefcase code.
[PushFormToCentral.java (line 76 to 79)]

CentralServer server = CentralServer.of(args.get(SERVER_URL), args.get(PROJECT_ID), new Credentials(args.get(CREDENTIALS_EMAIL), args.get(CREDENTIALS_PASSWORD)));

    String token = http.execute(server.getSessionTokenRequest())
        .orElseThrow(() -> new BriefcaseException("Can't authenticate with ODK Central"));

Could anyone here please help here as I need to push the submissions from ODK Aggregate to Central and have already created the form in Central but still gets the above authentication error w.ith correct username/password

The URL should look like https://central.example.com, not
https:///central.example.com/#/login?next=/.

Hi,

Central is a bit complex than Aggregate in terms of permissions. From your symptoms, I cannot really predict where the issue is, but please cross-check the following:

  • The user account is authorized to access the specific form (this is one step ahead of just creating the account and start using it).
  • Try to simplify the migration to a single test form, before trying the main full migration. Try to match the environment as much as possible.

Regards,
Saad

1 Like

Thanks a lot @yanokwa ...changing the login URL helped me push the data now.. ..although view and "edit tab" in the submissions page of the survey form is not working effectively (i.e. few fields of the submissions are not visible while clicking the edit tab although download submissions worked fine) .
I have changed the password which was mistakenly posted by me ...thanks for informing me..

Thanks Saad for replying ..changing the url as per @yanokwa comment helped me push the data although while clicking on the "edit" tab in the submissions page , all submitted fields does not showed up (but download submissions are working fine)..
I have changed the password which was mistakenly posted by me here, is there a way I can edit my above post (so that I can hide the password credentials here. )

All posts made with your old credentials have been edited to remove them.

Thanks a lot @yanokwa for the help ..