Issues with CLI for ODK Briefcase v1.11.1

What is the problem? Please be detailed.
I have been using Briefcase via CLI since the CLI was introduced. I haven't had any problems with it until yesterday when I used Briefcase 1.11.1. I upgraded from v1.10.0. I took note of the new syntax for CLI and have applied it to pull data from a test ODK server (on ONA) that I use. Server settings are as follows:

url: https://odk.ona.io
username: validtrial
password: zEF-STN-5ze-qom

I used the following command line input to try to pull from this aggregate server:

java -jar ODK-Briefcase-v1.11.1.jar --pull_aggregate --form_id stakeholders --storage_directory ~/Desktop --aggregate_url https::/ona.io/validtrial --odk_username validtrial --odk_password zEF-STN-5ze-qom

I get the following error on terminal:

Unexpected error in Briefcase. Please review briefcase.log for more information. For help, post to https://forum.getodk.org/c/support

The briefcase.log contains the following:

2018-06-28 06:40:44,573 [main] ERROR org.opendatakit.common.cli.Cli - Error
java.io.UncheckedIOException: java.nio.file.NoSuchFileException: /Users/ernest/Desktop/ODK Briefcase Storage/cache.ser
	at org.opendatakit.briefcase.reused.UncheckedFiles.createFile(UncheckedFiles.java:133)
	at org.opendatakit.briefcase.util.FormCache.setLocation(FormCache.java:80)
	at org.opendatakit.briefcase.util.FormCache.from(FormCache.java:54)
	at org.opendatakit.briefcase.operations.PullFormFromAggregate.pullFormFromAggregate(PullFormFromAggregate.java:66)
	at org.opendatakit.briefcase.operations.PullFormFromAggregate.lambda$static$0(PullFormFromAggregate.java:53)
	at org.opendatakit.common.cli.Cli.lambda$run$4(Cli.java:126)
	at java.lang.Iterable.forEach(Iterable.java:75)
	at org.opendatakit.common.cli.Cli.run(Cli.java:123)
	at org.opendatakit.briefcase.Launcher.main(Launcher.java:79)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.nio.file.NoSuchFileException: /Users/ernest/Desktop/ODK Briefcase Storage/cache.ser
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
	at java.nio.file.Files.newByteChannel(Files.java:361)
	at java.nio.file.Files.createFile(Files.java:632)
	at org.opendatakit.briefcase.reused.UncheckedFiles.createFile(UncheckedFiles.java:131)
	... 13 common frames omitted
2018-06-28 08:41:11,678 [main] ERROR org.opendatakit.common.cli.Cli - Error
java.io.UncheckedIOException: java.nio.file.NoSuchFileException: /Users/ernest/Desktop/ODK Briefcase Storage/cache.ser
	at org.opendatakit.briefcase.reused.UncheckedFiles.createFile(UncheckedFiles.java:133)
	at org.opendatakit.briefcase.util.FormCache.setLocation(FormCache.java:80)
	at org.opendatakit.briefcase.util.FormCache.from(FormCache.java:54)
	at org.opendatakit.briefcase.operations.PullFormFromAggregate.pullFormFromAggregate(PullFormFromAggregate.java:66)
	at org.opendatakit.briefcase.operations.PullFormFromAggregate.lambda$static$0(PullFormFromAggregate.java:53)
	at org.opendatakit.common.cli.Cli.lambda$run$4(Cli.java:126)
	at java.lang.Iterable.forEach(Iterable.java:75)
	at org.opendatakit.common.cli.Cli.run(Cli.java:123)
	at org.opendatakit.briefcase.Launcher.main(Launcher.java:79)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.nio.file.NoSuchFileException: /Users/ernest/Desktop/ODK Briefcase Storage/cache.ser
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
	at java.nio.file.Files.newByteChannel(Files.java:361)
	at java.nio.file.Files.createFile(Files.java:632)
	at org.opendatakit.briefcase.reused.UncheckedFiles.createFile(UncheckedFiles.java:131)
	... 13 common frames omitted

When I use version 1.9.0 of Briefcase, command produces no error and expected results are produced.

What ODK tool and version are you using? And on what device and operating system version?

ODK Briefcase v1.11.1 .jar file on a macOS 10.13.5

What steps can we take to reproduce the problem?

Steps described above. Details of server being accessed available above.

What you have you tried to fix the problem?

I tried both the long form and the short form of the CLI syntax.

Hi, @Ernest!

Right now we expect that users will use Briefcase CLI operations configured with an existing briefcase directory.

We expect that error to happen when the briefcase directory composed with the --storage_directory arg doesn't exist. In your case, this would mean that the directory /Users/ernest/Desktop/ODK Briefcase Storage doesn't exist. Could you confirm this?

Just a quick follow up: Once the briefcase directory exists (and it has at least a forms directory inside) the command works.

Note that the --aggregate_url arg in your example is malformed. It should be https://ona.io/validtrial

Hi, @Ernest!

We are releasing v.1.11.2 with a fix that would solve the problem you're having. You can download it from the release page: https://github.com/opendatakit/briefcase/releases/tag/v1.11.2 (the JAR file will be available for download during the next hour)

1 Like

Hello Guillermo. Thank you very much for your reply and apologies for delay. When I saw your response, I immediately tried it out. All works now. Thanks again.

I will look into v1.11.2. Thanks for doing that. I really felt the old way made sense where the ODK Briefcase Storage gets created if its not found.

Thanks again. Big help.

3 Likes