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.

UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory

See original GitHub issue

Hi, thanks for this action. It looks really promising, although I’ve got difficulties with the setup.

I’m having UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, here’s log:

2020-09-24T19:26:54.3052985Z ##[group]Run burrunan/gradle-cache-action@v1
2020-09-24T19:26:54.3053451Z with:
2020-09-24T19:26:54.3053732Z   job-id: test
2020-09-24T19:26:54.3054137Z   multi-cache-enabled: false
2020-09-24T19:26:54.3054670Z   arguments: assembleRelease
2020-09-24T19:26:54.3055166Z   gradle-version: wrapper
2020-09-24T19:26:54.3055741Z   save-generated-gradle-jars: true
2020-09-24T19:26:54.3056370Z   save-local-build-cache: true
2020-09-24T19:26:54.3056899Z   multi-cache-version: 1.0
2020-09-24T19:26:54.3057596Z   multi-cache-group-id-filter: com[.]github[.]burrunan[.]multi-?cache
2020-09-24T19:26:54.3058452Z   save-gradle-dependencies-cache: true
2020-09-24T19:26:54.3059144Z   execution-only-caches: false
2020-09-24T19:26:54.3059913Z   remote-build-cache-proxy-enabled: true
2020-09-24T19:26:54.3060734Z   save-maven-dependencies-cache: true
2020-09-24T19:26:54.3061265Z   debug: true
2020-09-24T19:26:54.3061587Z   concurrent: false
2020-09-24T19:26:54.3061891Z env:
2020-09-24T19:26:54.3062352Z   JAVA_HOME_8.0.265_x64: /opt/hostedtoolcache/jdk/8.0.265/x64
2020-09-24T19:26:54.3062902Z   JAVA_HOME: /opt/hostedtoolcache/jdk/8.0.265/x64
2020-09-24T19:26:54.3063444Z   JAVA_HOME_8_0_265_X64: /opt/hostedtoolcache/jdk/8.0.265/x64
2020-09-24T19:26:54.3063869Z ##[endgroup]
2020-09-24T19:26:54.4966984Z ##[warning]distributionSha256Sum is not set in gradle/wrapper/gradle-wrapper.properties.
Please consider adding the checksum, see https://docs.gradle.org/current/userguide/gradle_wrapper.html#configuring_checksum_verification
2020-09-24T19:26:56.2349355Z ##[group]Restore gradle-generated-jars
2020-09-24T19:26:57.4979669Z Received 33506649 of 33506649 (100.0%), 43.8 MBs/sec
2020-09-24T19:26:57.4980939Z Cache Size: ~32 MB (33506649 B)
2020-09-24T19:26:57.5022356Z [command]/bin/tar --use-compress-program zstd -d -xf /home/runner/work/_temp/de1833ce-1ad0-409a-9dde-8f2332383963/cache.tzst -P -C /home/runner/work/repo/secret
2020-09-24T19:26:57.9760037Z ##[endgroup]
2020-09-24T19:26:57.9761017Z ##[group]Restore dependencies-gradle
2020-09-24T19:26:58.1444295Z Received 426 of 426 (100.0%), 0.0 MBs/sec
2020-09-24T19:26:58.1444830Z Cache Size: ~0 MB (426 B)
2020-09-24T19:26:58.1456971Z [command]/bin/tar --use-compress-program zstd -d -xf /home/runner/work/_temp/948d4873-34be-4946-887b-a784058b9745/cache.tzst -P -C /home/runner/work/repo/secret
2020-09-24T19:26:58.1553916Z ##[endgroup]
2020-09-24T19:26:58.1564679Z (node:2741) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, rename '/home/runner/.gradle-cache-action/1-index-dependencies-gradle-info.json' -> '/home/runner/.gradle-cache-action/1-index-dependencies-gradle-info.json.1-index-dependencies-gradle-Linux-infra/branch'
2020-09-24T19:26:58.1567962Z (node:2741) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
2020-09-24T19:26:58.1569805Z (node:2741) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

The step definition looks like this:

 - uses: burrunan/gradle-cache-action@v1
    name: Build
    with:
       job-id: test
       multi-cache-enabled: false
       arguments: assembleRelease

I’ve tried to reproduce it here, in some minimal reproduction repository, but couldn’t make it to throw the same exception.

  1. Do you have any clues why am I getting UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory ?
  2. I suggest that, when experiencing such error, action might return non-zero code. Currently, the step looks like the action has been successfully executed.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
wziebacommented, Sep 24, 2020

Thanks a lot. I’ve just tested it, works like a charm!

1reaction
vlsicommented, Sep 24, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to resolve Nodejs: Error: ENOENT: no such file or directory
Your app is expecting to find a file at /home/embah/node/nodeapp/config/config.json but that file does not exist (which is what ENOENT ...
Read more >
UnhandledPromiseRejectionWar...
UnhandledPromiseRejectionWarning : Error: ENOENT: no such file or directory, open '/usr/local/lib/node_modules/degit/dist/help.md' #169.
Read more >
How To Fix the “Enoent” Error? - Position Is Everything
No such files or directory means that the library is currently needed or the executable binary doesn't exist. Conclusion. Let's review what we...
Read more >
How to fix: npm ERR! enoent ENOENT: no such file or ...
I recently struggled for a while with an npm error thrown when executing npm install of some package. The error message was npm...
Read more >
Fix Nodejs Error: ENOENT: no such file or directory - sneppets -
As you can see from the above error, that it is expecting file called “npm-dependencies.txt” to be there in specific path. But it...
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