OfficeDev / TeamsFx

Developer tools for building Teams apps
Other
427 stars 164 forks source link

UpgradeError after updating to v5.0.0 #8788

Closed JannikKrusch closed 10 months ago

JannikKrusch commented 11 months ago

Describe the bug Cannot start app, throws extension error

"[upgrade.NoNeedUpgradeError]: This project is already the latest, no need to upgrade."

Screenshots grafik

VS Code Extension Information (please complete the following information):

Additional context Tried:

but nothing worked

ghost commented 11 months ago

Thank you for contacting us! Any issue or feedback from you is quite important to us. We will do our best to fully respond to your issue as soon as possible. Sometimes additional investigations may be needed, we will usually get back to you within 2 days by adding comments to this issue. Please stay tuned.

xzf0587 commented 11 months ago

Hi @JannikKrusch, Thanks for reaching out. This error message means we try to upgrade the project which has been upgraded to 5.0 already. Besides opening the project by VS Code, is there any action you have token before this error popup? And could you provide the folder structure of the project to help our investigation? Thanks for your information again. Looking forward to your reply.

JannikKrusch commented 11 months ago

Hello @xzf0587

“Besides opening the project by VS Code, is there any action you have token before this error popup?” I started my app, then while I was coding, I got the update popup and I clicked on the popup to v5.0.0 => Error

grafik

Hope this will help :) Best regards

xzf0587 commented 11 months ago

Hi @JannikKrusch Thanks for the detail you provided. The file structure shows the project has upgraded already, so the duplicated upgrade will trigger the error above. Could you repro this error if re-launch the VS Code and open this project again?

JannikKrusch commented 11 months ago

The first image is after the upgrade

This is is how it was before grafik

“Could you repro this error if re-launch the VS Code and open this project again?” I deinstalled and reinstalled it multiple times, but it didn't work.

xzf0587 commented 11 months ago

@JannikKrusch Thanks for the further information. It seems the upgrade is finished based on the first image. Please try the follow steps to walkaround the problem:

  1. Open the project
  2. If there is upgrade popup, please click upgrade button.
  3. If there is NoNeedUpgradeError, ignore it and re-launch the VS Code.
  4. There should be no upgrade popup after re-launch VS Code.

There is no need to deinstall/reinstall the teamsfx extension.

Hope these steps will help you. Best regrads

JannikKrusch commented 11 months ago

@xzf0587 It works :)

Thank you

therealjohn commented 11 months ago

@JannikKrusch thanks for confirming. If you continue to have this issue, please re-open this.

lipinPius1 commented 11 months ago

Reopening: Issue Could not start the app after upgrading teamstoolkit to v5. tried the fix mentioned earlier still issue persists.

Error "[upgrade.NoNeedUpgradeError]: This project is already the latest, no need to upgrade."

ScreenShots image image

Env Toolkit version: V5.0.0 OS: Microsoft Windows 10 Enterprise 10.0.19045 Build 19045

xzf0587 commented 11 months ago

Hi @lipinPius1, Thanks for reaching out. Please provide the file structure of your project to help our investigation. If there is teamsapp.yml in the project folder, it means the project is upgraded. Please share the ".vscode/launch.json" and ".vscode/tasks.json"

ghost commented 10 months ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

ghost commented 10 months ago

Due to lack of details for further investigation, we will archive the issue for now. In case you still have following-up questions on this issue, please always feel free to reopen the issue by clicking ‘reopen issue’ button below the comment box. We will get back to you as soon as possible.

lipinPius1 commented 10 months ago

Hi @xzf0587,

I apologize for the delayed response, this is my project structure image .vscode/launch.json `{ "version": "0.2.0", "configurations": [

    {
        "name": "Launch Remote (Edge)",
        "type": "pwa-msedge",
        "request": "launch",
        "url": "https://teams.microsoft.com/l/app/${teamsAppId}?installAppPackage=true&webjoin=true&${account-hint}",
        "presentation": {
            "group": "remote",
            "order": 1
        }
    },
    {
        "name": "Launch Remote (Chrome)",
        "type": "pwa-chrome",
        "request": "launch",
        "url": "https://teams.microsoft.com/l/app/${teamsAppId}?installAppPackage=true&webjoin=true&${account-hint}",
        "presentation": {
            "group": "remote",
            "order": 2
        }
    },
    {
        "name": "Attach to Frontend (Edge)",
        "type": "pwa-msedge",
        "request": "launch",
        "url": "https://teams.microsoft.com/l/app/${localTeamsAppId}?installAppPackage=true&webjoin=true&${account-hint}",
        "presentation": {
            "group": "all",
            "hidden": true
        }
    },
    {
        "name": "Attach to Frontend (Chrome)",
        "type": "pwa-chrome",
        "request": "launch",
        "url": "https://teams.microsoft.com/l/app/${localTeamsAppId}?installAppPackage=true&webjoin=true&${account-hint}",
        "presentation": {
            "group": "all",
            "hidden": true
        }
    },
    {
        "name": "Attach to Bot",
        "type": "pwa-node",
        "request": "attach",
        "port": 9239,
        "restart": true,
        "presentation": {
            "group": "all",
            "hidden": true
        }
    },
    {
        "name": "Attach to Backend",
        "type": "pwa-node",
        "request": "attach",
        "port": 9229,
        "restart": true,
        "presentation": {
            "group": "all",
            "hidden": true
        },
        "internalConsoleOptions": "neverOpen"
    },
    {
        "name": "Attach to Node Functions",
        "type": "node",
        "request": "attach",
        "port": 9229,
        "preLaunchTask": "func: host start"
    }
],
"compounds": [
    {
        "name": "Debug (Edge)",
        "configurations": [
            "Attach to Frontend (Edge)",
            "Attach to Bot",
            "Attach to Backend"
        ],
        "preLaunchTask": "Pre Debug Check & Start All",
        "presentation": {
            "group": "all",
            "order": 1
        },
        "stopAll": true
    },
    {
        "name": "Debug (Chrome)",
        "configurations": [
            "Attach to Frontend (Chrome)",
            "Attach to Bot",
            "Attach to Backend"
        ],
        "preLaunchTask": "Pre Debug Check & Start All",
        "presentation": {
            "group": "all",
            "order": 2
        },
        "stopAll": true
    }
]

} **tasks.json** { "version": "2.0.0", "tasks": [ { "label": "Pre Debug Check & Start All", "dependsOn": [ "validate local prerequisites", "start ngrok", "prepare local environment", "Start All" ], "dependsOrder": "sequence" }, { "label": "validate local prerequisites", "type": "shell", "command": "exit ${command:fx-extension.validate-local-prerequisites}", "presentation": { "reveal": "never" } }, { "label": "start ngrok", "dependsOn": "teamsfx: ngrok start" }, { "label": "prepare local environment", "type": "shell", "command": "exit ${command:fx-extension.pre-debug-check}", "presentation": { "reveal": "never" } }, { "label": "Start All", "dependsOn": [ "Start Frontend", "Start Backend", "Start Bot" ] }, { "label": "Start Frontend", "type": "shell", "command": "npm run dev:teamsfx", "isBackground": true, "problemMatcher": "$teamsfx-frontend-watch", "options": { "cwd": "${workspaceFolder}/tabs" } }, { "label": "Start Backend", "type": "shell", "command": "npm run dev:teamsfx", "isBackground": true, "problemMatcher": "$teamsfx-backend-watch", "options": { "cwd": "${workspaceFolder}/api", "env": { "PATH": "${env:PATH}${command:fx-extension.get-func-path}" } }, "presentation": { "reveal": "silent" }, "dependsOn": "Watch Backend" }, { "label": "Watch Backend", "type": "shell", "command": "npm run watch:teamsfx", "isBackground": true, "problemMatcher": "$tsc-watch", "options": { "cwd": "${workspaceFolder}/api" }, "presentation": { "reveal": "silent" } }, { "label": "Start Bot", "type": "shell", "command": "npm run dev:teamsfx", "isBackground": true, "problemMatcher": { "pattern": [ { "regexp": "^.*$", "file": 0, "location": 1, "message": 2 } ], "background": { "activeOnStart": true, "beginsPattern": "[nodemon] starting", "endsPattern": "restify listening to|Bot/ME service listening at|[nodemon] app crashed" } }, "options": { "cwd": "${workspaceFolder}/bot" }, "presentation": { "reveal": "silent" } }, { "type": "func", "command": "host start", "problemMatcher": "$func-node-watch", "isBackground": true, "dependsOn": "npm build (functions)", "options": { "cwd": "${workspaceFolder}/api" } }, { "type": "shell", "label": "npm build (functions)", "command": "npm run build", "dependsOn": [ "func: extensions install", "npm install (functions)" ], "problemMatcher": "$tsc", "options": { "cwd": "${workspaceFolder}/api" } }, { "type": "shell", "label": "npm install (functions)", "command": "npm install", "options": { "cwd": "${workspaceFolder}/api" } }, { "type": "shell", "label": "npm prune (functions)", "command": "npm prune --production", "dependsOn": "npm build (functions)", "problemMatcher": [], "options": { "cwd": "${workspaceFolder}/api" } } ] } `

xzf0587 commented 10 months ago

@lipinPius1, From the information you provided, it seems the upgrade of the project is not completed. It has new config file of teamsapp.yml and teamsapp.local.yml but the tasks.json in .vscode folder is old. Does the upgrade of this project is successful? Or you can try to upgrade it again. To re trigger the upgrade, you can

  1. move all the files from ".backup" folder to project root folder
  2. remove the teamsapp.yml and teamsapp.local.yml.
  3. reopen the project. Thanks for your feedback again.
lipinPius1 commented 10 months ago

@xzf0587,

It worked thank you