AmericaSCORESBayArea / AmericaSCORESBayArea/AmericaScores-CoachApp
(Bug) Session Create Fails for Bridges Academy Teams
- Vorherrschende Sprache
- JavaScript
- Sterne
- 5
- Forks
- 2
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
_See below for callstack for Coach App._
mysteriously, this issue appears isolated to two team seasons:
a0qUQ000001q9ufYAA (Bridges Girls 2023-2024)
a0qUQ000001qI3VYAU (Bridges Boys 2023-2024)
To observe:
1. login with a credential assigned to one of the above team seasons
2. navigate to the team > Sessions
3. +Add Session and select a reasonable date and Submit
Result:
Generic Error Message
No session is created in the DB. Response suggests an incomplete request is being sent but this appears isolated to these team seasons only
May need parallel investigation on Salesforce DB.
### Error (from Salesforce)
"message": "Required fields are missing: [Team_Season__c]
### API LOGS
```
10:48:31.422 05/02/2024 Worker-0 [MuleRuntime].uber.1008: [salesforce-data-api-prod].post:\sessions:application\json:salesforce-data-api-config.BLOCKING @280e2775 DEBUG
event:30867510-08ac-11ef-a71e-02bf0f2bd7d7 Sending request to Salesforce. Arguments: {request=00D50000000NVw6!AQEAQNmMdlhO95B_o4qetqn2kUO0Ke3.I5tWSgPmsf.FU4KZr6KeyQ6QxdHCNNOUTeF7PvBb1T50jj.Kt3.KsU1jAp.H_crMSession__c2024-04-22T00:00:00.000ZSoccer, endpoint=https://americascoresbayarea.my.salesforce.com/services/Soap/u/48.0/00D50000000NVw6}.
10:48:31.755 05/02/2024 Worker-0 [MuleRuntime].uber.1008: [salesforce-data-api-prod].post:\sessions:application\json:salesforce-data-api-config.BLOCKING @280e2775 DEBUG
event:30867510-08ac-11ef-a71e-02bf0f2bd7d7 Receiving response from Salesforce. Arguments: {endpoint=https://americascoresbayarea.my.salesforce.com/services/Soap/u/48.0/00D50000000NVw6, response=1344120000API REQUESTSTeam_Season__cRequired fields are missing: [Team_Season__c]REQUIRED_FIELD_MISSINGfalse}.
```
**Coach App runtime shows:**
```
TypeError: Cannot read properties of null (reading 'toString')
at ActivitiesScreen. (Activities.Screen.js:480:48)
at Generator.next ()
at asyncGeneratorStep (asyncToGenerator.js:3:24)
at _next (asyncToGenerator.js:22:9)
at tryCallOne (core.js:37:12)
at core.js:123:15
at JSTimers.js:247:18
at _callTimer (JSTimers.js:111:7)
at _callReactNativeMicrotasksPass (JSTimers.js:161:5)
at MessageQueue.callReactNativeMicrotasks [as _reactNativeMicrotasksCallback] (JSTimers.js:415:12)
```
Activities.Screen.js:166-199
```
async _syncActivities() {
const { route } = this.props;
//Syncs activities from endpoint
await this.fetchActivities()
.then((activitiesList) => this._syncReduxActivities(activitiesList))
.then(async () => {
//Check if we are in the team activities name
this.setState({ offset: this.state.offset + 15 });
if (
route.name === "Team Sessions" &&
route.params &&
route.params.teamSeasonId &&
route.params.region &&
route.params.teamName
) {
if (this.state.offset === 15) {
await this.fetchStudents();
}
await this.filterActivitiesByTeamSeasonId(
//route.params.teamSeasonId,
route.params.region,
route.params.teamName
); // filter the activities for a specific team
this.setState({
isUpdated: true,
teamSeasonId: route.params.teamSeasonId,
region: route.params.region,
teamName: route.params.teamName,
isTeamSessions: true,
programType: route.params.ProgramType,
});
}
})
.catch((error) => console.log(error));
```
Presumably the implementation here has undergone some changes for certain conditions and is likely due maintenance, but the NULL condition seems prior to the function failing.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.