botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

Cannot save bot. Getting "Please correct the errors and try again." error in portal

Open gcsonka opened this issue 9 years ago • 22 comments

Bot Info

  • Bot handle: BotBA
  • App ID: e339387d-082c-4fe3-b907-a66b8288eb4b
  • SDK Platform: .NET
  • SDK Version: 3.9.1
  • Active Channels: Skype, Slack, Facebook,Kik, Telegram
  • Deployment Environment: Azure App Service

Issue Description

I was able to create the bot, but cannot update the bot settings. I receive the "Please correct the errors and try again." error when I try to change anything on the bot's settings page. The cursor seems to jump back to the "Long Description" field as it;s trying to indicate a missing required field. But I do have a long description, so do every other information on the page.

Code Example

Reproduction Steps

1.Log into Bot dev portal 2.Go to settings tab 3.change anything (like logo, or description) 4. click save 5. get the "Please correct the errors and try again." error

Expected Behavior

Settings are saved and no error displayed.

Actual Results

Getting "Please correct the errors and try again." error and no new information is saved on the form.

gcsonka avatar Oct 01 '17 03:10 gcsonka

Are you signed in with one of the accounts that are in the Owners field?

EricDahlvang avatar Oct 02 '17 16:10 EricDahlvang

Yes. Just verified. I'm signed in with the account that was used for signing up for the bot portal. It is in the owners field.

On Oct 2, 2017 10:17 AM, "Eric Dahlvang" [email protected] wrote:

Are you signed in with one of the accounts that are in the Owners field?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/BotBuilder/issues/3549#issuecomment-333584840, or mute the thread https://github.com/notifications/unsubscribe-auth/AUVigLDR_Ovc_FnyyAjXmI65g9LiKbqyks5soQyzgaJpZM4PpxKU .

gcsonka avatar Oct 02 '17 17:10 gcsonka

If you hit F12 in the browser after attempting to save, do you see any errors or more information?

EricDahlvang avatar Oct 02 '17 20:10 EricDahlvang

Yes. I can see this: Get 400 Bad request at the time of page load. PUT 400 error when I click the save button.

image

gcsonka avatar Oct 03 '17 01:10 gcsonka

Hi @EricDahlvang . FYI - I deleted and re-created the bot in the portal along with all of its channels. It is a pain, but I could not find any other way to change my bot.

gcsonka avatar Oct 11 '17 00:10 gcsonka

@gcsonka That's a bummer. I'm sorry you were forced to resort to such a drastic measure. I spent some time looking into this, and eventually escalated to the team. A root cause of your issue has not yet been determined.

Thank you for reporting your issue. Hopefully things go smoothly for your bot now.

EricDahlvang avatar Oct 11 '17 00:10 EricDahlvang

Thanks Eric. Appreciate your help.

On Oct 10, 2017 6:35 PM, "Eric Dahlvang" [email protected] wrote:

@gcsonka https://github.com/gcsonka That's a bummer. I'm sorry you were forced to resort to such a drastic measure. I spent some time looking into this, and eventually escalated to the team. A root cause of your issue has not yet been determined.

Thank you for reporting your issue. Hopefully things go smoothly for your bot now.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Microsoft/BotBuilder/issues/3549#issuecomment-335647047, or mute the thread https://github.com/notifications/unsubscribe-auth/AUVigGstDu7p2PllgQy85Wf3BdqtGpkJks5srA1BgaJpZM4PpxKU .

gcsonka avatar Oct 11 '17 00:10 gcsonka

EDIT: For anyone reading this, the issue is that the platform is trying to set MsaAppType to "0" instead of null. You can just recreate in Postman the same request your browser is making, just make sure to update the payload with the right value for MsaAppType

_Hello there, I'd like to reopen this issue.

I'm running into the exact same issue. The error is:

PUT https://dev.botframework.com/api/BotManager?forPublishing=false
400
{"Errors":[{"Field":"MsaAppType","Message":"'MsaAppType' property cannot be changed."}]}

The only change I brought in the UI before clicking the Save changes button was update the Messaging endpoint field with a new ngrok url. Something I've been able to do hundreds of times up until now._

johanfive avatar Nov 25 '21 17:11 johanfive

EDIT: For anyone reading this, the issue is that the platform is trying to set MsaAppType to "0" instead of null. You can just recreate in Postman the same request your browser is making, just make sure to update the payload with the right value for MsaAppType

_Hello there, I'd like to reopen this issue.

I'm running into the exact same issue. The error is:

PUT https://dev.botframework.com/api/BotManager?forPublishing=false
400
{"Errors":[{"Field":"MsaAppType","Message":"'MsaAppType' property cannot be changed."}]}

The only change I brought in the UI before clicking the Save changes button was update the Messaging endpoint field with a new ngrok url. Something I've been able to do hundreds of times up until now._

I've got the same problem

After to save image

Back end response image

isacarcanjo avatar Nov 30 '21 17:11 isacarcanjo

For anyone reading this, the issue is that the platform is trying to set MsaAppType to "0" instead of null. You can just recreate in Postman the same request your browser is making, just make sure to update the payload with the right value for MsaAppType

Thanks @johanfive, that worked for me!

Steps:

  1. Open network tab in the browser
  2. Watch the request fail
  3. Right-click -> copy request as cURL
  4. Open Postman and click new request -> import -> raw text and paste the request
  5. Edit the request body to remove the MsaAppType key
  6. Send it & you're done. Refresh the botframework site to check if it worked

filippo-orru avatar Dec 19 '21 07:12 filippo-orru

@ffactory-ofcl @johanfive Thanks for sharing. You saved my life 😃

adamist521 avatar Dec 22 '21 13:12 adamist521

Thank you @ffactory-ofcl for the fix. I've run into the same problem as well.

fabiank0 avatar Dec 30 '21 16:12 fabiank0

I am also getting this same error as everyone else of it trying to set MSaAppType.

@ffactory-ofcl when I have tried to recreate using your steps I keep getting a 401 Unauthorized error, any ideas on how to get around that? image

Cjericho4 avatar Jan 04 '22 15:01 Cjericho4

@Cjericho4 Did you copy the full cURL request? It could also be that you took too long to send the request, I think there are some auth tokens being sent with the request.

fabiank0 avatar Jan 04 '22 15:01 fabiank0

@fabiank0 I tried a few more times. I right clicked on the put and copied as curl (POSIX) and curl (Windows) and did it within 30 seconds of trying the original push and haven't been able to get it to work. I tried editing a few of the headers but I keep getting the 401 Unauthorized.

Cjericho4 avatar Jan 04 '22 18:01 Cjericho4

@fabiank0 I tried a few more times. I right clicked on the put and copied as curl (POSIX) and curl (Windows) and did it within 30 seconds of trying the original push and haven't been able to get it to work. I tried editing a few of the headers but I keep getting the 401 Unauthorized.

You need to remove the MsaAppType key before posting. Did you send it using postman?

filippo-orru avatar Jan 04 '22 18:01 filippo-orru

@ffactory-ofcl yes I removed the MsaAppType Key every time I tried it. I used postman to send the request each time.

Cjericho4 avatar Jan 04 '22 18:01 Cjericho4

@Cjericho4 I've just tested it again, and @ffactory-ofcl 's steps still work for me (implying that the problem still exists). I've opened a new issue, since this one is about a different problem and is unlikely to get much visibility.

fabiank0 avatar Jan 06 '22 13:01 fabiank0

Another way to save changes that doesn't require anything is to remove the input from the DOM:

  1. right click "App Type"
  2. Click inspect
  3. in dev tools, click the <div class="detail-row"> above the label that's selected
  4. press DEL key
  5. click "Save Changes"

lverre avatar Jan 07 '22 20:01 lverre

@fabiank0 I tried a few more times. I right clicked on the put and copied as curl (POSIX) and curl (Windows) and did it within 30 seconds of trying the original push and haven't been able to get it to work. I tried editing a few of the headers but I keep getting the 401 Unauthorized.

Do you use web version of Postman? I've tried to do it in web version and also got the 401 Unauthorized. But in desktop version everything worked.

89hikari avatar Jan 22 '22 11:01 89hikari