static-web-apps-cli icon indicating copy to clipboard operation
static-web-apps-cli copied to clipboard

swa deploy - Cannot see logs when there's an error

Open anthonychu opened this issue 2 years ago • 6 comments

Before filing this issue, please ensure you're using the latest CLI by running swa --version and comparing to the latest version on npm.

Trying to use swa deploy. It's failing but it's not possible to see the details of the deployment. It just shows An unknown error has occurred.

image

anthonychu avatar Jun 03 '22 16:06 anthonychu

Hey @anthonychu, Is this related to #500? Could you confirm if you tried the steps mentioned there? We are investigating the fix currently, but need more clarity on whether the error we see in your case is different from that mentioned in the #500 issue or not. Thanks!

cc// @sgollapudi77

Reshmi-Sriram avatar Jun 06 '22 05:06 Reshmi-Sriram

@anthonychu @Reshmi-Sriram I am experiencing the same An unknown exception has occured at the same moment as mentioned here https://github.com/Azure/static-web-apps-cli/issues/500#issuecomment-1132738190

thomasgauvin avatar Jun 09 '22 21:06 thomasgauvin

Hey @anthonychu , is it possible to share your repo? I'm also facing the same issue and I want to confirm if the same is happening for you also.

There are two cases,

** Case 1 ** : Folder structure looks something like this and tried 'swa deploy ./app --api-location ./api' -> Deploy works fine

  • /src
    • /api
    • /app
      • index.html
      • index.js

** Case 2 ** : Folder structure looks like this and tried 'swa deploy . --api-location ./api' -> Deploy fails with Unknown exception occured

  • /src
    • /api
    • index.html
    • index.js

sgollapudi77 avatar Jun 24 '22 06:06 sgollapudi77

Hey, we're experiencing the same error on our end too and this issue is being actively worked on. But fortunately, we have a workaround for this. If you're deploying from the root folder where your app contents are present, please try creating a folder for app_location and dump your static contents in that folder and do 'swa deploy'.

We also documented the same here.

sgollapudi77 avatar Aug 04 '22 10:08 sgollapudi77

I need the same error report, but I am running in Docker, which is related to the file permissions. It should be that new files cannot be created during compression

wowq avatar Sep 22 '22 05:09 wowq

@sgollapudi77 to your point, I'm encountering this issue when trying to deploy my built (/dist) folder from SWA CLI. The repo is https://github.com/thomasgauvin/solidjs-starter, no API functions. The command I'm executing is swa deploy ./dist

Funnily enough, it worked the first time I submitted the deployment, but when I wanted to redeploy, it gave me the error.

I am encountering the same as https://github.com/Azure/static-web-apps-cli/issues/557

thomasgauvin avatar Oct 05 '22 17:10 thomasgauvin