Skip to content

GooglePlayRelease@4.276.0 fails with ERR_REQUIRE_ESM from html-encoding-sniffer #502

Description

@hamaro9

After the Google Play Azure DevOps extension updated to 4.276.0, our pipeline started failing immediately in the GooglePlayRelease@4 task.

The task fails before authenticating or uploading the AAB.

Environment

  • Azure DevOps Google Play extension version: 4.276.0
  • Task: GooglePlayRelease@4
  • Agent type: self-hosted Windows agent
  • Agent version: 4.255.0
  • Agent OS: Windows
  • Pipeline pool: self-hosted Windows VM

Error

Starting: Publish AAB to Google Play Internal Track
==============================================================================
Task         : Google Play - Release
Description  : Release an app to the Google Play Store
Version      : 4.276.0
Author       : Microsoft Corporation
Help         : https://marketplace.visualstudio.com/items?itemName=ms-vsclient.google-play
==============================================================================
##[error]Unhandled: require() of ES Module C:\agent\_work\_tasks\GooglePlayRelease_...\4.276.0\node_modules\@exodus\bytes\encoding-lite.js from C:\agent\_work\_tasks\GooglePlayRelease_...\4.276.0\node_modules\html-encoding-sniffer\lib\html-encoding-sniffer.js not supported.
Instead change the require of encoding-lite.js in C:\agent\_work\_tasks\GooglePlayRelease_...\4.276.0\node_modules\html-encoding-sniffer\lib\html-encoding-sniffer.js to a dynamic import() which is available in all CommonJS modules.
##[error]Error [ERR_REQUIRE_ESM]: require() of ES Module C:\agent\_work\_tasks\GooglePlayRelease_...\4.276.0\node_modules\@exodus\bytes\encoding-lite.js from C:\agent\_work\_tasks\GooglePlayRelease_...\4.276.0\node_modules\html-encoding-sniffer\lib\html-encoding-sniffer.js not supported.
    at Object.<anonymous> (C:\agent\_work\_tasks\GooglePlayRelease_...\4.276.0\node_modules\html-encoding-sniffer\lib\html-encoding-sniffer.js:2:41)
Finishing: Publish AAB to Google Play Internal Track

Expected behavior

GooglePlayRelease@4 should load successfully and upload the AAB to the configured Google Play track.

Actual behavior

The task crashes while loading its bundled Node dependencies, before upload starts.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions