question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Action fails with ENOENT without specifying missing file

See original GitHub issue

Hello, I get this output from my workflow:

##[error]ENOENT: no such file or directory, open
##[error]Node run failed with exit code 1

And my parameters are the following:

        serviceAccountJson: private_key.json
        packageName: it.riccardopersello.sigma
        releaseFile: build/app/outputs/bundle/release/app-release.aab
        track: internal

I check the existence of the aab file before calling this action. The full workflow is

on:
  push:
    branches: 
      - internal-release

name: Test, build and release APK on Google Play Store (internal branch)
jobs:
  build:
    name: Test, build and create APK
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - uses: actions/setup-java@v1
      with:
        java-version: '12.x'
    - uses: subosito/flutter-action@v1
      with:
        channel: 'stable'
    - name: Flutter upgrade
      run: flutter upgrade
    - name: Flutter get packages
      run: flutter pub get
    - name: Flutter test
      run: flutter test
    - name: Generate build number
      uses: einaregilsson/build-number@v2 
      with:
        token: ${{secrets.github_token}}
    - name: Print build number
      run: echo "Build number is $BUILD_NUMBER"
    - name: Flutter build signed appbundle
      env:
        KEYSTORE_PASSWORD: ${{secrets.KEYSTORE_PASSWORD}}
      run: flutter build appbundle --release --build-number $BUILD_NUMBER
    - name: Key to file
      env:
        KEY_JSON_CONTENT: ${{secrets.PLAY_STORE_JSON}}
      run: echo $KEY_JSON_CONTENT > private_key.json
    - name: Check bundle existence
      run: test -f build/app/outputs/bundle/release/app-release.aab && echo "Bundle exists"
    - name: Upload bundle to Play Store (internal channel)
      uses: r0adkll/upload-google-play@v1
      with:
        serviceAccountJson: private_key.json
        packageName: it.riccardopersello.sigma
        releaseFile: build/app/outputs/bundle/release/app-release.aab
        track: internal

How can I get a more detailed error report for the missing file?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
r0adkllcommented, Dec 12, 2019

I pushed an update out (v1.0.1 or continue using the v1 tag) that includes some improved debugging and runs some pre-condition checks to verify that your inputs exist, then prints the input back out if it fails

0reactions
r0adkllcommented, Dec 12, 2019

You are correct, those inputs are suppose to be optional, I added some checks to validate that the directory or file exists if you include them but it looks like those checks are tripping anyway. I’ll get these issues fixed and pushed, but I’m glad the action completes for you afterwards.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm install in GitHub Action fails with "ENOENT: no such file ...
At long wait, I found the solution here: Install an npm module from a private GitHub repository using GitHub Actions
Read more >
Troubleshoot deployment issues in Lambda
This issue can occur when you specify an Amazon S3 object in a call to UpdateFunctionCode ... Error: fork/exec /var/task/function: no such file...
Read more >
Errors | Node.js v19.3.0 Documentation
ENOENT (No such file or directory): Commonly raised by fs operations to indicate that a component of the specified pathname does not exist....
Read more >
ENOENT: no such file or directory ... but there is - Reddit
The error message I get is: npm ERR! code ENOENT npm ERR! syscall open npm ERR! path C:\Users\filepath\filepath\filepath\filepath/package.json ...
Read more >
Error handling in Node.js - LogRocket Blog
$node main.js { Error: ENOENT: no such file or directory, open '/Users/Kedar/node.txt' at ... Here's the syntax for a callback function:
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found