Skip to content

Can't deploy project due to ...res.body.versions undefined #6712

Closed

Description

@popoleeMaster

[REQUIRED] Environment info

firebase-tools:
"13.0.2"

Platform:
Windows

[REQUIRED] Test case

I just run firebase deploy on my project

[REQUIRED] Steps to reproduce

  • build a project
  • deploy a project

[REQUIRED] Expected behavior

the project is deployed

[REQUIRED] Actual behavior

[debug] [2024-01-23T10:24:51.358Z] TypeError: res.body.versions is not iterable (cannot read property undefined)
    at Object.listVersions (C:\Users\feder\Repository\anyx_mono_frontend\node_modules\firebase-tools\lib\hosting\api.js:113:18)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 3)
    at async Object.gcTagsForServices (C:\Users\feder\Repository\anyx_mono_frontend\node_modules\firebase-tools\lib\hosting\runTags.js:14:31)
    at async Object.setRewriteTags (C:\Users\feder\Repository\anyx_mono_frontend\node_modules\firebase-tools\lib\hosting\runTags.js:77:9)
    at async convertConfig (C:\Users\feder\Repository\anyx_mono_frontend\node_modules\firebase-tools\lib\deploy\hosting\convertConfig.js:160:9)
    at async C:\Users\feder\Repository\anyx_mono_frontend\node_modules\firebase-tools\lib\deploy\hosting\release.js:21:21
    at async Promise.all (index 0)
    at async release (C:\Users\feder\Repository\anyx_mono_frontend\node_modules\firebase-tools\lib\deploy\hosting\release.js:14:5)
    at async chain (C:\Users\feder\Repository\anyx_mono_frontend\node_modules\firebase-tools\lib\deploy\index.js:38:9)
    ```
    
    so here
    
    ```
    async function listVersions(site) {
    let pageToken = undefined;
    const versions = [];
    do {
        const queryParams = {};
        if (pageToken) {
            queryParams.pageToken = pageToken;
        }
        const res = await apiClient.get(`projects/-/sites/${site}/versions`, {
            queryParams,
        });
        versions.push(...res.body.versions);
        pageToken = res.body.nextPageToken;
    } while (pageToken);
    return versions;
}
exports.listVersions = listVersions;

This issue appeared overnight.

Activity

  1. aalej commented on Jan 24, 2024

    @aalej
    Contributor

    Hi @popoleeMaster, sorry to hear that you’re encountering this issue. I’m currently trying to reproduce this, but I’ll need additional information to do so. Could you:

    1. Share the contents of your firebase.json file? Specifically, the hosting section.
    2. Provide a quick overview of your project?
      • Are you only deploying to hosting?
      • Are you using the webframeworks feature?

    If you could provide other details about your project, or a Minimal, Complete, and Verifiable Example, please share those as well so that we can properly replicate the issue.

  2. added
    Needs: Author Feedback
    on Jan 24, 2024
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

    Needs: Author Feedbackapi: hostingtype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions