Comments (12)
What files are you loading up in ODK Briefcase? Do you have the form XML in the folder structure?
When I tried loading up a folder with all of the form instances, I received a similar blank file. When I loaded up the instances with the form schemas also in the folder structure then the export worked fine.
from briefcase.
Keep in mind that exposing your private key completely compromises all security of your data.
Sounds like a regression in the build of 1.4.10.
There were a lot of changes in that build. Letting @lognaturel take over.
from briefcase.
You need the JCE that is for your Java installation. i.e., Java 8 JCE if you are using Java 8.
And if that doesn't work, downgrade to Java 7 and the Java 7 JCE.
from briefcase.
I've tried using the Java 8 JCE but still had no luck but it still wouldn't work.
As requested, I've attached my public and private keys as docx files.
IMPACT_PublicKey.docx
IMPACT_PrivateKey.docx
Sorry, but I cannot attach my form as well.
Here are the steps I took:
- I copied the public key into the public_key column of my form in the settings tab.
- I tested my form on a tablet and sent a couple finalized forms to our aggregate server.
- Using ODK Briefcase v1.4.10, I pulled the data from my server into my local folder and received the "SUCCESS!" message. All the instances and the xml file were in my folder after pulling.
- Afterwards, I tried to export the data into a csv file and then received the error shown above.
At first, I noticed that my private key and public key had line breaks in it and proceeded to remove them but still came into the same error. Then I thought that I created my public-private key pair incorrectly and recreated my keys a couple times but still ran into the same error.
Then I decided to try a previous version of ODK Briefcase and that was the only thing that worked.
from briefcase.
I did a test on Windows and Mac with Briefcase 1.4.9 and 1.4.1. Both OSes are using Java 1.8.0 with the latest Java Cryptography Extension and here are the results.
Windows 7 SP1, Briefcase 1.4.9
Starting Export...
Processing instance: uuidfbf126e9-3ae8-4211-83d6-5e43a17252bf
SUCCEEDED!
Windows 7 SP1, Briefcase 1.4.10
Cause: java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA/NONE/OAEPWithSHA256AndMGF1Padding
Starting Export...
Processing instance: uuidfbf126e9-3ae8-4211-83d6-5e43a17252bf
Error decrypting submission uuidfbf126e9-3ae8-4211-83d6-5e43a17252bf Cause: org.opendatakit.briefcase.model.CryptoException: Error decrypting base64EncryptedKey Cause: java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA/NONE/OAEPWithSHA256AndMGF1Padding
FAILED!
macOS 10.12.3, Briefcase 1.4.9
Cause: java.security.InvalidKeyException: Illegal key size
Starting Export...
Processing instance: uuidfbf126e9-3ae8-4211-83d6-5e43a17252bf
Error decrypting submission uuidfbf126e9-3ae8-4211-83d6-5e43a17252bf Cause: org.opendatakit.briefcase.model.CryptoException: Error decrypting:submission.xml.enc Cause: java.security.InvalidKeyException: Illegal key size
FAILED!
macOS 10.12.3, Briefcase 1.4.10
Cause: java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA/NONE/OAEPWithSHA256AndMGF1Padding
Starting Export...
Processing instance: uuidfbf126e9-3ae8-4211-83d6-5e43a17252bf
Error decrypting submission uuidfbf126e9-3ae8-4211-83d6-5e43a17252bf Cause: org.opendatakit.briefcase.model.CryptoException: Error decrypting base64EncryptedKey Cause: java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA/NONE/OAEPWithSHA256AndMGF1Padding
FAILED!
To reproduce this bug, you can find the encrypted form and a submission at https://nafundi-test.appspot.com. No username or password is needed to pull forms.
Once you export, you'll need the MyPrivateKey.pem.txt. For completeness, this is the MyPublicKey.pem.txt. I've put both in encrypted-form.xml.txt as a comment (the first is the public, the second is the private key).
For the Mac, I can confirm that the Java Cryptography Extension is indeed installed because the following code returns true.
import javax.crypto.Cipher;
public class TestUCE {
public static void main(String args[]) throws Exception {
int length = Cipher.getMaxAllowedKeyLength("AES");
boolean unlimited = (length == Integer.MAX_VALUE);
System.out.println("Unlimited cryptography enabled: " + unlimited);
}
}
I think 1.4.10 does indeed have a regression due to the gradle build. From https://github.com/opendatakit/opendatakit/wiki/Briefcase-Release-Notes
During the export process, be sure to select Package required libraries into generated JAR. The cryptography libraries make extensive use of dynamic class loading and may perform runtime verification of their jar signatures.
If you instead choose Extract required libraries into generated JAR, then the resulting runnable jar will fail with
I also think export is broken on macOS, but it's not clear why. I've tried Java 1.7 and Java 1.8. @mitchellsundt did you remember trying 1.4.9 on a Mac?
from briefcase.
I think the first thing for someone to try here is to change the build.gradle file so it does not expand the dependant jars when it makes the Briefcase jar. An easy way to see what is inside the jar is to use this task inside the gradle file.
task explodedJar(type: Copy) {
into "$buildDir/libs/$jar.baseName"
with jar
}
from briefcase.
@meletis I vaguely remember SurveyCTO having this issue at some point. Do you use gradle to build your desktop client? How did you resolve it?
from briefcase.
I don't remember having that issue in SurveyCTO. We use Maven and we don't expand the dependent jars.
from briefcase.
from briefcase.
from briefcase.
My goal is to get Briefcase to run with a single click (e.g.,java -jar briefcase.jar
). I spent a lot of time digging into this, and it's most certainly a packaging problem. Here's what I've learned...
Getting a single-click Java application requires an uber/fat/flattened jar or a nested jar class loader. Flattened jars won't work because as @mitchellsundt's points out, Bouncy Castle won't work when exploded. That's the problem we see in 1.4.10.
Nested jar class loading is one reasonable path forward. The catch is, there aren't many class loaders that I've gotten to work. 1.4.9 used Eclipse's classloader which works on Windows, but doesn't seem to work on my Mac.
What does work on my Mac is gradle run
. This confirms my findings that if you are willing to write some script to run the briefcase jar with the classpath pointed to an external directory, it'll work great.
My next steps are to
- Try to find a modern class loader that works with macOS and gradle.
- See can package the jar as an .app for macOS and an .exe for Windows.
from briefcase.
from briefcase.
Related Issues (20)
- Crash on export when submission is empty HOT 1
- Crash on reloading from Central server not right after configuring it HOT 1
- Crash on attempted cancel of pull from Central server when offline
- Socket closed when pushing 3k+ submissions to Central HOT 3
- Forms with external secondary instances aren't shown on export or push tabs HOT 1
- Crash when pulling forms with spaces in formId from Central
- Pull before export doesn't work for forms from Central
- Pull from Collect directory where a few versions of the same form are available is not possible HOT 1
- On pull from Central, submission attachments are not requested if submission folder exists
- Forms aren’t immediately showing up in push or export after a canceled pull - only with Java 8
- Export is crashing after canceling pull when empty submissions are created - Java 8
- Make documentation link in Central push warning dialog clickable
- Support empty form versions when doing multi-version push to Central
- Form selection is lost and status is missing on Export tab when pull before export process in progress
- Briefcase tabs are disabled when run on java 9 and 10 and select sd on Windows
- Pull/Push/Export tabs are still active when the storage location is cleared HOT 3
- On export, skip encrypted submissions with manifest but no .enc file and mark as failed
- Form selection and individual export configuration in export tab becomes disabled
- Export using CLI ok, but freezes / hangs using GUI (Key too long?)
- Export of encrypted submissions using Briefcase UI fails HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from briefcase.