Skip to content

Proxy環境下でacc loginに失敗する #50

@21kazu13

Description

@21kazu13

素晴らしいツールの開発・メンテナンスありがとうございます。
本格的にatcoderがんばろうと、数ヶ月前に使い始めて便利に利用させていただいております。

普段と異なるネットワーク環境で利用の際、acc loginができなくなることがありました。
具体的には
http_proxyとhttps_proxyにはhttp://{username}:password}@{address}:portが設定されており、
curlで https://atcoder.jp/ に正常に接続できる状態で、acc loginを行ったところ下記のエラーとなりました。

(node:18257) UnhandledPromiseRejectionWarning: Error: Request failed with status code 301
    at createError (/usr/lib/node_modules/atcoder-cli/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/usr/lib/node_modules/atcoder-cli/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/atcoder-cli/node_modules/axios/lib/adapters/http.js:269:11)
    at IncomingMessage.emit (events.js:412:35)
    at endReadableNT (internal/streams/readable.js:1334:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:18257) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:18257) [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.

何か他の環境変数を設定して渡してあげなければならないなどありますでしょうか?
初めてIssuesを起票しましたので、適切でない点があれば合わせてご教授いただけますと幸いです。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions