Error 400 when trying to deploy locally

Tagged:

Currently contains 2 posts

Avatar

August 21, 2018 09:44

Jeremi Joslin

This is the log:
```./gradlew installToLocalCard

Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
> Task :deleteFromLocalCard

> Task :compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.6
1 warning

> Task :processResources NO-SOURCE
> Task :classes
> Task :convertJavacard
> Task :uploadExecutableLoadFile FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:uploadExecutableLoadFile’.
    > 400 Bad Request
  • Try:
    Run with —stacktrace option to get the stack trace. Run with —info or —debug option to get more log output. Run with —scan to get full insights.
  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.8/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 9s
4 actionable tasks: 4 executed```

A little more detailed output:
```./gradlew installToLocalCard —info

Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
Initialized native services in: /home/jeremi/.gradle/native
The client will now receive all logging from the daemon (pid: 3898). The daemon log file: /home/jeremi/.gradle/daemon/4.8/daemon-3898.out.log
Starting 66th build in daemon [uptime: 2 hrs 14 mins 29.191 secs, performance: 100%]
Using 8 worker leases.
Starting Build
Settings evaluated using settings file ‘/home/jeremi/Projects/78-ssi/SmartPGP/settings.gradle’.
Projects loaded. Root project using build file ‘/home/jeremi/Projects/78-ssi/SmartPGP/build.gradle’.
Included projects: [root project ‘SmartPGP’]

> Configure project :
Evaluating root project ‘SmartPGP’ using build file ‘/home/jeremi/Projects/78-ssi/SmartPGP/build.gradle’.
All projects evaluated.
Selected primary task ‘installToLocalCard’ from project :
Tasks to be executed: [task ‘:deleteFromLocalCard’, task ‘:compileJava’, task ‘:processResources’, task ‘:classes’, task ‘:convertJavacard’, task ‘:uploadExecutableLoadFile’, task ‘:installToLocalCard’]
:deleteFromLocalCard (Thread[Task worker for ‘:’,5,main]) started.

> Task :deleteFromLocalCard
Task ‘:deleteFromLocalCard’ is not up-to-date because:
Task has not declared any outputs despite executing actions.
==> ApduCommand(00A4040000)

Got response
Last command

> Task :deleteFromLocalCard
Delete succeeded.
:deleteFromLocalCard (Thread[Task worker for ‘:’,5,main]) completed. Took 9.3 secs.
:compileJava (Thread[Task worker for ‘:’,5,main]) started.

> Task :compileJava UP-TO-DATE
Skipping task ‘:compileJava’ as it is up-to-date.
:compileJava (Thread[Task worker for ‘:’,5,main]) completed. Took 0.007 secs.
:processResources (Thread[Task worker for ‘:’,5,main]) started.

> Task :processResources NO-SOURCE
file or directory ‘/home/jeremi/Projects/78-ssi/SmartPGP/src/main/resources’, not found
Skipping task ‘:processResources’ as it has no source files and no previous output files.
:processResources (Thread[Task worker for ‘:’,5,main]) completed. Took 0.0 secs.
:classes (Thread[Task worker for ‘:’,5,main]) started.

> Task :classes UP-TO-DATE
Skipping task ‘:classes’ as it has no actions.
:classes (Thread[Task worker for ‘:’,5,main]) completed. Took 0.0 secs.
:convertJavacard (Thread[Task worker for ‘:’,5,main]) started.

> Task :convertJavacard UP-TO-DATE
Skipping task ‘:convertJavacard’ as it is up-to-date.
:convertJavacard (Thread[Task worker for ‘:’,5,main]) completed. Took 0.001 secs.
:uploadExecutableLoadFile (Thread[Task worker for ‘:’,5,main]) started.

> Task :uploadExecutableLoadFile FAILED
Task ‘:uploadExecutableLoadFile’ is not up-to-date because:
Task has not declared any outputs despite executing actions.
:uploadExecutableLoadFile (Thread[Task worker for ‘:’,5,main]) completed. Took 1.234 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:uploadExecutableLoadFile’.
    > 400 Bad Request
  • Try:
    Run with —stacktrace option to get the stack trace. Run with —debug option to get more log output. Run with —scan to get full insights.
  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.8/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 10s
4 actionable tasks: 2 executed, 2 up-to-date
```

Avatar

August 27, 2018 11:57

Sergey Khruschak

Hi Jeremi,

Thanks for your interest in Fidesmo. Sorry for the inconvenience and late response. Due to security reasons, when uploading to a card locally our Gradle Fidesmo tool needs to upload the CAP file to our server and install the applet from it. Before that our server validats your applet using Oracle’s off card verifier. In this case I see some errors got from the verifier, this could be because our server hasn’t detected the platform version for the applet.

Unfortunately Gradle Fidesmo tool lacks proper configuration parameters and debug capabilities, but we are working on a new client that should make it easier. You can find it here: https://github.com/fidesmo/fdsm and the documentation for it is in Wiki: https://github.com/fidesmo/fdsm/wiki/Command-Line-Interface

Best regards,
Sergey Khruschak
Fidesmo Team

Reply to thread