Skip to content
This repository was archived by the owner on Apr 16, 2022. It is now read-only.

CLI pull_aggregate fails with Error null #808

Closed
yanokwa opened this issue Sep 11, 2019 · 3 comments
Closed

CLI pull_aggregate fails with Error null #808

yanokwa opened this issue Sep 11, 2019 · 3 comments

Comments

@yanokwa
Copy link
Member

yanokwa commented Sep 11, 2019

/usr/bin/java -jar /root/briefcase/ODK-Briefcase-v1.17.0-beta.0.jar --pull_aggregate --storage_directory /root/briefcase --odk_url https://server.appspot.com --odk_username manager --odk_password mysecret password

Returns "Error: null".

The log is as follows:

2019-09-11 03:30:24,492 [main] ERROR org.opendatakit.briefcase.Launcher - Error
org.opendatakit.briefcase.reused.BriefcaseException: null
	at java.base/java.util.Optional.orElseThrow(Optional.java:408)
	at org.opendatakit.briefcase.model.form.FormMetadata.from(FormMetadata.java:62)
	at org.opendatakit.briefcase.model.form.FileSystemFormMetadataAdapter.deserialize(FileSystemFormMetadataAdapter.java:118)
	at org.opendatakit.briefcase.model.form.FileSystemFormMetadataAdapter.lambda$syncWithFilesAt$2(FileSystemFormMetadataAdapter.java:64)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
	at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
	at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at org.opendatakit.briefcase.model.form.FileSystemFormMetadataAdapter.syncWithFilesAt(FileSystemFormMetadataAdapter.java:71)
	at org.opendatakit.briefcase.model.form.FileSystemFormMetadataAdapter.at(FileSystemFormMetadataAdapter.java:33)
	at org.opendatakit.briefcase.operations.PullFormFromAggregate.pullFormFromAggregate(PullFormFromAggregate.java:91)
	at org.opendatakit.briefcase.operations.PullFormFromAggregate.lambda$static$0(PullFormFromAggregate.java:69)
	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)

ODK-Briefcase-v1.16.3-81-g0e0ee285.jar works great though.

@yanokwa yanokwa changed the title pull_aggregate fails with Error null CLI pull_aggregate fails with Error null Sep 11, 2019
@ggalmazor
Copy link
Contributor

ggalmazor commented Sep 11, 2019

I'm not sure what's going on, @yanokwa. Did you run another recent version of Briefcase by any chance? Maybe the one from master before merging on that storage directory #807?

Your stacktrace points to a problem with your metadata.json files. Before #807, we encoded a storageDirectory property with the absolute path to the form's directory. After #807, we encode a formDir with a relative directory.

Could you send me your sd or find the metadata.json file and attach it here?

@yanokwa
Copy link
Member Author

yanokwa commented Sep 11, 2019

Yup, I had an old version from master. I removed all the metadata.json files and reran it with the beta and all is well.

@yanokwa yanokwa closed this as completed Sep 11, 2019
@ggalmazor
Copy link
Contributor

Cool, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants