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 — fs: fsPromises.lchmod throws AssertionError on Ubuntu · Issue #21421 · nodejs/node

fs: fsPromises.lchmod throws AssertionError on Ubuntu #21421

New issue
Copy link
New issue
Copy link
Closed
#21435
Closed
fs: fsPromises.lchmod throws AssertionError on Ubuntu#21421
#21435
Copy link
Labels
errorsIssues and PRs related to JavaScript errors originating in Node.js core.experimentalIssues and PRs related to experimental features.fsIssues and PRs related to file-system APIs and the fs module.promisesIssues and PRs related to ECMAScript promises.

Description

@shisama
shisama
opened on Jun 20, 2018
Issue body actions
  • Version: v11.0.0-pre
  • Platform: Linux bf7762b084bb 4.9.87-linuxkit-aufs deps: update openssl to 1.0.1j #1 SMP Wed Mar 14 15:12:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem: fs

When I run the below code on Ubuntu 18.04 on Docker, I got the error.
Expected behavior was Error [ERR_METHOD_NOT_IMPLEMENTED] but I got AssertionError [ERR_ASSERTION].

const fs = require('fs');
const { lchmod } = fs.promises;

(async () => {
  try {
    await lchmod('./test.txt', 0o777);
  } catch (err) {
    console.log(err);
  }
})();
 { AssertionError [ERR_ASSERTION]: Code: ERR_METHOD_NOT_IMPLEMENTED; The provided arguments length (0) does not match the required ones (1).
    at getMessage (internal/errors.js:223:3)
    at new NodeError (internal/errors.js:156:13)
    at lchmod (internal/fs/promises.js:373:11)
    at repl:3:10
    at repl:7:3
    at Script.runInThisContext (vm.js:89:20)
    at REPLServer.defaultEval (repl.js:317:29)
    at bound (domain.js:396:14)
    at REPLServer.runBound [as eval] (domain.js:409:12)
    at REPLServer.onLine (repl.js:615:10)
  generatedMessage: false,
  name: 'AssertionError [ERR_ASSERTION]',
  code: 'ERR_ASSERTION',
  actual: false,
  expected: true,
  operator: '==' }

Does ERR_METHOD_NOT_IMPLEMENTED() require arguments like ERR_METHOD_NOT_IMPLEMENTED('lchmod()')?

https://github.com/nodejs/node/blob/master/lib/internal/fs/promises.js#L373
https://github.com/nodejs/node/blob/master/lib/internal/fs/promises.js#L381

Activity

  1. ChALkeR
    added
    fsIssues and PRs related to file-system APIs and the fs module.
    promisesIssues and PRs related to ECMAScript promises.
    experimentalIssues and PRs related to experimental features.
    on Jun 20, 2018
  2. cjihrig commented on Jun 20, 2018

    @cjihrig
    cjihrig
    on Jun 20, 2018
    Contributor
    More actions

    Care to send a PR for both lchmod and lchown?

    Reacted by Masashi Hirano
  3. shisama commented on Jun 20, 2018

    @shisama
    shisama
    on Jun 20, 2018
    ContributorAuthor
    More actions

    @cjihrig
    Thank you for your reply. I'll send it.

  4. ChALkeR
    added
    errorsIssues and PRs related to JavaScript errors originating in Node.js core.
    on Jun 24, 2018
  5. ChALkeR
    closed this as completedin #21435on Jul 10, 2018
  6. ChALkeR
    added a commit that references this issue on Sep 8, 2018

    test: add test for error codes doc and impl

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    errorsIssues and PRs related to JavaScript errors originating in Node.js core.experimentalIssues and PRs related to experimental features.fsIssues and PRs related to file-system APIs and the fs module.promisesIssues and PRs related to ECMAScript promises.

    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.