resource internal error: internal error: 'branchdataprovider.getresourceitem' threw exception Cannot read properties of null (reading 'contextvaluestoadd')

Sofia Louisy 40 Reputation points

I am using swa cli to deploy my static web app. This requests me to create a new static web app project, even though I have an existing one and have successfully deploy multiple time. If I reply "no", I get the error

Checking project settings...

resolved tenant = ...

tenantId = ...

resolved tenant = ...

tenantId = ...

✔ Would you like to create a new Azure Static Web Apps project? … no

✖ The provided project name "undefined" was not found.

If I reply yes, I get:

✔ Would you like to create a new Azure Static Web Apps project? … yes

✔ Choose a project name: … rotate-key-swa

⠋ Creating a new project...resolved tenant = 78703d3c-b907-432f-b066-88f7af9ca3af

tenantId = 78703d3c-b907-432f-b066-88f7af9ca3af

resolved tenant = 78703d3c-b907-432f-b066-88f7af9ca3af

tenantId = 78703d3c-b907-432f-b066-88f7af9ca3af

⠙ Creating a new project...✖ RestError

⠼ Creating a new project...

which will spin to the end of the world.

I use visual studio code, and there i can see :

User's image

I don't know how to go around this error so that I can continue with my work

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
807 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sofia Louisy 40 Reputation points

    I found that --verbose=silly could be used in swa-deploy, and from there on I saw that it could find my swa in the cloud, and automatically tried to deploy there. What I did then was to create another swa project in the portal. When I after that ran swa deploy, I was prompted to select project, and I selected my newly created one. I could deploy without issues now, and I could change the "appName" in the swa-cli.config.json-file to my original project, and I could once again deploy using the swa cli