GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Failed to deploy - FileNotFoundException · Issue #3275 · googleapis/google-cloud-java

Failed to deploy - FileNotFoundException #3275

New issue
Copy link
New issue
Copy link
Closed
Closed
Failed to deploy - FileNotFoundException#3275
Copy link
Assignees
chingor13
Labels
authrunning on app enginetype: questionRequest for information or clarification. Not an issue.

Description

@adam-hurwitz
adam-hurwitz
opened on May 16, 2018
Issue body actions

Expected

JAR deployment to AppEngine instance for Kotlin app.

Actual

During deployment to my AppEngine instance I am receiving the following FileNotFoundException. This error is not logical because the same built JAR runs the app successfully via IntelliJ prior to the deploy attempt.

Here is the Kotlin app file hierarchy which runs as expected both as an IntelliJ Application and JAR configuration. The "missing" directory/file is firebase/carpecoin-service-firebase-adminsdk-cyl9p-4b18763dbc.json which is nested under the main directory. The hierarchy was not altered after creating and building my JAR.

App Hiearchy
screen shot 2018-05-15 at 11 06 43 pm

Build Config
screen shot 2018-05-15 at 11 35 24 pm

Error

	at java.io.FileInputStream.open0(Native Method)
	at java.io.FileInputStream.open(FileInputStream.java:195)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at java.io.FileInputStream.<init>(FileInputStream.java:93)
	at Coordinator.main(Coordinator.kt:12)`
`Failed to deploy '[2018-05-15 23:00:21] carpe.coin_main.jar. Project: carpecoin-service. Version: auto': Deployment failed with exit code: 1```

## IntelliJ Info
IntelliJ IDEA 2018.1.3 (Community Edition)
Build #IC-181.4892.42, built on May 7, 2018
JRE: 1.8.0_152-release-1136-b38 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.10.5

Activity

  1. adam-hurwitz commented on May 16, 2018

    @adam-hurwitz
    adam-hurwitz
    on May 16, 2018
    Author
    More actions

    I just ran the command gcloud components update and upgraded to the following:

    Google Cloud SDK 201.0.0
    app-engine-java 1.9.63
    app-engine-python 1.9.69
    bq 2.0.33
    core 2018.05.11
    gsutil 4.31
    

    I attempted redeploying the same AppEngine build configuration but received the same error output.

  2. etanshaul commented on May 16, 2018

    @etanshaul
    etanshaul
    on May 16, 2018
    More actions

    thanks for details @AdamSHurwitz

    in that error, could you possibly paste in all the way up the stack? It looks like you provided only the end. I'm wondering if there is anything there that can help us debug.

  3. etanshaul commented on May 16, 2018

    @etanshaul
    etanshaul
    on May 16, 2018
    More actions

    on second look I see a couple potential issues:

    1. Not directly related to your issue, but you probably don't want to be storing you service account key on your source tree (and definitely don't want to be checking it in to version control alongside your source).

    2. You are loading the key as a file with a relative path and relying on the working directory, which can be unreliable. Better to load as a classpath resource.

    3. better yet, since you are running on app engine, use the default app engine credentials (no need to supply a service account key). See https://github.com/GoogleCloudPlatform/google-cloud-java#authentication. And when running locally, configure a GOOGLE_APPLICATION_CREDENTIALS environment variable to point to your service account key

  4. adam-hurwitz commented on May 17, 2018

    @adam-hurwitz
    adam-hurwitz
    on May 17, 2018
    Author
    More actions

    The default app engine credentials worked. My app is deployed and running so a BIG thank you @etanshaul !!!

    I believe this is the credential type you are referring to under the Firebase documentation
    Add the Firebase Admin SDK to Your Server

    The Admin SDKs can alternatively be authenticated with a different credential type. For example, if you are running your code within Google Cloud Platform, you can make use of Google Application Default Credentials to have the Admin SDKs themselves fetch a service account on your behalf.

    FirebaseOptions options = new FirebaseOptions.Builder() .setCredentials(GoogleCredentials.getApplicationDefault()) .setDatabaseUrl("https://<DATABASE_NAME>.firebaseio.com/") .build(); FirebaseApp.initializeApp(options);

    My question with this implementation is am I supposed to save the code above to version control? How do I ensure anyone with this code cannot access my Firebase database?

    New Issue
    I uncovered another related issue. When attempting to start a new Firebase project that is linked to a Google Cloud Project I received an error. I've attempted with both GCP Billing enabled and disabled. Where should I file this?

    add a project

    screen shot 2018-05-16 at 9 25 52 pm

  5. etanshaul commented on May 18, 2018

    @etanshaul
    etanshaul
    on May 18, 2018
    More actions

    @AdamSHurwitz I'm glad using the default credentials worked for you.

    My question with this implementation is am I supposed to save the code above to version control? How do I ensure anyone with this code cannot access my Firebase database?

    Yes. That auth code can live in your vcs. Presumably you needed to authenticate in order to deploy your app in the first place to your GCP account. Only apps running on your account should have access via your application default credentials. Maybe I misunderstood the concern?

    Regarding the Firebase billing concern, I'll defer to @garrettjonesgoogle to please help with routing the question as I don't have all the relevant information on this.

  6. adam-hurwitz commented on May 19, 2018

    @adam-hurwitz
    adam-hurwitz
    on May 19, 2018
    Author
    More actions

    @etanshaul - My concern is if I shared my GitHub repository publicly someone would be able to run the authentication portion of code in order to interact with my Firebase database.

    Thank you for directing my Firebase/GCP project linking bug to @garrettjonesgoogle.

  7. garrettjonesgoogle commented on May 24, 2018

    @garrettjonesgoogle
    garrettjonesgoogle
    on May 24, 2018
    Contributor
    More actions

    The firebase billing thing is outside of the scope of my knowledge - sorry!

  8. JustinBeckwith
    added
    🚨 criticalP0 critical issue. Requires immediate fix
    triage meI really want to be triaged.
    on Jun 8, 2018
  9. yihanzhen
    added
    type: questionRequest for information or clarification. Not an issue.
    auth
    api: app engine
    priority: p2Moderately-important priority. Fix may not be included in next release.
    and removed
    triage meI really want to be triaged.
    on Jun 11, 2018
  10. JustinBeckwith
    removed
    🚨 criticalP0 critical issue. Requires immediate fix
    on Jun 11, 2018
  11. chingor13
    added
    running on app engine
    and removed
    api: app engine
    on Oct 9, 2018
  12. JustinBeckwith
    added
    🚨 criticalP0 critical issue. Requires immediate fix
    on Nov 12, 2018
  13. sduskis
    removed
    🚨 criticalP0 critical issue. Requires immediate fix
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Dec 3, 2018
  14. chingor13 commented on Dec 5, 2018

    @chingor13
    chingor13
    on Dec 5, 2018
    Contributor
    More actions

    For the firebase billing error, that should be filed with Firebase: https://firebase.google.com/support/contact/

    The original issue appears to have been answered. Feel free to reopen if this is not the case.

  15. chingor13
    closed this as completedon Dec 5, 2018
  16. JustinBeckwith
    assigned
    chingor13
    on Feb 1, 2021
  17. suztomo
    added a commit that references this issue on Mar 9, 2026

    chore(main): release 2.39.1 (#3275)

    c2e3283
  18. chingor13
    added 3 commits that reference this issue on Mar 24, 2026

    chore: fix gapic-generator-java/DEVELOPMENT.md link in README.md (#3275)

    1012bf6

    deps: update dependency commons-cli:commons-cli to v1.9.0 (#3275)

    3f2c151

    samples: add samples for ranged reads and appendable uploads (#3275)

    2eb47e4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @chingor13
    chingor13

Labels

authrunning on app enginetype: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.