aquiladev / ipfs-action

GitHub Action for upload to IPFS. Supports Pinata, Infura pinning service as well as direct upload.
https://dapps-delivery-guide.readthedocs.io/
MIT License
177 stars 44 forks source link

Getting "The user aborted a request." #31

Closed etienne-napoleone closed 2 years ago

etienne-napoleone commented 2 years ago

Hello,

While trying to use the plugin with multiple configurations, including:

name: Upload illustration to IPFS

on:
  push:
    paths:
      - assets/illustration.png

jobs:
  upload:
    name: Upload
    runs-on: ubuntu-latest
    steps:
      - uses: aquiladev/ipfs-action@v0.2.0
        with:
          path: assets/
name: Upload illustration to IPFS

on:
  push:
    paths:
      - assets/illustration.png

jobs:
  upload:
    name: Upload
    runs-on: ubuntu-latest
    steps:
      - uses: aquiladev/ipfs-action@v0.2.0
        with:
          path: assets/
          host: cf-ipfs.com
          port: 443
          protocol: https
          timeout: 180000
          verbose: true

and the same ones using a file path instead of directory, and also using v0.1.3

The result is always:

Run aquiladev/ipfs-action@v0.2.0
  with:
    path: assets/illustration.png
    service: ipfs
    timeout: 60000
    verbose: false
    host: ipfs.komputing.org
    port: 443
    protocol: https
    headers: {}
Error: The user aborted a request.
(node:1510) UnhandledPromiseRejectionWarning: AbortError: The user aborted a request.
    at abort (/home/runner/work/_actions/aquiladev/ipfs-action/v0.2.0/node_modules/node-fetch/lib/index.js:1418:16)
    at AbortSignal.abortAndFinalize (/home/runner/work/_actions/aquiladev/ipfs-action/v0.2.0/node_modules/node-fetch/lib/index.js:1433:4)
    at AbortSignal.dispatchEvent (/home/runner/work/_actions/aquiladev/ipfs-action/v0.2.0/node_modules/event-target-shim/dist/event-target-shim.js:818:35)
    at abortSignal (/home/runner/work/_actions/aquiladev/ipfs-action/v0.2.0/node_modules/abort-controller/dist/abort-controller.js:52:12)
    at AbortController.abort (/home/runner/work/_actions/aquiladev/ipfs-action/v0.2.0/node_modules/abort-controller/dist/abort-controller.js:91:9)
    at AbortSignal.onAbort (/home/runner/work/_actions/aquiladev/ipfs-action/v0.2.0/node_modules/any-signal/index.js:13:16)
    at AbortSignal.dispatchEvent (/home/runner/work/_actions/aquiladev/ipfs-action/v0.2.0/node_modules/event-target-shim/dist/event-target-shim.js:818:35)
    at abortSignal (/home/runner/work/_actions/aquiladev/ipfs-action/v0.2.0/node_modules/abort-controller/dist/abort-controller.js:52:12)
    at AbortController.abort (/home/runner/work/_actions/aquiladev/ipfs-action/v0.2.0/node_modules/abort-controller/dist/abort-controller.js:91:9)
    at AbortSignal.onAbort (/home/runner/work/_actions/aquiladev/ipfs-action/v0.2.0/node_modules/any-signal/index.js:13:16)
(node:1510) 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)
(node:1510) [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.
aquiladev commented 2 years ago

could you provide node version?

etienne-napoleone commented 2 years ago

Isn't node version set by your action here https://github.com/aquiladev/ipfs-action/blob/v0.2.0/action.yaml#L60 ? What would be the easiest way to get this version from my action?

aquiladev commented 2 years ago

Indeed, forgot about action runtime config. I can't reproduce it in my pipelines. I'm trying to locate the problem. It seems the issue related to environment. Could you try action aquiladev/ipfs-action@v0.2.1-alpha.4? I've upgraded ipfs-http-client and action runtime to node16.

etienne-napoleone commented 2 years ago

Welp, I'm dumb! Forgot the checkout step so I guess the error was originating from not finding the file. Using you alpha version gave me a more explicit error:

Run aquiladev/ipfs-action@v0.2.1-alpha.4
  with:
    path: assets/
    service: ipfs
    timeout: 60000
    verbose: false
    host: ipfs.komputing.org
    port: 443
    protocol: https
    headers: {}
Error: ENOENT: no such file or directory, lstat 'assets/'
node:fs:1514
  handleErrorFromBinding(ctx);
  ^

Error: ENOENT: no such file or directory, lstat 'assets/'
    at Object.lstatSync (node:fs:1514:3)
    at upload (/home/runner/work/_actions/aquiladev/ipfs-action/v0.2.1-alpha.4/pinners/ipfs.js:17:24)
    at Object.upload (/home/runner/work/_actions/aquiladev/ipfs-action/v0.2.1-alpha.4/pinners/maker.js:13:16)
    at Object.upload (/home/runner/work/_actions/aquiladev/ipfs-action/v0.2.1-alpha.4/uploader.js:12:16)
    at async run (/home/runner/work/_actions/aquiladev/ipfs-action/v0.2.1-alpha.4/runner.js:35:20) {
  errno: -2,
  syscall: 'lstat',
  code: 'ENOENT',
  path: 'assets/'
}

thanks for your time 😓