Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
popoleeMaster opened this issue Jan 24, 2024 · 1 comment · Fixed by #6713
Closed

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

popoleeMaster opened this issue Jan 24, 2024 · 1 comment · Fixed by #6713
Labels

Comments

@popoleeMaster
Copy link

[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.

@aalej
Copy link
Contributor

aalej commented Jan 24, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants