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

Reduce JavaFX failure output#45

Merged
olivierdagenais merged 2 commits into
masterfrom
reduce_javafx_failure_output
Jun 3, 2016
Merged

Reduce JavaFX failure output#45
olivierdagenais merged 2 commits into
masterfrom
reduce_javafx_failure_output

Conversation

@olivierdagenais
Copy link
Copy Markdown
Contributor

Manual Testing

These steps were performed on my Windows 10 workstation:

  1. Temporarily disable the insecure store file to force authentication. I did that by appending .old to %LOCALAPPDATA%/git-credential-manager/insecureStore.xml.

  2. Create a file called input.txt containing the following:

    protocol=https
    host=mseng.visualstudio.com
    
  3. Launch the GCM4ML in get mode, with stdin coming from input.txt and using a JRE that doesn't support JavaFX, such as Java 6. This is what my command-line looked like:

    /cygdrive/e/Software/Java/jdk1.6.0_20/bin/java -Ddebug=true -jar target/git-credential-manager-1.7.2-SNAPSHOT.jar get < input.txt
    
  4. Before the changes from this pull request, we would have gotten the following debug output:

    VsoAadAuthentication::interactiveLogon
    AzureAuthority::acquireToken
    Authorization code could not be obtained: java.lang.IllegalStateException: I don't support your platform yet.
    Unmet requirements for the 'JavaFx' provider:
     - Oracle Java SE 7 update 6 or higher, Oracle Java SE 8, OR OpenJDK 8.
     - JavaFX or OpenJFX runtime JAR.
    
    Please send details about your operating system version, Java version, 32- vs. 64-bit, etc.
    The following System Properties and Environment Variables would be very useful.
    # --- BEGIN SYSTEM PROPERTIES ---
    (...snip...)
    # ---- END SYSTEM PROPERTIES ----
    
    # --- BEGIN ENVIRONMENT VARIABLES ---
    (...snip...)
    # ---- END ENVIRONMENT VARIABLES ----
    
       token acquisition failed.
       interactive logon failed
    VsoAadAuthentication::deviceLogon
    AzureAuthority::acquireToken
    

    ...and now we get the following debug output:

    VsoAadAuthentication::interactiveLogon
    AzureAuthority::acquireToken
    
    Unmet requirements for the 'JavaFx' provider:
     - Oracle Java SE 7 update 6 or higher, Oracle Java SE 8, OR OpenJDK 8.
     - JavaFX or OpenJFX runtime JAR.
    
       token acquisition failed.
       interactive logon failed
    VsoAadAuthentication::deviceLogon
    AzureAuthority::acquireToken
    
  5. Re-enable the insecure store file.

Mission accomplished!

Oli Dagenais added 2 commits June 3, 2016 12:17
This makes use of the recently-added ProviderScanner to more
gracefully check for availability and then report unavailablity
(if applicable) in a much less alarming fashion.
@olivierdagenais olivierdagenais merged commit 7486ef4 into master Jun 3, 2016
@olivierdagenais olivierdagenais deleted the reduce_javafx_failure_output branch June 3, 2016 19:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants