Closed wrharper-AASP closed 7 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.
@wrharper-AASP I can't reproduce this with VS 2022 17.7.0 P1 - are you using that version?
Well, it worked at first and then just stopped and I can't find any reason as to why since I have changed nothing. Yes, I am using that version. This was upgraded from version 17.6.2
I would say the biggest issue is the fact that it comes up with no actual error.
"displayMessage": "An unexpected error has occurred while performing the file/createOrUpdateJsonFile task. The reason for this error is: {}. Welcome to report this issue by clicking on the provided \"Issue Link\", so that we can investigate and resolve the problem as soon as possible.",
"helpLink": null,
"issueLink": null
the best lead I can think of is when MSGraph changed their requirements. This part in the new teamsapp.local.yml looks wrong:
- uses: file/createOrUpdateJsonFile
with:
target: ./appsettings.Development.json
appsettings:
TeamsFx:
Authentication:
ClientId: ${{AAD_APP_CLIENT_ID}}
ClientSecret: ${{SECRET_AAD_APP_CLIENT_SECRET}}
OAuthAuthority: ${{AAD_APP_OAUTH_AUTHORITY}}
it is missing how you would handle the new InitiateLoginEndpoint in appsettings...
"TeamsFx": {
"Authentication": {
"ClientId": "REMOVEDFORSECURITY",
"ClientSecret": "REMOVEDFORSECURITY",
"InitiateLoginEndpoint": "https://localhost:44302/auth-start.html", //New Line
"OAuthAuthority": "https://login.microsoftonline.com/TENANTIDGOESHERE"
}
the initiateloginendpoint is also not setup in this part of teamsapp.local.yml:
writeToEnvironmentFile: # Write the information of created resources into environment file for the specified environment variable(s).
clientId: AAD_APP_CLIENT_ID
clientSecret: SECRET_AAD_APP_CLIENT_SECRET # Environment variable that starts with `SECRET_` will be stored to the .env.{envName}.user environment file
objectId: AAD_APP_OBJECT_ID
tenantId: AAD_APP_TENANT_ID
authority: AAD_APP_OAUTH_AUTHORITY
authorityHost: AAD_APP_OAUTH_AUTHORITY_HOST
this will probably be an issue for the published version in yml & .env.dev files as well.
I removed the initiateloginendpoint from appsettings as a test and the error did change to an issue with the next area(aadApp/update.)
This shows that it did fix that issue, but this appears to be a chain reaction of issues at this point.
Focus on InitiateLoginEndpoint and I believe you will find the root cause.
see https://github.com/OfficeDev/TeamsFx/issues/8734 for more information on why this is required now.
@blackchoey , could you please help take a look at why InitiateLoginEndpoint will cause consent check failures?
see #8734 for more information on why this is required now.
@wrharper-AASP We cherished your feedbacks, if it's ok, we can have a call to discuss the issues in details. Feel free to book sometime talk with us.
Per #8734, the InitiateLoginEndpoint
is needed in latest SDK so removing it will cause error because the app does not know which URL to open when it requires user login.
@wrharper-AASP can you describe your current situation? Are you just upgraded your project using VS 2022 17.7.0 P1 and met above error, or you already upgraded your project using an earlier VS version but the project suddenly stopped working with VS 2022 17.7.0 P1? Please try to add InitiateLoginEndpoint to file/createOrUpdateJsonFile
to see whether it can fix the problem. The action aims to provide values for your appsettings.development.json so your app have required app settings to run locally:
- uses: file/createOrUpdateJsonFile
with:
target: ./appsettings.Development.json
appsettings:
TeamsFx:
Authentication:
ClientId: ${{AAD_APP_CLIENT_ID}}
ClientSecret: ${{SECRET_AAD_APP_CLIENT_SECRET}}
OAuthAuthority: ${{AAD_APP_OAUTH_AUTHORITY}}
InitiateLoginEndpoint: https://localhost:44302/auth-start.html
@swatDong please help take a look at below error. Seems if the json file contains extra property (InitiateLoginEndpoint here), the action will fail:
An unexpected error has occurred while performing the file/createOrUpdateJsonFile task. The reason for this error is: {}.
Is there any comment (// json comment /* json comment */
) in the targe JSON file? It appears file/createOrUpdateJsonFile
cannot correctly handle JSON comment in 17.7.0 P1. For workaround, please:
file/createOrUpdateJsonFile
action but set runtime variables manuallycc @xiaolang124
see #8734 for more information on why this is required now.
@wrharper-AASP We cherished your feedbacks, if it's ok, we can have a call to discuss the issues in details. Feel free to book sometime talk with us.
I would love to talk about this, but it looks like all your available times are at 1:30AM-2AM
see #8734 for more information on why this is required now.
@wrharper-AASP We cherished your feedbacks, if it's ok, we can have a call to discuss the issues in details. Feel free to book sometime talk with us.
I would love to talk about this, but it looks like all your available times are at 1:30AM-2AM
Hi @AASPLLC , where are you located and what's your time zone? Could you send me email at zhany@microsoft.com so that easier for us to set up a call?
I no longer use the preview version.
It looks like you guys are in the process of creating an issue link system which is great, but everything is coming back null in the error currently.